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 <tschinke...@googlemail.com>
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 h2-database+unsubscr...@googlegroups.com.
> To post to this group, send email to h2-database@googlegroups.com.
> 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 h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.

Reply via email to