Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Weird NPE on BatchingBatcher "JDBC driver did not return the expected number of row counts"

I'm running a spring/hibernate java app on tomcat and I'm seeing this funky error on update: JDBC driver did not return the expected number of row counts

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)

I recently updated my mysql connector to version 5.1.15. Has anyone seen anything like this?

like image 347
matsientst Avatar asked Mar 07 '11 17:03

matsientst


1 Answers

I think I encountered this once and fixed it by implementing hashCode and Equals methods for the object type returned by the query.

like image 73
James Gawron Avatar answered Sep 24 '22 01:09

James Gawron