Re: Problems with getLastOID (updated, it now compiles)
От | Dave Cramer |
---|---|
Тема | Re: Problems with getLastOID (updated, it now compiles) |
Дата | |
Msg-id | 1045757525.1129.82.camel@inspiron.cramers обсуждение исходный текст |
Ответ на | Re: Problems with getLastOID (updated, it now compiles) (first last <prelude_2_murder@yahoo.co.uk>) |
Список | pgsql-jdbc |
Cast it to that, it should work, ie org.postgresql.jdbc2.Statement Dave On Thu, 2003-02-20 at 11:07, first last wrote: > 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 -- Dave Cramer <Dave@micro-automation.net>
В списке pgsql-jdbc по дате отправления: