Hibernate錯誤拾集
1)"Caused by: java.sql.SQLException: Syntax error or access violation message from server: "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 'group, testoption.content as content, testoption.score as score, testoption.Ques' at line 1"
----:在你的pojo中定義了數(shù)據(jù)庫的key word,例如:group等等.
2)net.sf.hibernate.QueryException: could not resolve property type: username [select user.password from cn.org.sppc.ipmanager.User user where user.username=?]
----:username在Form類中、在Hibernate的xml文件中和相對應(yīng)的PO對象中名稱都要保持一致(包括大小寫)。包括struts-config.xml中的。
posted on 2007-03-14 09:10 小雨不打傘 閱讀(535) 評論(0) 編輯 收藏 所屬分類: 數(shù)據(jù)庫