ITeye博客

org.hibernate.exception.SQLGrammarException: Could not execute JDBC batch update

pichcar · 2010-11-11 09:41 · J2EE · 企业架构 · DAO · 数据结构 · JDBC · Hibernate · Markdown

今天开发项目时,遇到一个错误每次执行插入方法是老报异常:

1.org.hibernate.exception.SQLGrammarException: Could not execute JDBC batch update

2.org.springframework.dao.InvalidDataAccessResourceUsageException: Could not execute JDBC batch update; nested exception is org.hibernate.exception.SQLGrammarException: Could not execute JDBC batch update

一般情况下可能的原因:

1.数据库里面的表没创建,这点应该去检查一下,可能楼创建了。

2.数据库对应表里面的字段没有创建,导致插入语句的时候报错。

3.数据库里面的表结构与配置文件中的表结构不一致。

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。