Exception in thread "main" org.hibernate.exception.SQLGrammarException: Could not execute JDBC batch update
原因與解決:
1.因為Hibernate Tools(或者Eclipse本身的Database Explorer)生成*.hbn.xml工具中包含有catalog="***"(*表示數據庫名稱)這樣的屬性,將該屬性刪除就可以了
2.估計是你的列名里面有關鍵字的原因吧,命名列的時候不要單獨使用date,ID...這種關鍵字
Hibernate查詢時候的問題。
莫名其妙地報如下的錯誤,
org.hibernate.exception.GenericJDBCException: could not execute query
最后把mysql的驅動程序 從 mysql-connector-java-3.2.0-alpha改成mysql-connector-java-5.0.4就可以了。