Thread: question

question

From
"Erwin Dwight V. Ruiz"
Date:
hello, i'm new to JDBC and i was trying to follow the instructions
on how to configure the postgresql jdbc driver on java. i'm using
j2sdk1.4.0 and i'm using j2re1.4.0. i was testing the connectivity of Java
to my Postgresql Server and it was able to connect successfully. The
problem is when I try to add the SQL statement below
       Statement st = con.createStatement();
       ResultSet rs = st.executeQuery("SELECT empno FROM personal ");
it generates this error:
     java.lang.NoSuchMethodError: java/sql/Statement.getResultSetConcurrency()I
        at org.postgresql.jdbc2.Connection.getResultSet(Connection.java:216)
        at org.postgresql.core.QueryExecutor.execute(QueryExecutor.java:121)
        at org.postgresql.Connection.ExecSQL(Connection.java:398)
        at org.postgresql.jdbc2.Statement.execute(Statement.java:130)
        at org.postgresql.jdbc2.Statement.executeQuery(Statement.java:54)
        at PGTest.main(PGTest.java:22)
 can you please tell me what could have been wrong. any help
 would be greatly appreciated.



Re: question

From
Pat Francis-Lyon
Date:
Hi Erwin,

This is from the java docs:
"NOTE: Code that uses API marked "Since 1.2" must be run using a JDBC
technology driver that implements the JDBC 2.0 core API. Check your driver
documentation to be sure that it implements the particular features you want
to use."

As Statement.getResultSetConcurrency() is marked "Since 1.2", could this be
your problem?

Good luck,
Pat

-----Original Message-----
From: Erwin Dwight V. Ruiz [mailto:eruiz@asti.dost.gov.ph]
Sent: Wednesday, July 17, 2002 1:29 AM
To: pgsql-jdbc@postgresql.org
Subject: [JDBC] question



hello, i'm new to JDBC and i was trying to follow the instructions
on how to configure the postgresql jdbc driver on java. i'm using
j2sdk1.4.0 and i'm using j2re1.4.0. i was testing the connectivity of Java
to my Postgresql Server and it was able to connect successfully. The
problem is when I try to add the SQL statement below
       Statement st = con.createStatement();
       ResultSet rs = st.executeQuery("SELECT empno FROM personal ");
it generates this error:
     java.lang.NoSuchMethodError:
java/sql/Statement.getResultSetConcurrency()I
        at org.postgresql.jdbc2.Connection.getResultSet(Connection.java:216)
        at org.postgresql.core.QueryExecutor.execute(QueryExecutor.java:121)
        at org.postgresql.Connection.ExecSQL(Connection.java:398)
        at org.postgresql.jdbc2.Statement.execute(Statement.java:130)
        at org.postgresql.jdbc2.Statement.executeQuery(Statement.java:54)
        at PGTest.main(PGTest.java:22)
 can you please tell me what could have been wrong. any help
 would be greatly appreciated.



---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Re: question

From
Dave Cramer
Date:
Just out of curiosity, what version of postgres are you using?

Dave
On Wed, 2002-07-17 at 04:29, Erwin Dwight V. Ruiz wrote:
>
> hello, i'm new to JDBC and i was trying to follow the instructions
> on how to configure the postgresql jdbc driver on java. i'm using
> j2sdk1.4.0 and i'm using j2re1.4.0. i was testing the connectivity of Java
> to my Postgresql Server and it was able to connect successfully. The
> problem is when I try to add the SQL statement below
>        Statement st = con.createStatement();
>        ResultSet rs = st.executeQuery("SELECT empno FROM personal ");
> it generates this error:
>      java.lang.NoSuchMethodError: java/sql/Statement.getResultSetConcurrency()I
>         at org.postgresql.jdbc2.Connection.getResultSet(Connection.java:216)
>         at org.postgresql.core.QueryExecutor.execute(QueryExecutor.java:121)
>         at org.postgresql.Connection.ExecSQL(Connection.java:398)
>         at org.postgresql.jdbc2.Statement.execute(Statement.java:130)
>         at org.postgresql.jdbc2.Statement.executeQuery(Statement.java:54)
>         at PGTest.main(PGTest.java:22)
>  can you please tell me what could have been wrong. any help
>  would be greatly appreciated.
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
>
>




Re: question

From
Barry Lind
Date:
Are you sure you are running under 1.4?  It really looks like you are
runing a jdbc1 (i.e. jdk 1.1) version of the sun core java.sql library
(the method java.sql.Statement.getResultSetConcurrency() was added in
jdk1.2 (i.e. jdbc2)).  If you are running 1.4, are you sure you don't
have a jdk1.1 set of jars in your classpath that are getting picked up
before the 1.4 ones?

thanks,
--Barry

Erwin Dwight V. Ruiz wrote:

 >hello, i'm new to JDBC and i was trying to follow the instructions
 >on how to configure the postgresql jdbc driver on java. i'm using
 >j2sdk1.4.0 and i'm using j2re1.4.0. i was testing the connectivity of
