org.hibernate.exception.SQLGrammarException: could not insert: [org.xieztao.newdat.vo.User].
.
.
.
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'usage, tplccity, tplcity, uspost, usadd, ustel, usfax, usqq, usvip, usjf, usxfjf' at line 1
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

解决方案 »

  1.   

    usage是关键字,重新起个名字
      

  2.   

    Hibernate: insert into userer (usname, usmail, uspwd, ustname, usques, usans, usttname, ussex, usage, tplccity, tplcity, uspost, usadd, ustel, usfax, usqq, usvip, usjf, usxfjf) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
    org.hibernate.exception.SQLGrammarException: could not insert: [org.xieztao.newdat.vo.User]换过了,还是不行,出来的语句是这样的,但是就是不行~
      

  3.   

    insert into userer (usname, usmail, uspwd, ustname, usques, usans, usttname, ussex, usage, tplccity, tplcity, uspost, usadd, ustel, usfax, usqq, usvip, usjf, usxfjf) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)