Bug #358 (closed)
Opened 13 years ago
Closed 13 years ago
Postgresql batching causes strange exceptions.
| Reported by: | jamoore | Owned by: | jamoore |
|---|---|---|---|
| Priority: | major | Cc: | |
| Sprint: | n.a. | ||
| Total Remaining Time: | n.a. |
Description
After beginning to use the StatelessSession, a JDBC bug appeared:
21:21:46,111 WARN [AbstractBatcher] JDBC driver did not return the expected number of row counts
21:21:46,112 ERROR [AbstractBatcher] Exception executing batch:
java.lang.ArrayIndexOutOfBoundsException: 15
at org.hibernate.jdbc.BatchingBatcher.checkRowCounts(BatchingBatcher.java:68)
at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:48)
at org.hibernate.jdbc.BatchingBatcher.addToBatch(BatchingBatcher.java:34)
at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2182)
at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2595)
at org.hibernate.impl.StatelessSessionImpl.insert(StatelessSessionImpl.java:93)
at org.hibernate.impl.StatelessSessionImpl.insert(StatelessSessionImpl.java:75)
Suggested solution appears to be to disable batching via:
hibernate.jdbc.batch_size=0
Also tried other drivers:
- 8.2dev-503 JDBC 3
- 8.1-407 JDBC 3
Reference : http://www.mail-archive.com/hibernate-devel@lists.sourceforge.net/msg02333.html
Change History (3)
comment:1 Changed 13 years ago by jmoore
comment:2 Changed 13 years ago by jmoore
Before I forget, this bug has one other strange feature: it only appeared every other call. That is, on the first run a test case would pass, and on the next it would fail, and on the next it would pass again. Et cetera.
comment:3 Changed 13 years ago by jmoore
- Resolution set to fixed
- Status changed from new to closed
r935 turns off batching.