Java
 >to my Postgresql Server and it was able to connect successfully. The
 >problem is when I try to add the SQL statement below
 >       Statement st = con.createStatement();
 >       ResultSet rs = st.executeQuery("SELECT empno FROM personal ");
 >it generates this error:
 >     java.lang.NoSuchMethodError:
java/sql/Statement.getResultSetConcurrency()I
 >        at
org.postgresql.jdbc2.Connection.getResultSet(Connection.java:216)
 >        at
org.postgresql.core.QueryExecutor.execute(QueryExecutor.java:121)
 >        at org.postgresql.Connection.ExecSQL(Connection.java:398)
 >        at org.postgresql.jdbc2.Statement.execute(Statement.java:130)
 >        at org.postgresql.jdbc2.Statement.executeQuery(Statement.java:54)
 >        at PGTest.main(PGTest.java:22)
 > can you please tell me what could have been wrong. any help
 > would be greatly appreciated.
 >
 >
 >
 >---------------------------(end of broadcast)---------------------------
 >TIP 4: Don't 'kill -9' the postmaster
 >
 >
 >




Re: question

From
"Erwin Dwight V. Ruiz"
Date:
i've downloaded a newer version of java and it is
now working. thanks for your help.

On Wed, 17 Jul 2002, Barry Lind wrote:

> Are you sure you are running under 1.4?  It really looks like you are
> runing a jdbc1 (i.e. jdk 1.1) version of the sun core java.sql library
> (the method java.sql.Statement.getResultSetConcurrency() was added in
> jdk1.2 (i.e. jdbc2)).  If you are running 1.4, are you sure you don't
> have a jdk1.1 set of jars in your classpath that are getting picked up
> before the 1.4 ones?
>
> thanks,
> --Barry
>
> Erwin Dwight V. Ruiz wrote:
>
>  >hello, i'm new to JDBC and i was trying to follow the instructions
>  >on how to configure the postgresql jdbc driver on java. i'm using
>  >j2sdk1.4.0 and i'm using j2re1.4.0. i was testing the connectivity of
> Java
>  >to my Postgresql Server and it was able to connect successfully. The
>  >problem is when I try to add the SQL statement below
>  >       Statement st = con.createStatement();
>  >       ResultSet rs = st.executeQuery("SELECT empno FROM personal ");
>  >it generates this error:
>  >     java.lang.NoSuchMethodError:
> java/sql/Statement.getResultSetConcurrency()I
>  >        at
> org.postgresql.jdbc2.Connection.getResultSet(Connection.java:216)
>  >        at
> org.postgresql.core.QueryExecutor.execute(QueryExecutor.java:121)
>  >        at org.postgresql.Connection.ExecSQL(Connection.java:398)
>  >        at org.postgresql.jdbc2.Statement.execute(Statement.java:130)
>  >        at org.postgresql.jdbc2.Statement.executeQuery(Statement.java:54)
>  >        at PGTest.main(PGTest.java:22)
>  > can you please tell me what could have been wrong. any help
>  > would be greatly appreciated.
>  >
>  >
>  >
>  >---------------------------(end of broadcast)---------------------------
>  >TIP 4: Don't 'kill -9' the postmaster
>  >
>  >
>  >
>
>
>
>

--



Re: question

From
"Erwin Dwight V. Ruiz"
Date:
i'm using postgresql version 7.1.3.

On 17 Jul 2002, Dave Cramer wrote:

> Just out of curiosity, what version of postgres are you using?
>
> Dave
> On Wed, 2002-07-17 at 04:29, Erwin Dwight V. Ruiz wrote:
> >
> > hello, i'm new to JDBC and i was trying to follow the instructions
> > on how to configure the postgresql jdbc driver on java. i'm using
> > j2sdk1.4.0 and i'm using j2re1.4.0. i was testing the connectivity of Java
> > to my Postgresql Server and it was able to connect successfully. The
> > problem is when I try to add the SQL statement below
> >        Statement st = con.createStatement();
> >        ResultSet rs = st.executeQuery("SELECT empno FROM personal ");
> > it generates this error:
> >      java.lang.NoSuchMethodError: java/sql/Statement.getResultSetConcurrency()I
> >         at org.postgresql.jdbc2.Connection.getResultSet(Connection.java:216)
> >         at org.postgresql.core.QueryExecutor.execute(QueryExecutor.java:121)
> >         at org.postgresql.Connection.ExecSQL(Connection.java:398)
> >         at org.postgresql.jdbc2.Statement.execute(Statement.java:130)
> >         at org.postgresql.jdbc2.Statement.executeQuery(Statement.java:54)
> >         at PGTest.main(PGTest.java:22)
> >  can you please tell me what could have been wrong. any help
> >  would be greatly appreciated.
> >
> >
> >
> > ---------------------------(end of broadcast)---------------------------
> > TIP 4: Don't 'kill -9' the postmaster
> >
> >
>
>
>
>

--