Re: Problems with getLastOID (updated, it now compiles)

From: first last <prelude_2_murder(at)yahoo(dot)co(dot)uk>
To: Dave Cramer <Dave(at)micro-automation(dot)net>
Cc: "pgsql-jdbc(at)postgresql(dot)org" <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: Problems with getLastOID (updated, it now compiles)
Date: 2003-02-20 16:07:33
Message-ID: 20030220160733.98083.qmail@web10306.mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)micro-automation(dot)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(at)micro-automation(dot)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

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Dave Cramer 2003-02-20 16:12:05 Re: Problems with getLastOID (updated, it now compiles)
Previous Message Csaba Nagy 2003-02-20 15:47:22 Re: ANY subquery and PreparedStatements