Warning: Can't synchronize with repository "(default)" (/home/git/ome.git does not appear to be a Git repository.). Look in the Trac log for more information.
Notice: In order to edit this ticket you need to be either: a Product Owner, The owner or the reporter of the ticket, or, in case of a Task not yet assigned, a team_member"

Bug #358 (closed)

Opened 17 years ago

Closed 17 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 17 years ago by jmoore

r935 turns off batching.

comment:2 Changed 17 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 17 years ago by jmoore

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets. You may also have a look at Agilo extensions to the ticket.

1.3.13-PRO © 2008-2011 Agilo Software all rights reserved (this page was served in: 0.63164 sec.)

We're Hiring!