Hello.

The issue I describe is very critical for us. We are developing huge GIS 
system based on UDig platform where H2 serves as a local embedded database 
with spatial data type support coming with Hatbox , GeoDB, GeoTools 
libraries. We use BLOB data type to store geometries as WKB (well known 
binary), Hatbox provides spatial indexing,  etc. Everything has been 
working smoothly during recent year of the development with 1.3.174 and 
MVCC enabled.   Switch to 1.4.181 with MVStore enabled  led to BLOB columns 
related issues.  The most typical exception is on INSERT and it is below:

Caused by: org.h2.jdbc.JdbcSQLException: The object is already closed; SQL 
statement:
insert into  ............. values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) 
[90007-181]
    at org.h2.message.DbException.getJdbcSQLException(DbException.java:345)
    at org.h2.message.DbException.get(DbException.java:179)
    at org.h2.message.DbException.get(DbException.java:155)
    at org.h2.message.DbException.get(DbException.java:144)
    at org.h2.store.LobStorageMap.createBlob(LobStorageMap.java:128)
    at org.h2.value.ValueLobDb.link(ValueLobDb.java:254)
    at org.h2.mvstore.db.MVPrimaryIndex.add(MVPrimaryIndex.java:120)
    at org.h2.mvstore.db.MVTable.addRow(MVTable.java:620)
    at org.h2.command.dml.Insert.insertRows(Insert.java:156)
    at org.h2.command.dml.Insert.update(Insert.java:114)
    at org.h2.command.CommandContainer.update(CommandContainer.java:78)
    at org.h2.command.Command.executeUpdate(Command.java:254)
    at 
org.h2.jdbc.JdbcPreparedStatement.execute(JdbcPreparedStatement.java:198)
    at 
org.apache.commons.dbcp.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:172)
    at 
org.apache.commons.dbcp.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:172)
    at 
org.jumpmind.db.sql.JdbcSqlTransaction.addRow(JdbcSqlTransaction.java:394)

1 column in the underlying table has type BLOB , some tables where this 
exception occur has 2 BLOB columns.  The problem occurs randomly on INSERTs 
to different tables having BLOB columns for geometries.  Once this 
exception  occurs then one of the following problems in the end is another 
type of exception on an attempt to SELECT..  and it is about missing chunks 
of data 

Caused by: java.lang.IllegalStateException: Chunk 332 no longer exists 
[1.4.181/9]
    at org.h2.mvstore.DataUtils.newIllegalStateException(DataUtils.java:762)
    at org.h2.mvstore.MVStore.getChunkIfFound(MVStore.java:861)
    at org.h2.mvstore.MVStore.getChunk(MVStore.java:844)
    at org.h2.mvstore.MVStore.readPage(MVStore.java:1795)
    at org.h2.mvstore.MVMap.readPage(MVMap.java:769)
    at org.h2.mvstore.Page.getChildPage(Page.java:252)
    at org.h2.mvstore.MVMap.binarySearch(MVMap.java:469)
    at org.h2.mvstore.MVMap.binarySearch(MVMap.java:470)
    at org.h2.mvstore.MVMap.get(MVMap.java:451)
    at org.h2.mvstore.MVMapConcurrent.remove(MVMapConcurrent.java:71)
    at org.h2.store.LobStorageMap.removeLob(LobStorageMap.java:292)
    at org.h2.store.LobStorageMap.removeLob(LobStorageMap.java:278)
    at org.h2.value.ValueLobDb.close(ValueLobDb.java:227)
    at org.h2.engine.Session.endTransaction(Session.java:552)
    at org.h2.engine.Session.commit(Session.java:536)
    at org.h2.command.Command.stop(Command.java:152)
    at org.h2.command.Command.executeUpdate(Command.java:284)
    at org.h2.jdbc.JdbcStatement.executeInternal(JdbcStatement.java:184)
    at org.h2.jdbc.JdbcStatement.execute(JdbcStatement.java:158)


Transactions are manually managed (no autocommit) in the application. 
Usually there is  a 1 transaction opened, being committed or rolled back 
from time to time, other connections are used for simultaneous reading.
We temporarily switched back to previous version that was stable but 
looking forward to MVStore.


I am planning to do some debugging my myself and may be provide more info 
later. For now it seams something is broken/not stable/not complete  in 
MVStore for BLOBs..   Any comments from H2 team? You may get whatever help 
you need from us to debug and provide more info to you..  Anyway H2 is a 
great piece of software, thanks , guys :) 

Vitali.

-- 
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 http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.

Reply via email to