I think I can more or less reproduce the problem. It [sometimes, ~10%] 
happens when I load a fairly complex Hibernate-wired object 2 times with 
very low delay between loads (sub 50ms).

On the 2d read I managed to break at #291 of ValueLobDb.java when 
lobStorage==null. "this" dump:


   - this = {org.h2.value.ValueLobDb@9968}"lob: null table: -1 id: 158" 
   - type = 16 
   - precision = 1670 
   - tableId = -1 
   - hash = 0 
   - lobStorage = null 
   - lobId = 158 
   - hmac = null 
   - small = null 
   - handler = null 
   - tempFile = null 
   - fileName = null 

I'll keep you posted.

On Tuesday, November 13, 2012 9:12:52 PM UTC+2, Thomas Mueller wrote:
>
> Hi,
>
> It seems the CLOB is closed, but I'm not sure why that would be, because 
> the result set is still open it seems. I'm afraid I don't know what could 
> be the problem in this case.
>
> Regards,
> Thomas
>
>
> On Tue, Nov 13, 2012 at 4:50 PM, Nick99 <nail.a...@gmail.com <javascript:>
> > wrote:
>
>> hi,
>>
>> I think I bumped into a similar bug. I have a multithreaded app; an 
>> instance of some class is updated; then it is loaded and an NPE is thrown 
>> by H2. I use #169, Windows 7, NTFS.
>>
>> I cannot provide a test case at the moment; nor can I reproduce it again.
>>
>> Could you please look what can be wrong?
>>
>> Thank you.
>>
>>
>> Appendix 1
>> database.driverclass=org.h2.Driver
>>
>> database.url=jdbc\:h2\:userdata/db/product01;MVCC\=TRUE;MULTI_THREADED\=0;LOCK_MODE\=3;LOCK_TIMEOUT\=20000
>> database.dialect=org.hibernate.dialect.H2Dialect
>> database.usr=
>> database.pass=
>>
>>
>> Appendix 2
>> 2012-11-12 13:01:53,412 [err] 
>> org.hibernate.exception.GenericJDBCException: could not load an entity: 
>> [com.company.product.Instance#1]
>> [...]
>> 2012-11-12 13:01:53,412 [err] Caused by: org.h2.jdbc.JdbcSQLException: 
>> General error: "java.lang.NullPointerException" [50000-169]
>> 2012-11-12 13:01:53,412 [err] at 
>> org.h2.message.DbException.getJdbcSQLException(DbException.java:329)
>> 2012-11-12 13:01:53,412 [err] at 
>> org.h2.message.DbException.get(DbException.java:158)
>> 2012-11-12 13:01:53,412 [err] at 
>> org.h2.message.DbException.convert(DbException.java:281)
>> 2012-11-12 13:01:53,412 [err] at 
>> org.h2.message.DbException.toSQLException(DbException.java:254)
>> 2012-11-12 13:01:53,412 [err] at 
>> org.h2.message.TraceObject.logAndConvert(TraceObject.java:368)
>> 2012-11-12 13:01:53,412 [err] at 
>> org.h2.jdbc.JdbcResultSet.getString(JdbcResultSet.java:293)
>> 2012-11-12 13:01:53,412 [err] at 
>> com.mchange.v2.c3p0.impl.NewProxyResultSet.getString(NewProxyResultSet.java:3342)
>> 2012-11-12 13:01:53,412 [err] at 
>> org.hibernate.type.descriptor.sql.VarcharTypeDescriptor$2.doExtract(VarcharTypeDescriptor.java:61)
>> 2012-11-12 13:01:53,412 [err] at 
>> org.hibernate.type.descriptor.sql.BasicExtractor.extract(BasicExtractor.java:64)
>> 2012-11-12 13:01:53,412 [err] at 
>> org.hibernate.type.AbstractStandardBasicType.nullSafeGet(AbstractStandardBasicType.java:254)
>> 2012-11-12 13:01:53,412 [err] at 
>> org.hibernate.type.AbstractStandardBasicType.nullSafeGet(AbstractStandardBasicType.java:250)
>> 2012-11-12 13:01:53,412 [err] at 
>> org.hibernate.type.AbstractStandardBasicType.nullSafeGet(AbstractStandardBasicType.java:230)
>> 2012-11-12 13:01:53,412 [err] at 
>> org.hibernate.type.AbstractStandardBasicType.hydrate(AbstractStandardBasicType.java:331)
>> 2012-11-12 13:01:53,412 [err] at 
>> org.hibernate.persister.entity.AbstractEntityPersister.hydrate(AbstractEntityPersister.java:2283)
>> 2012-11-12 13:01:53,412 [err] at 
>> org.hibernate.loader.Loader.loadFromResultSet(Loader.java:1527)
>> 2012-11-12 13:01:53,412 [err] at 
>> org.hibernate.loader.Loader.instanceNotYetLoaded(Loader.java:1455)
>> 2012-11-12 13:01:53,412 [err] at 
>> org.hibernate.loader.Loader.getRow(Loader.java:1355)
>> 2012-11-12 13:01:53,412 [err] at 
>> org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:611)
>> 2012-11-12 13:01:53,412 [err] at 
>> org.hibernate.loader.Loader.doQuery(Loader.java:829)
>> 2012-11-12 13:01:53,412 [err] at 
>> org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:274)
>> 2012-11-12 13:01:53,412 [err] at 
>> org.hibernate.loader.Loader.loadEntity(Loader.java:2037)
>> 2012-11-12 13:01:53,412 [err] ... 54 more
>> 2012-11-12 13:01:53,412 [err] Caused by: java.lang.NullPointerException
>> 2012-11-12 13:01:53,412 [err] at 
>> org.h2.value.ValueLobDb.getInputStream(ValueLobDb.java:291)
>> 2012-11-12 13:01:53,412 [err] at 
>> org.h2.value.ValueLobDb.getReader(ValueLobDb.java:277)
>> 2012-11-12 13:01:53,412 [err] at 
>> org.h2.value.ValueLobDb.getString(ValueLobDb.java:198)
>> 2012-11-12 13:01:53,412 [err] at 
>> org.h2.jdbc.JdbcResultSet.getString(JdbcResultSet.java:291)
>> 2012-11-12 13:01:53,412 [err] ... 69 more
>>
>>
>>  -- 
>> You received this message because you are subscribed to the Google Groups 
>> "H2 Database" group.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msg/h2-database/-/SUnfsf55Dk0J.
>>
>> To post to this group, send email to h2-da...@googlegroups.com<javascript:>
>> .
>> To unsubscribe from this group, send email to 
>> h2-database...@googlegroups.com <javascript:>.
>> For more options, visit this group at 
>> 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 view this discussion on the web visit 
https://groups.google.com/d/msg/h2-database/-/TkSzXucEkGoJ.
To post to this group, send email to h2-database@googlegroups.com.
To unsubscribe from this group, send email to 
h2-database+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/h2-database?hl=en.

Reply via email to