错误信息:
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就可以了。

posted on 2008-12-03 22:02 caihaibo 阅读(610) 评论(0)  编辑  收藏 所属分类: hibernatemysql

只有注册用户登录后才能发表评论。


网站导航: