Hello Thomas,

Since this is my first post I would like to congratulate you for your
excellent work
and hope to see commercial support offerings soon.

Now to the point, I was testing out the new property h2.lobInDatabase.
After enabling and adding some blobs successfully, when I try to query
the objects through JPA (Hibernate) I got the following exception:

Caused by: javax.persistence.PersistenceException:
org.hibernate.exception.GenericJDBCException: could not execute query
        at
org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:
1235)
        at
org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:
1168)
        at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:250)
        at
com.vis.core.module.persist.JpaFormSaveBroker.getSubmits(JpaFormSaveBroker.java:
185)
        ... 16 more
Caused by: org.hibernate.exception.GenericJDBCException: could not
execute query
        at
org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:
140)
        at
org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:
128)
        at
org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:
66)
        at org.hibernate.loader.Loader.doList(Loader.java:2297)
        at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2172)
        at org.hibernate.loader.Loader.list(Loader.java:2167)
        at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:448)
        at
org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:
363)
        at
org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:
196)
        at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1258)
        at org.hibernate.impl.QueryImpl.list(QueryImpl.java:102)
        at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:241)
        ... 17 more
Caused by: org.h2.jdbc.JdbcSQLException: General error:
"java.lang.NullPointerException" [50000-135]
        at org.h2.message.DbException.getJdbcSQLException(DbException.java:
327)
        at org.h2.message.DbException.get(DbException.java:156)
        at org.h2.message.DbException.convert(DbException.java:279)
        at org.h2.message.DbException.toSQLException(DbException.java:252)
        at org.h2.message.TraceObject.logAndConvert(TraceObject.java:387)
        at org.h2.jdbc.JdbcResultSet.getBytes(JdbcResultSet.java:988)
        at org.hibernate.type.AbstractBynaryType.get(AbstractBynaryType.java:
103)
        at org.hibernate.type.NullableType.nullSafeGet(NullableType.java:186)
        at org.hibernate.type.NullableType.nullSafeGet(NullableType.java:175)
        at org.hibernate.type.AbstractType.hydrate(AbstractType.java:105)
        at
org.hibernate.persister.entity.AbstractEntityPersister.hydrate(AbstractEntityPersister.java:
2267)
        at org.hibernate.loader.Loader.loadFromResultSet(Loader.java:1423)
        at org.hibernate.loader.Loader.instanceNotYetLoaded(Loader.java:1351)
        at org.hibernate.loader.Loader.getRow(Loader.java:1251)
        at org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:619)
        at org.hibernate.loader.Loader.doQuery(Loader.java:745)
        at
org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:
270)
        at org.hibernate.loader.Loader.doList(Loader.java:2294)
        ... 25 more
Caused by: java.lang.NullPointerException
        at org.h2.store.LobStorage$LobInputStream.<init>(LobStorage.java:171)
        at org.h2.store.LobStorage.getInputStream(LobStorage.java:300)
        at org.h2.value.ValueLobDb.getInputStream(ValueLobDb.java:271)
        at org.h2.value.ValueLobDb.getBytesNoCopy(ValueLobDb.java:220)
        at org.h2.value.ValueLobDb.getBytes(ValueLobDb.java:207)
        at org.h2.jdbc.JdbcResultSet.getBytes(JdbcResultSet.java:986)
        ... 37 more


Best regards,
Panayiotis Vlissidis

-- 
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.

Reply via email to