Could not execute JDBC batch update

来源:互联网 发布:美国最新数据公布网站 编辑:程序博客网 时间:2024/04/29 20:10

Could not execute JDBC batch update
错误信息:
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就可以了。