Re: NPE in BlobInputStream

From: Kris Jurka <books(at)ejurka(dot)com>
To: matrixx <matrixx(at)freenet(dot)de>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: NPE in BlobInputStream
Date: 2007-02-19 18:37:04
Message-ID: Pine.BSO.4.64.0702191336050.17040@leary.csoft.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

On Sun, 26 Nov 2006, Kris Jurka wrote:

> On Fri, 24 Nov 2006, matrixx wrote:
>
>> im using the postgresql-8.1-407.jdbc3.jar driver over hibernate 3 to access
>> databases.
>>
>> Our application currently runs with mysql and mssql drivers without any
>> problems. With the postgresql driver i get the following exception:
>>
>> [ModuleProfile(dot)deserialize(at)AWT-EventQueue-0] ERROR: Error deserializing
>> blob.
>> java.lang.NullPointerException
>> at
>> org.postgresql.largeobject.BlobInputStream.close(BlobInputStream.java:115)
>> at java.beans.XMLDecoder.close(XMLDecoder.java:152)
>> ...
>>
>> I dont know if its a driver bug, or a hibernate issue.
>>
>
> It's a driver bug that's caused by one of two possible issues. It's
> impossible to tell which from this stacktrace alone.
>
> 1) The BlobInputStream is violating the contract of the close method that
> allows you to call it more than once.
>
> 2) You've called getInputStream more than once on a Blob and it can't handle
> two streams simultaneously.
>

I've applied a more complete fix for these issues to CVS HEAD.

Kris Jurka

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Robert Spies 2007-02-19 22:46:09 unsubscribe
Previous Message Guillaume Smet 2007-02-19 15:30:21 Re: Logging failed sql commands trough jdbc?