I have seen this on 1.3.175 in the customer's logs. Config: 
MVCC=TRUE;MULTI_THREADED=0;LOCK_MODE=3;LOCK_TIMEOUT=20000;

Here's a stacktrace:

2016-07-25T17:09:43,158 [ERROR][System.err] Caused by: 
org.h2.jdbc.JdbcSQLException: IO Exception: "java.io.IOException: 
java.lang.ArrayIndexOutOfBoundsException: 0"; "lob: null table: -1 id: 
9100" [90031-175]
2016-07-25T17:09:43,158 [ERROR][System.err] at 
org.h2.message.DbException.getJdbcSQLException(DbException.java:332)
2016-07-25T17:09:43,158 [ERROR][System.err] at 
org.h2.message.DbException.get(DbException.java:161)
2016-07-25T17:09:43,158 [ERROR][System.err] at 
org.h2.message.DbException.convertIOException(DbException.java:318)
2016-07-25T17:09:43,158 [ERROR][System.err] at 
org.h2.value.ValueLobDb.getBytesNoCopy(ValueLobDb.java:340)
2016-07-25T17:09:43,158 [ERROR][System.err] at 
org.h2.value.ValueLobDb.getBytes(ValueLobDb.java:324)
2016-07-25T17:09:43,158 [ERROR][System.err] at 
org.h2.jdbc.JdbcResultSet.getBytes(JdbcResultSet.java:1042)
2016-07-25T17:09:43,158 [ERROR][System.err] at 
com.mchange.v2.c3p0.impl.NewProxyResultSet.getBytes(NewProxyResultSet.java:659)
2016-07-25T17:09:43,158 [ERROR][System.err] at 
org.hibernate.type.descriptor.sql.VarbinaryTypeDescriptor$2.doExtract(VarbinaryTypeDescriptor.java:70)
2016-07-25T17:09:43,158 [ERROR][System.err] at 
org.hibernate.type.descriptor.sql.BasicExtractor.extract(BasicExtractor.java:64)
2016-07-25T17:09:43,158 [ERROR][System.err] at 
org.hibernate.type.AbstractStandardBasicType.nullSafeGet(AbstractStandardBasicType.java:267)
2016-07-25T17:09:43,158 [ERROR][System.err] at 
org.hibernate.type.AbstractStandardBasicType.nullSafeGet(AbstractStandardBasicType.java:263)
2016-07-25T17:09:43,158 [ERROR][System.err] at 
org.hibernate.type.AbstractStandardBasicType.nullSafeGet(AbstractStandardBasicType.java:253)
2016-07-25T17:09:43,158 [ERROR][System.err] at 
org.hibernate.type.AbstractStandardBasicType.hydrate(AbstractStandardBasicType.java:338)
2016-07-25T17:09:43,158 [ERROR][System.err] at 
org.hibernate.persister.entity.AbstractEntityPersister.hydrate(AbstractEntityPersister.java:2969)
2016-07-25T17:09:43,158 [ERROR][System.err] at 
org.hibernate.loader.plan.exec.process.internal.EntityReferenceInitializerImpl.loadFromResultSet(EntityReferenceInitializerImpl.java:324)
2016-07-25T17:09:43,158 [ERROR][System.err] ... 111 more
2016-07-25T17:09:43,158 [ERROR][System.err] Caused by: java.io.IOException: 
java.lang.ArrayIndexOutOfBoundsException: 0
2016-07-25T17:09:43,158 [ERROR][System.err] at 
org.h2.message.DbException.convertToIOException(DbException.java:351)
2016-07-25T17:09:43,158 [ERROR][System.err] at 
org.h2.util.IOUtils.copy(IOUtils.java:177)
2016-07-25T17:09:43,158 [ERROR][System.err] at 
org.h2.util.IOUtils.readBytesAndClose(IOUtils.java:277)
2016-07-25T17:09:43,158 [ERROR][System.err] at 
org.h2.value.ValueLobDb.getBytesNoCopy(ValueLobDb.java:338)
2016-07-25T17:09:43,158 [ERROR][System.err] ... 122 more
2016-07-25T17:09:43,158 [ERROR][System.err] Caused by: 
java.lang.ArrayIndexOutOfBoundsException: 0
2016-07-25T17:09:43,158 [ERROR][System.err] at 
org.h2.store.LobStorageBackend$LobInputStream.fillBuffer(LobStorageBackend.java:777)
2016-07-25T17:09:43,158 [ERROR][System.err] at 
org.h2.store.LobStorageBackend$LobInputStream.readFully(LobStorageBackend.java:753)
2016-07-25T17:09:43,158 [ERROR][System.err] at 
org.h2.store.LobStorageBackend$LobInputStream.read(LobStorageBackend.java:744)
2016-07-25T17:09:43,158 [ERROR][System.err] at 
org.h2.util.IOUtils.copy(IOUtils.java:164)



