Re: java.lang.NegativeArraySizeException at org.postgresql.jdbc1.AbstractJdbc1Statement.setBinaryStream() - Mailing list pgsql-jdbc

From Frederic Thomas
Subject Re: java.lang.NegativeArraySizeException at org.postgresql.jdbc1.AbstractJdbc1Statement.setBinaryStream()
Date
Msg-id NMENLJGHCHNAEDIPODIEOEAEKLAA.frederic@instranet.com
Whole thread Raw
In response to Re: java.lang.NegativeArraySizeException at  (Kris Jurka <books@ejurka.com>)
List pgsql-jdbc
Kris, following your remark regarding setBinaryStream() I revisited the code
around this, and finally used setCharacterStream() which not only solved my
problem with PostgreSQL jdbc driver in 7.3, but also allow me to cleanup our
code a little bit. So, once again, thanks for your help.

Frederic Thomas.

-----Original Message-----
From: Kris Jurka [mailto:books@ejurka.com]
Sent: mardi 18 novembre 2003 10:06
To: Frederic Thomas
Cc: pgsql-jdbc@postgresql.org
Subject: RE: [JDBC] java.lang.NegativeArraySizeException at
org.postgresql.jdbc1.AbstractJdbc1Statement.setBinaryStream()




On Tue, 18 Nov 2003, Frederic Thomas wrote:

> > In any case the driver shouldn't throw an Exception like that.  Here's a
> > patch that fixes that.
> Glad to see that it wasn't a serious problem. Thanks a lot for the patch.
> However, is there a way to retrieve only the source code for the
> pg73jdbc2.jar driver, by opposition to the whole product source code?

You can retrieve just the 7.3 jdbc driver like so:

cvs -d :pserver:anoncvs@anoncvs.postgresql.org:/projects/cvsroot login

give anything but an empty string for a password and

cvs -d :pserver:anoncvs@anoncvs.postgresql.org:/projects/cvsroot co -r
REL7_3_STABLE server/src/interfaces/jdbc

but you won't be able to build it without hacking the Makefile (because it
wants to include a global Makefile that gets created by the main source
tree's configure process).

> An additional question: do you know if a new binary version of the 7.3
> driver will be available sometimes? I'd like to avoid compiling in a "non
> professional" way a driver that I will ship to my customers, and would
> prefer to rely on the "official" binary release of it.

I don't know if a new 7.3 binary will be released.  Barry Lind is in
charge of that.  Generally speaking fixes don't get backpatched to older
versions.  With 7.4 being released yesterday I imagine fixes will only go
into cvs head and the 7.4 branch.  On the other hand there has been talk
of putting out a 7.3.5 release and if that happens this fix should
probably go into that, but that's not my call.

Kris Jurka




pgsql-jdbc by date:

Previous
From: Kris Jurka
Date:
Subject: Re: java.lang.NegativeArraySizeException at
Next
From: "Carlos Ho Shih Ning"
Date:
Subject: problem connecting from JDBC: not over