Re: Problems with getLastOID (updated, it now compiles) - Mailing list pgsql-jdbc

From first last
Subject Re: Problems with getLastOID (updated, it now compiles)
Date
Msg-id 20030220160733.98083.qmail@web10306.mail.yahoo.com
Whole thread Raw
In response to Re: Problems with getLastOID  (Dave Cramer <Dave@micro-automation.net>)
Responses Re: Problems with getLastOID (updated, it now compiles)  (Dave Cramer <Dave@micro-automation.net>)
List pgsql-jdbc
Thanks, I already tried that too.

I changed my CLASSPATH to include the jdbc jar first and I got it to
compile with org.postgresql.ResultSet but now it dies when I try to run
it with:

Connecting to Database URL = jdbc:postgresql:back_office
Connected...Now creating a statement

Running tests:
Exception caught.
java.lang.ClassCastException: org.postgresql.jdbc2.Statement
java.lang.ClassCastException: org.postgresql.jdbc2.Statement
        at basic.doexample(basic.java:91)
        at basic.<init>(basic.java:44)
        at basic.main(basic.java:210)

which makes me think that there has to be something wrong with my
setup, as the path you gave me before was jdbc1. It sounds like
somewhere I have some other libraries that conflict with this...

I will keep on trying...

 --- Dave Cramer <Dave@micro-automation.net> wrote: > Gabriel,
>
> Please not that my reference was to getLastOID(), not
> getInsertedOID()
>
> Dave
> On Thu, 2003-02-20 at 09:28, first last wrote:
> > I have tried and now it can't find
> > org.postgresql.AbstractJdbc1Statement (I tried that one before but
> I
> > forgot to specify the whole path of the class).
> >
> > basic.java:90: cannot resolve symbol
> > symbol: class AbstractJdbc1Statement
> > location: package postgresql
> >                 long insertedOID =
> > ((org.postgresql.AbstractJdbc1Statement)st).getInsertedOID();
> >
> > some more information I forgot before, my CLASSPATH is
> >
> > /usr/local/tomcat/common/lib/servlet.jar
> > :/usr/local/tomcat/shared/classes
> > :/usr/local/tomcat/server/lib/pg73jdbc3.jar
> > :.
> >
> > I have also tried with the pg72jdbc2.jar driver and both give me
> the
> > same error.
> >
> > JAVA_HOME=/usr/local/java (which links to /usr/local/j2sdk1.4.1). I
> > also have
> > CATALINA_HOME as I am using tomcat (that's why the jdbc jar is in
> that
> > directory).
> >
> > Any more ideas?
> >
> > Thanks
> >
> > Gabriel
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Everything you'll ever need on one web page
> > from News and Sport to Email and Music Charts
> > http://uk.my.yahoo.com
> >
> > ---------------------------(end of
> broadcast)---------------------------
> > TIP 4: Don't 'kill -9' the postmaster
> --
> Dave Cramer <Dave@micro-automation.net>
>

__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

pgsql-jdbc by date:

Previous
From: Dave Cramer
Date:
Subject: Re: Problems with getLastOID
Next
From: Dave Cramer
Date:
Subject: Re: Problems with getLastOID (updated, it now compiles)