Hi, Is it possible that the LOB was removed in the meantime (after running the query, but before accessing the row)?
Regards, Thomas On Fri, Jan 4, 2013 at 2:51 PM, Ryan How <[email protected]> wrote: > Hi, > > I'm getting a NullPointerException when trying to select a record. > > Table is: > > CREATE TABLE EMAIL_QUEUE (" + > "EMAIL_QUEUE_ID LONG IDENTITY," + > "EMAIL_DATA TEXT," + > "ERROR_COUNT INTEGER," + > "ERROR_TIME DATETIME" + > "); > > Connection String > > jdbc:h2:DATABASE_NAME;MVCC=**TRUE;CACHE_SIZE=256000 > > If I change the TEXT field to VARCHAR it works fine. > > Looks like an issue with the TEXT field? And probably MVCC ?. I didn't try > it without MVCC. I like MVCC :) > > > Thanks, Ryan > > > Stack Trace > > org.jooq.exception.**DataAccessException: SQL [select > "PUBLIC"."EMAIL_QUEUE"."EMAIL_**QUEUE_ID", "PUBLIC"."EMAIL_QUEUE"."EMAIL_* > *DATA", "PUBLIC"."EMAIL_QUEUE"."ERROR_**COUNT", > "PUBLIC"."EMAIL_QUEUE"."ERROR_**TIME" from "PUBLIC"."EMAIL_QUEUE" where > "PUBLIC"."EMAIL_QUEUE"."EMAIL_**QUEUE_ID" = cast(? as bigint) for > update]; General error: "java.lang.**NullPointerException" [50000-170] > at org.jooq.impl.Util.translate(**Util.java:649) > at org.jooq.impl.**DefaultExecuteContext.**sqlException(** > DefaultExecuteContext.java:**360) > at org.jooq.impl.CursorImpl$**CursorIterator.fetch(** > CursorImpl.java:1280) > at org.jooq.impl.CursorImpl$**CursorIterator.next(** > CursorImpl.java:1241) > at org.jooq.impl.CursorImpl$**CursorIterator.next(** > CursorImpl.java:1211) > at org.jooq.impl.CursorImpl.**fetch(CursorImpl.java:169) > at org.jooq.impl.CursorImpl.**fetch(CursorImpl.java:143) > at org.jooq.impl.**AbstractResultQuery.execute(** > AbstractResultQuery.java:209) > at org.jooq.impl.AbstractQuery.**execute(AbstractQuery.java:**258) > at org.jooq.impl.**AbstractResultQuery.fetch(** > AbstractResultQuery.java:274) > at org.jooq.impl.**AbstractResultQuery.fetchOne(** > AbstractResultQuery.java:413) > at org.jooq.impl.TableRecordImpl.**checkIfChanged(** > TableRecordImpl.java:325) > at org.jooq.impl.TableRecordImpl.**deleteUsing(TableRecordImpl.** > java:276) > at org.jooq.impl.**UpdatableRecordImpl.delete(** > UpdatableRecordImpl.java:83) > at au.com.greatlivinghomes.**buildflow.Email.** > sendQueuedEmails(Email.java:**105) > at au.com.greatlivinghomes.**buildflow.Email$1.run(Email.**java:42) > at java.lang.Thread.run(Unknown Source) > Caused by: org.h2.jdbc.JdbcSQLException: General error: > "java.lang.**NullPointerException" > [50000-170] > at org.h2.message.DbException.**getJdbcSQLException(** > DbException.java:329) > at org.h2.message.DbException.**get(DbException.java:158) > at org.h2.message.DbException.**convert(DbException.java:281) > at org.h2.message.DbException.**toSQLException(DbException.**java:254) > at org.h2.message.TraceObject.**logAndConvert(TraceObject.**java:368) > at org.h2.jdbc.JdbcResultSet.**getString(JdbcResultSet.java:**277) > at org.jooq.impl.FieldTypeHelper.**getFromResultSet(** > FieldTypeHelper.java:455) > at org.jooq.impl.FieldTypeHelper.**getFromResultSet(** > FieldTypeHelper.java:392) > at org.jooq.impl.CursorImpl$**CursorIterator.setValue(** > CursorImpl.java:1298) > at org.jooq.impl.CursorImpl$**CursorIterator.fetch(** > CursorImpl.java:1272) > ... 14 more > Caused by: java.lang.NullPointerException > at org.h2.value.ValueLobDb.**getInputStream(ValueLobDb.**java:293) > at org.h2.value.ValueLobDb.**getReader(ValueLobDb.java:279) > at org.h2.value.ValueLobDb.**getString(ValueLobDb.java:200) > at org.h2.jdbc.JdbcResultSet.**getString(JdbcResultSet.java:**275) > ... 18 more > > -- > You received this message because you are subscribed to the Google Groups > "H2 Database" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to h2-database+unsubscribe@** > googlegroups.com <h2-database%[email protected]>. > For more options, visit this group at http://groups.google.com/** > group/h2-database?hl=en <http://groups.google.com/group/h2-database?hl=en> > . > > -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/h2-database?hl=en.
