Hi Noel,

I do have connection.setAutoCommit() to false.
But I am not sure what you mean by ".... read the LOB completely here...... 
" 

I am getting the exception while reading 
resultSet.getString("CLOB_COLUMN_NAME")

connection.commit() is not making any difference for me.

This being related to concurrency is a bit difficult to reproduce on 
standalone test/example.

Could you please elaborate more on keeping the transaction open. I do have 
the read connection open. (not calling connection.close() )

Following is the trace that I have trace.db

12-28 14:57:52 jdbc[12]: exception
org.h2.jdbc.JdbcSQLException: IO Exception: "java.io.IOException: 
org.h2.jdbc.JdbcSQLException: IO Exception: ""Missing lob entry: 18928"" 
[90028-176]"; "lob: null table: -1 id: 18928" [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.getInputStream(ValueLobDb.java:395)
at org.h2.value.ValueLobDb.getReader(ValueLobDb.java:378)
at org.h2.value.ValueLobDb.getString(ValueLobDb.java:293)
at org.h2.jdbc.JdbcResultSet.getString(JdbcResultSet.java:304)
at 
com.mchange.v2.c3p0.impl.NewProxyResultSet.getString(NewProxyResultSet.java:908)
at com.xApp.p.h2.d.h2.assembleResultSet(h2.java:389)
at com.xApp.p.h2.d.h2.getbykey(h2.java:240)
at com.xApp.p.common.sql.sql.getEntryByKey(sql.java:41)
at com.xApp.p.common.dxe.lambda$10(dxe.java:210)
at com.xApp.p.taf.createDataTransactionAndReturn(taf.java:156)
at com.xApp.p.common.bxe.createTransactionAndReturn(bxe.java:176)
at com.xApp.p.common.dxe.getEntryByKey(dxe.java:207)
at com.xApp.datatables.dmingle.addOrUpdateDataTableEntry(dmingle.java:1266)
at com.xApp.datatables.dmingle.AddOrUpdateDataTableEntry(dmingle.java:439)
at sun.reflect.GeneratedMethodAccessor39.invoke(Unknown Source)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at 
com.xApp.common.processors.ReflectionProcessor.processService(ReflectionProcessor.java:261)
at 
com.xApp.handlers.ReflectionServiceHandler.processService(ReflectionServiceHandler.java:48)
at com.xApp.mingles.mingle.processServiceRequestDirect(mingle.java:6858)
at com.xApp.mingles.mingle.processServiceRequest(mingle.java:6776)
at com.xApp.dsl.xe.adapters.VirtualFunction.call(VirtualFunction.java:145)
at org.mozilla.javascript.optimizer.OptRuntime.call1(OptRuntime.java:32)
at org.mozilla.javascript.gen.TableUpdate_4._c_script_0(TableUpdate:11)
at org.mozilla.javascript.gen.TableUpdate_4.call(TableUpdate)
at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:394)
at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3090)
at org.mozilla.javascript.gen.TableUpdate_4.call(TableUpdate)
at org.mozilla.javascript.gen.TableUpdate_4.exec(TableUpdate)
at com.xApp.dsl.xe.dp.exS(dp.java:167)
at com.xApp.dsl.handleSer.processService(handleSer.java:37)
at com.xApp.mingles.async.AH.run(AH.java:47)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.io.IOException: org.h2.jdbc.JdbcSQLException: IO Exception: 
"Missing lob entry: 18928" [90028-176]
at org.h2.message.DbException.convertToIOException(DbException.java:363)
at org.h2.store.LobStorageBackend.getInputStream(LobStorageBackend.java:345)
at org.h2.value.ValueLobDb.getInputStream(ValueLobDb.java:393)
... 32 more
Caused by: org.h2.jdbc.JdbcSQLException: IO Exception: "Missing lob entry: 
18928" [90028-176]
at org.h2.message.DbException.getJdbcSQLException(DbException.java:344)
at org.h2.message.DbException.get(DbException.java:178)
at org.h2.message.DbException.get(DbException.java:154)
at 
org.h2.store.LobStorageBackend$LobInputStream.<init>(LobStorageBackend.java:667)
at org.h2.store.LobStorageBackend.getInputStream(LobStorageBackend.java:341)
... 33 more




On Wednesday, December 21, 2016 at 7:57:18 PM UTC+5:30, Noel Grandin wrote:
>
> yes, because you are not holding the transaction open while reading the 
> LOB, so the LOB is disappearing while you are 
> reading it. 
>
> i.e. 
>
> connection.setAutoCommit(false); 
>      .... read the LOB completely here...... 
> connection.commit(); 
>

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

Reply via email to