• Views
  • Iteration Report
  • My Iteration Report
  •  
OMERO.server
  • Login
  • Help/Guide
  • About Trac
  • Preferences
  • Wiki
  • Timeline
  • Roadmap
  • Browse Source
  • View Tickets
  • Search

Context Navigation

  • ← Previous Ticket
  • Next Ticket →

Ticket #358 (closed defect: fixed)

Opened 2 years ago

Last modified 2 years ago

Postgresql batching causes strange exceptions.

Reported by: jmoore Owned by: jmoore
Priority: major Milestone: 3.0-M3
Component: ORM Version: 3.0-M1
Keywords: iteration5, jdbc, bug Cc:

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

Changed 2 years ago by jmoore

r935 turns off batching.

Changed 2 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.

Changed 2 years ago by jmoore

  • status changed from new to closed
  • resolution set to fixed
Note: See TracTickets for help on using tickets.

Download in other formats:

  • Comma-delimited Text
  • Tab-delimited Text
  • RSS Feed

Trac Powered

Powered by Trac 0.11
By Edgewall Software.

Visit the Trac open source project at
http://trac.edgewall.org/