Thread: Trouble with 7.1.2 JDBC driver

Trouble with 7.1.2 JDBC driver

From
Nelson Ferreira Jr
Date:
   Hi,

   I have some troubles with Postgre's JDBC driver, version 7.1.2.
First, I was not able to build the driver because it always tries to
compile the version for the Enterprise Edition Java Virtual Machines,
although I only have a Standard Edition instaled in my computer (a Red Hat
7.0 linux box).
   I could only compile it when I manually edited the  build.xml file, so
it right guessed the version of my Java VM.
   I thought I was done when the driver worked for the first time, but
sometime later I realized that the BLOBs I've imported from a Postgres
7.0.3 (using a java program and LargeObjectManager API) were all corrupt!
All BLOBs have only 19 bytes!
   I tested it with a  servlet  that runs fine with 7.0.3, and it just
thrown a NullPointerException somewhere (I couldn't check where exactly it
happens yet). After, I put the servlet to run with the old 7.0 JDBC
driver, but connectiong with postgres 7.1.2, and it worked fine
(ooops... not so fine, the BLOBs were all corrupt!)
   Is there any trouble with the JDBC driver that comes with 7.1.2 ?  Or
maybe something got wrong when I edited build.xml ?


                                          Any Ideas ?



Re: Trouble with 7.1.2 JDBC driver

From
"Dave Cramer"
Date:
I think this is a known bug. If you get the sources from cvs this bug s/b
fixed

Dave
----- Original Message -----
From: "Nelson Ferreira Jr" <nelson@radix.com.br>
To: <pgsql-interfaces@postgresql.org>; <pgsql-jdbc@postgresql.org>
Sent: Thursday, June 14, 2001 8:37 AM
Subject: [JDBC] Trouble with 7.1.2 JDBC driver


>
>    Hi,
>
>    I have some troubles with Postgre's JDBC driver, version 7.1.2.
> First, I was not able to build the driver because it always tries to
> compile the version for the Enterprise Edition Java Virtual Machines,
> although I only have a Standard Edition instaled in my computer (a Red Hat
> 7.0 linux box).
>    I could only compile it when I manually edited the  build.xml file, so
> it right guessed the version of my Java VM.
>    I thought I was done when the driver worked for the first time, but
> sometime later I realized that the BLOBs I've imported from a Postgres
> 7.0.3 (using a java program and LargeObjectManager API) were all corrupt!
> All BLOBs have only 19 bytes!
>    I tested it with a  servlet  that runs fine with 7.0.3, and it just
> thrown a NullPointerException somewhere (I couldn't check where exactly it
> happens yet). After, I put the servlet to run with the old 7.0 JDBC
> driver, but connectiong with postgres 7.1.2, and it worked fine
> (ooops... not so fine, the BLOBs were all corrupt!)
>    Is there any trouble with the JDBC driver that comes with 7.1.2 ?  Or
> maybe something got wrong when I edited build.xml ?
>
>
>                                           Any Ideas ?
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
>
>


Re: Trouble with 7.1.2 JDBC driver

From
Nelson Ferreira Jr
Date:
    Solved!

    I've downloaded the latest code from CVS and tried to build, and it
failed again! So I received Jerry's mail and realized that the Oracle's
JDBC driver was on my CLASSPATH...  just removed it and the build was
successful. I think ANT should be smarter when tring to guess which java
VM is installed.
    Also, I could now load all my BLOB data into the 7.1.2 database. Now
I'm gonna test the servlet...



                                                 Thank you!

                                                         Nelson


On Thu, 14 Jun 2001, Jerry Asher wrote:
> At 09:37 AM 6/14/01 -0300, you wrote:
>
> >    Hi,
> >
> >    I have some troubles with Postgre's JDBC driver, version 7.1.2.
> >First, I was not able to build the driver because it always tries to
> >compile the version for the Enterprise Edition Java Virtual Machines,
> >although I only have a Standard Edition instaled in my computer (a Red Hat
> >7.0 linux box).
>
> Check your classpath.  When I ran into this problem what I recall
> discovering was that Ant looks for the presence of certain classes to
> determine which version you want built, and I found that when I installed
> Oracle, the Oracle java libraries contain those classes.
>
> Jerry
>
>
> >    I could only compile it when I manually edited the  build.xml file, so
> >it right guessed the version of my Java VM.
> >    I thought I was done when the driver worked for the first time, but
> >sometime later I realized that the BLOBs I've imported from a Postgres
> >7.0.3 (using a java program and LargeObjectManager API) were all corrupt!
> >All BLOBs have only 19 bytes!
> >    I tested it with a  servlet  that runs fine with 7.0.3, and it just
> >thrown a NullPointerException somewhere (I couldn't check where exactly it
> >happens yet). After, I put the servlet to run with the old 7.0 JDBC
> >driver, but connectiong with postgres 7.1.2, and it worked fine
> >(ooops... not so fine, the BLOBs were all corrupt!)
> >    Is there any trouble with the JDBC driver that comes with 7.1.2 ?  Or
> >maybe something got wrong when I edited build.xml ?
>
> =====================================================
> Jerry Asher                       jerry@hollyjerry.org
> 1678 Shattuck Avenue Suite 161    Tel: (510) 549-2980
> Berkeley, CA 94709                Fax: (877) 311-8688
>
>

--
Nelson Ferreira Jr
Adm Banco de Dados
Grupo Radix
Tel: (55 81) 3271-6332
nelson@radix.com.br
www.radix.com.br


Re: Trouble with 7.1.2 JDBC driver

From
Bruce Momjian
Date:
>     Also, I could now load all my BLOB data into the 7.1.2 database. Now
> I'm gonna test the servlet...

Yes, Blobs were fixed in post 7.1.X too.

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026