On Friday, July 11, 2014 at 3:31:09 PM UTC+3, Thomas Mueller Graf wrote:
>
> Hi,
>
> I can reproduce the problem with version 1.3.x, or with version 1.4.x when 
> disabling the MVStore (append ";mv_store=false" to the database URL). With 
> version 1.4.x (beta), that is with the MVStore, it does not occur.
>
> I'm not quite sure what the problem is, it looks like the LOB is removed a 
> bit too early. What is easy to change is the error message (it should say 
> "Missing lob entry"), but I'm not sure how to best fix the problem.
>
> Regards,
> Thomas
>
>
>
>
>
> On Wed, Jul 9, 2014 at 9:40 PM, Torben Schinke <[email protected] 
> <javascript:>> wrote:
>
>> I get an unexpected IndexOutOfBounds-Exception in the LobStorageBackend 
>> when reading blobs from a table which gets concurrently updated from 
>> another thread (however the update is not performed on the blob-field).
>>
>> I attached a simple test case for that and I'm able to reproduce that 
>> quite reliable on MacOS and Android. Pastebin: 
>> http://pastebin.com/3N99rZNp
>>
>> The stack trace is:
>>
>> Exception in thread "main" java.util.concurrent.ExecutionException: 
>> org.h2.jdbc.JdbcSQLException: Eingabe/Ausgabe: "java.io.IOException: 
>> java.lang.ArrayIndexOutOfBoundsException: 0"; "lob: null table: -1 id: 
>> 1950"
>> IO Exception: "java.io.IOException: 
>> java.lang.ArrayIndexOutOfBoundsException: 0"; "lob: null table: -1 id: 
>> 1950" [90031-176]
>> at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:222)
>> at java.util.concurrent.FutureTask.get(FutureTask.java:83)
>> at org.h2.samples.HelloWorld.main(HelloWorld.java:83)
>> Caused by: org.h2.jdbc.JdbcSQLException: Eingabe/Ausgabe: "
>> java.io.IOException: java.lang.ArrayIndexOutOfBoundsException: 0"; "lob: 
>> null table: -1 id: 1950"
>> IO Exception: "java.io.IOException: 
>> java.lang.ArrayIndexOutOfBoundsException: 0"; "lob: null table: -1 id: 
>> 1950" [90031-176]
>> at org.h2.message.DbException.getJdbcSQLException(DbException.java:344)
>> at org.h2.message.DbException.get(DbException.java:167)
>> at org.h2.message.DbException.convertIOException(DbException.java:329)
>> at org.h2.value.ValueLobDb.getBytesNoCopy(ValueLobDb.java:329)
>> at org.h2.value.ValueLobDb.getBytes(ValueLobDb.java:313)
>> at org.h2.jdbc.JdbcResultSet.getBytes(JdbcResultSet.java:1056)
>> at org.h2.samples.HelloWorld$1.call(HelloWorld.java:58)
>> at org.h2.samples.HelloWorld$1.call(HelloWorld.java:1)
>> at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
>> at java.util.concurrent.FutureTask.run(FutureTask.java:138)
>> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(
>> ThreadPoolExecutor.java:895)
>> at java.util.concurrent.ThreadPoolExecutor$Worker.run(
>> ThreadPoolExecutor.java:918)
>> at java.lang.Thread.run(Thread.java:695)
>>
>> Caused by: java.io.IOException: java.lang.ArrayIndexOutOfBoundsException: 
>> 0
>> at org.h2.message.DbException.convertToIOException(DbException.java:363)
>> at org.h2.util.IOUtils.copy(IOUtils.java:181)
>> at org.h2.util.IOUtils.readBytesAndClose(IOUtils.java:283)
>> at org.h2.value.ValueLobDb.getBytesNoCopy(ValueLobDb.java:327)
>>
>> ... 9 more
>>
>> Caused by: java.lang.ArrayIndexOutOfBoundsException: 0
>> at org.h2.store.LobStorageBackend$LobInputStream.fillBuffer(
>> LobStorageBackend.java:787)
>> at org.h2.store.LobStorageBackend$LobInputStream.readFully(
>> LobStorageBackend.java:763)
>> at org.h2.store.LobStorageBackend$LobInputStream.read(
>> LobStorageBackend.java:754)
>> at org.h2.util.IOUtils.copy(IOUtils.java:168)
>>
>> ... 11 more
>>
>> What can I do to avoid this problem?
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "H2 Database" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> To post to this group, send email to [email protected] 
>> <javascript:>.
>> Visit this group at http://groups.google.com/group/h2-database.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.

Reply via email to