ArrayIndexOutOfBoundsException in UPDATE

35 views
Skip to first unread message

Marius

unread,
Jun 30, 2011, 4:59:50 AM6/30/11
to H2 Database
Hi there,

a customer of ours is experiencing regular database exception which I
don't know how to fix.

The exception is:

org.h2.jdbc.JdbcSQLException: General error:
"java.lang.ArrayIndexOutOfBoundsException: 127"; SQL statement:
UPDATE SF_INCIDENT SET sFPatientID = NULL, sFActorID = NULL, TYPE =
NULL WHERE (INCIDENT_ID = ? AND CALL_Mode is NULL AND CLOSED = ? AND
DISABLED = ? AND EXTERNAL_ID is NULL AND EXTERNAL_SESSION_ID is NULL
AND HASDOCUMENTS = ? AND HASGOALS = ? AND HASMVK = ? AND
HASPERSISTINGDIAGNOSIS = ? AND HASTHERAPEUTIC = ? AND PATIENT_COMMENT
is NULL AND sFActorID = ? AND sFPatientID = ? AND sFTaskID is NULL AND
TIME_CONTEXT = ? AND TYPE = ?) [50000-151]
at org.h2.message.DbException.getJdbcSQLException(DbException.java:
327)
at org.h2.message.DbException.get(DbException.java:156)
at org.h2.message.DbException.convert(DbException.java:279)
at org.h2.table.RegularTable.removeRow(RegularTable.java:379)
at org.h2.table.Table.updateRows(Table.java:417)
at org.h2.command.dml.Update.update(Update.java:125)
at org.h2.command.CommandContainer.update(CommandContainer.java:69)
at org.h2.command.Command.executeUpdate(Command.java:211)
at
org.h2.jdbc.JdbcPreparedStatement.executeUpdateInternal(JdbcPreparedStatement.java:
143)
at
org.h2.jdbc.JdbcPreparedStatement.executeUpdate(JdbcPreparedStatement.java:
129)


... some exceptions by the ORM (EOF in this case)...

java.lang.ArrayIndexOutOfBoundsException: 127
at org.h2.index.PageBtree.getRow(PageBtree.java:172)
at org.h2.index.PageBtreeLeaf.remove(PageBtreeLeaf.java:222)
at org.h2.index.PageBtreeNode.remove(PageBtreeNode.java:324)
at org.h2.index.PageBtreeIndex.remove(PageBtreeIndex.java:237)
at org.h2.table.RegularTable.removeRow(RegularTable.java:361)


As you can see, H2 1.3.151 is being used. The database was created
originally using 1.2.125 or 1.2.147 (I can't be sure, I wasn't
involved at the time). I did a full export and restore using 1.3.151,
but the problem persists.

I downloaded the data to my machine and so far I couldn't even
reproduce the problem.

Thanks for any help,
- Marius


Thomas Mueller

unread,
Jul 1, 2011, 2:08:13 PM7/1/11
to h2-database
Hi,

I don't know what it could be. I have a list of questions:

- What is your database URL?
- How many connections does your application use concurrently?
- Do you use temporary tables?
- Did you use LOG=0 or LOG=1?
- With which version of H2 was this database created?
You can find it out using:
select * from information_schema.settings where name='CREATE_BUILD'
or have a look in the SQL script created by the recover tool.
- Did the application run out of memory (once, or multiple times)?
- Do you use any settings or special features (for example cache settings,
two phase commit, linked tables)?
- Do you use any H2-specific system properties?
- Is the application multi-threaded?
- What operating system, file system, and virtual machine
(java -version) do you use?
- How did you start the Java process (java -Xmx... and so on)?
- Is it (or was it at some point) a networked file system?
- How big is the database (file sizes)?
- How much heap memory does the Java process have?
- Is the database usually closed normally, or is process terminated
forcefully or the computer switched off?
- Is it possible to reproduce this problem using a fresh database
(sometimes, or always)?
- Are there any other exceptions (maybe in the .trace.db file)?
Could you send them please?
- Do you still have any .trace.db files, and if yes could you send them?
- Could you send the .h2.db file where this exception occurs?

Regards,
Thomas

Reply all
Reply to author
Forward
0 new messages