BatchingBatcher上的奇怪NPE“JDBC驱动程序没有返回预期的行数”

时间:2011-03-07 17:58:16

标签: mysql hibernate spring jdbc mysql-connector

我在tomcat上运行spring / hibernate java应用程序,我在更新时看到这个时髦的错误: JDBC驱动程序未返回预期的行数

Caused by: java.lang.NullPointerException
        at org.hibernate.jdbc.BatchingBatcher.checkRowCounts(BatchingBatcher.java:90)
        at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:70)
        at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:268)
        at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:262)
        at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:179)

我最近将我的mysql连接器更新到5.1.15版。 有没有人见过这样的东西?

1 个答案:

答案 0 :(得分:2)

我想我遇到过这个并通过为查询返回的对象类型实现hashCode和Equals方法来修复它。