Thread: strange error

strange error

From
# sriram #
Date:
Hi all....

    I am running a small jdbc program and i get an error like this...


[sriram@nmlinux2 sriram]$ java jdbc
Internal error: caught an unexpected exception.
Please check your CLASSPATH and your installation.
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 jdbc.main(jdbc.java:18)
Aborted


i am able to connect to the database with ease.
my jdbc:18 is the line PreparedStatement ps=con.prepareStatement("SELECT.....");

what could be the error or where should i ammend my code


thanks



Re: strange error

From
# sriram #
Date:
i am using j2sdk1.3.1 and downloaded postgresql.jar from the specified site which said drivers for jdk1.2+

when i did check the logs i found one of the lines going "pg_recvbuf : client closed connection"

FYI when i try a stmt.executeUpdate on an insert to table it works and then i get this whole dump of errors...

am pretty new to this post and i believe there is no such error in the archives also..

F1 F1 F1



On Fri, 22 Feb 2002, Joe Shevland wrote:

!Sounds like the JVM you are using is pre-JDBC 2.0... are you using a 1.1.8
!version of the JRE/JDK?
!
!Upgrading to {1.2.x|1.3.x|1.4.0) should fix this problem. Alternatively,
!download the PostgreSQL JAR driver for 1.1.x should work also.
!
!Cheers,
!Joe
!
!>     I am running a small jdbc program and i get an error like this...
!>
!>
!> [sriram@nmlinux2 sriram]$ java jdbc
!> Internal error: caught an unexpected exception.
!> Please check your CLASSPATH and your installation.
!> java/lang/NoSuchMethodError:
!java/sql/Statement.getResultSetConcurrency()I
!

-----------------
rm -rf /bin/laden
-----------------


Re: strange error

From
"Nick Fankhauser"
Date:
Although it sounds like you have matched up the correct versions of the jvm
& jdbc driver, the error message still seems to point to a problem in you
environment rather than your code. Please give us some more details on your
platform, such as the source of the jvm (Sun/IBM/blackdown/Jikes, etc...)
and versions & sources of anything else you can think of that might be
relevant.

-NickF


> i am using j2sdk1.3.1 and downloaded postgresql.jar from the
> specified site which said drivers for jdk1.2+

> !> Internal error: caught an unexpected exception.
> !> Please check your CLASSPATH and your installation.
> !> java/lang/NoSuchMethodError:
> !java/sql/Statement.getResultSetConcurrency()I
> !


Re: strange error

From
"Joe Shevland"
Date:
Sounds like the JVM you are using is pre-JDBC 2.0... are you using a 1.1.8
version of the JRE/JDK?

Upgrading to {1.2.x|1.3.x|1.4.0) should fix this problem. Alternatively,
download the PostgreSQL JAR driver for 1.1.x should work also.

Cheers,
Joe

>     I am running a small jdbc program and i get an error like this...
>
>
> [sriram@nmlinux2 sriram]$ java jdbc
> Internal error: caught an unexpected exception.
> Please check your CLASSPATH and your installation.
> java/lang/NoSuchMethodError:
java/sql/Statement.getResultSetConcurrency()I

Attachment

Re: strange error

From
Barry Lind
Date:
It looks like you are calling a jdbc2 method but using the jdbc1 version
of the driver.  getResultSetConcurrency() is a method added in jdbc2.

--Barry


# sriram # wrote:
> Hi all....
>
>     I am running a small jdbc program and i get an error like this...
>
>
> [sriram@nmlinux2 sriram]$ java jdbc
> Internal error: caught an unexpected exception.
> Please check your CLASSPATH and your installation.
> 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 jdbc.main(jdbc.java:18)
> Aborted
>
>
> i am able to connect to the database with ease.
> my jdbc:18 is the line PreparedStatement ps=con.prepareStatement("SELECT.....");
>
> what could be the error or where should i ammend my code
>
>
> thanks
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
>
>



Re: strange error

From
"Nick Fankhauser"
Date:
Hi-

I'm going to copy your response to the JDBC list, so others can view the
config info.

The snippet of code that you include doesn't appear to specify a database
name in the URL- is it really this way, or is that just from pasting it into
the mail message? If this is an exact copy, maybe we've found your problem.

Nothing in your environment looks like a problem to me. You mention tomcat &
apache, but so far these aren't involved, correct? It looks like you're just
trying to get a plain vanilla connection to the database going.

You mentioned in an earlier post that you got the message "pg_recvbuf :
client closed connection" in one of the logs. Is it possible that you have
some sort of network security software running that might interfere with
tcp/ip socket communication? Even though you're on the same machine, the
communication looks like any other network traffic.

Those are my three best guesses. The first one seems obvious, but doesn't
seem to match the error message, that's why I thought it might just have
gotten copied into the mail wrong.

-NickF



> -----Original Message-----
> From: # sriram # [mailto:sriram@imsc.ernet.in]
> Sent: Friday, February 22, 2002 8:15 AM
> To: Nick Fankhauser
> Subject: RE: [JDBC] strange error
>
>
> ok here we go...
>
> i downloaded the tar archive from sun ....
> and then the postgresql.jar from one of the postgres links...
> i run mdk8 with apache and tomcat servers...
> i use postgresql 7.1 (i believe)
> my classpath is perfect....
> my installation sits in /usr/local
>
> really puzzling ??
>
> may be i will attach the code also...
>
> import java.sql.Connection;
> import java.sql.DriverManager;
> import java.sql.ResultSet;
> import java.sql.Statement;
>
> public class jdbc
> {
>     public static void main(String args[]) throws
> SQLException,ClassNotFoundException
>     {
>     Class.forName("org.postgresql.Driver");
>     Connection
> con=DriverManager.getConnection("jdbc:postgresql://localhost:5432"
> ,"sriram","******");
>     Statement s=con.prepareStatement();
>     s.execute("insert into...................");
>     }
> }
>
> and the host of errors..which i have already included
>
>
>
> On Fri, 22 Feb 2002, Nick Fankhauser wrote:
>
> !Although it sounds like you have matched up the correct versions
> of the jvm
> !& jdbc driver, the error message still seems to point to a problem in you
> !environment rather than your code. Please give us some more
> details on your
> !platform, such as the source of the jvm (Sun/IBM/blackdown/Jikes, etc...)
> !and versions & sources of anything else you can think of that might be
> !relevant.
> !
> !-NickF
> !
> !
> !> i am using j2sdk1.3.1 and downloaded postgresql.jar from the
> !> specified site which said drivers for jdk1.2+
> !
> !> !> Internal error: caught an unexpected exception.
> !> !> Please check your CLASSPATH and your installation.
> !> !> java/lang/NoSuchMethodError:
> !> !java/sql/Statement.getResultSetConcurrency()I
> !> !
> !
> !
>
> -----------------
> rm -rf /bin/laden
> -----------------
>


Re: strange error

From
"Nick Fankhauser"
Date:
Hi-

I'm going to copy your response to the JDBC list, so others can view the
config info. They might have some better ideas.

The snippet of code that you include doesn't appear to specify a database
name in the URL- is it really this way, or is that just from pasting it into
the mail message? If this is an exact copy, maybe we've found your problem.

Nothing in your environment looks like a problem to me. You mention tomcat &
apache, but so far these aren't involved, correct? It looks like you're just
trying to get a plain vanilla connection to the database going.

You mentioned in an earlier post that you got the message "pg_recvbuf :
client closed connection" in one of the logs. Is it possible that you have
some sort of network security software running that might interfere with
tcp/ip socket communication? Even though you're on the same machine, the
communication looks like any other network traffic.

Those are my three best guesses. The first one seems obvious, but doesn't
seem to match the error message, that's why I thought it might just have
gotten copied into the mail wrong.

-NickF



> -----Original Message-----
> From: # sriram # [mailto:sriram@imsc.ernet.in]
> Sent: Friday, February 22, 2002 8:15 AM
> To: Nick Fankhauser
> Subject: RE: [JDBC] strange error
>
>
> ok here we go...
>
> i downloaded the tar archive from sun ....
> and then the postgresql.jar from one of the postgres links...
> i run mdk8 with apache and tomcat servers...
> i use postgresql 7.1 (i believe)
> my classpath is perfect....
> my installation sits in /usr/local
>
> really puzzling ??
>
> may be i will attach the code also...
>
> import java.sql.Connection;
> import java.sql.DriverManager;
> import java.sql.ResultSet;
> import java.sql.Statement;
>
> public class jdbc
> {
>     public static void main(String args[]) throws
> SQLException,ClassNotFoundException
>     {
>     Class.forName("org.postgresql.Driver");
>     Connection
> con=DriverManager.getConnection("jdbc:postgresql://localhost:5432"
> ,"sriram","******");
>     Statement s=con.prepareStatement();
>     s.execute("insert into...................");
>     }
> }
>
> and the host of errors..which i have already included
>
>
>
> On Fri, 22 Feb 2002, Nick Fankhauser wrote:
>
> !Although it sounds like you have matched up the correct versions
> of the jvm
> !& jdbc driver, the error message still seems to point to a problem in you
> !environment rather than your code. Please give us some more
> details on your
> !platform, such as the source of the jvm (Sun/IBM/blackdown/Jikes, etc...)
> !and versions & sources of anything else you can think of that might be
> !relevant.
> !
> !-NickF
> !
> !
> !> i am using j2sdk1.3.1 and downloaded postgresql.jar from the
> !> specified site which said drivers for jdk1.2+
> !
> !> !> Internal error: caught an unexpected exception.
> !> !> Please check your CLASSPATH and your installation.
> !> !> java/lang/NoSuchMethodError:
> !> !java/sql/Statement.getResultSetConcurrency()I
> !> !
> !
> !
>
> -----------------
> rm -rf /bin/laden
> -----------------
>


Re: strange error

From
"Nick Fankhauser"
Date:
I'll copy this to the JDBC list again. (I'd suggest posting all of these to
the list- While I'm happy to try to help, I'm not the most informed person
on the list, so you really need everyone's eyeballs checking these problems
out.)

Here are a few more ideas:


> well....i missed the database...it should read
> jdbc:postgres://localhost:5432/mydb," "," ".....
OK, so that's not the problem.


> i mentioned apache and tomcat...to make matters more simple if someone
> really feels that my jdbc classpath should also be present on the tomcat
> lib directory....i tried that also...(sounds silly though)

Are you running this through a servlet, or just in a standalone application?
I'd suggest trying to debug this with a simple standalone application first
& get tomcat involved once the database issue is resolved.


> i ran netstat --tcp -a -n | grep 5432 and i found just 5432 listening to
> my requests and there are no other clashes...

I think others have experienced disconnects after an initial response due to
some packet filtering, so I'm still curious about whether you have any
network security software running.


> i also tried running postmaster on a different port...but no avail...
> some one mentioned that i am trying to access a jdbc2 statement......
> how far can i go in that direction...


> PS..amazingly mysql also throws the same error ??

I think this is an important clue. I think it points again to another piece
of software interfering.

-NickF







>
>
> On Fri, 22 Feb 2002, Nick Fankhauser wrote:
>
> !Hi-
> !
> !I'm going to copy your response to the JDBC list, so others can view the
> !config info.
> !
> !The snippet of code that you include doesn't appear to specify a database
> !name in the URL- is it really this way, or is that just from
> pasting it into
> !the mail message? If this is an exact copy, maybe we've found
> your problem.
> !
> !Nothing in your environment looks like a problem to me. You
> mention tomcat &
> !apache, but so far these aren't involved, correct? It looks like
> you're just
> !trying to get a plain vanilla connection to the database going.
> !
> !You mentioned in an earlier post that you got the message "pg_recvbuf :
> !client closed connection" in one of the logs. Is it possible
> that you have
> !some sort of network security software running that might interfere with
> !tcp/ip socket communication? Even though you're on the same machine, the
> !communication looks like any other network traffic.
> !
> !Those are my three best guesses. The first one seems obvious, but doesn't
> !seem to match the error message, that's why I thought it might just have
> !gotten copied into the mail wrong.
> !
> !-NickF
> !
> !
> !
> !> -----Original Message-----
> !> From: # sriram # [mailto:sriram@imsc.ernet.in]
> !> Sent: Friday, February 22, 2002 8:15 AM
> !> To: Nick Fankhauser
> !> Subject: RE: [JDBC] strange error
> !>
> !>
> !> ok here we go...
> !>
> !> i downloaded the tar archive from sun ....
> !> and then the postgresql.jar from one of the postgres links...
> !> i run mdk8 with apache and tomcat servers...
> !> i use postgresql 7.1 (i believe)
> !> my classpath is perfect....
> !> my installation sits in /usr/local
> !>
> !> really puzzling ??
> !>
> !> may be i will attach the code also...
> !>
> !> import java.sql.Connection;
> !> import java.sql.DriverManager;
> !> import java.sql.ResultSet;
> !> import java.sql.Statement;
> !>
> !> public class jdbc
> !> {
> !>     public static void main(String args[]) throws
> !> SQLException,ClassNotFoundException
> !>     {
> !>     Class.forName("org.postgresql.Driver");
> !>     Connection
> !> con=DriverManager.getConnection("jdbc:postgresql://localhost:5432"
> !> ,"sriram","******");
> !>     Statement s=con.prepareStatement();
> !>     s.execute("insert into...................");
> !>     }
> !> }
> !>
> !> and the host of errors..which i have already included
> !>
> !>
> !>
> !> On Fri, 22 Feb 2002, Nick Fankhauser wrote:
> !>
> !> !Although it sounds like you have matched up the correct versions
> !> of the jvm
> !> !& jdbc driver, the error message still seems to point to a
> problem in you
> !> !environment rather than your code. Please give us some more
> !> details on your
> !> !platform, such as the source of the jvm
> (Sun/IBM/blackdown/Jikes, etc...)
> !> !and versions & sources of anything else you can think of that might be
> !> !relevant.
> !> !
> !> !-NickF
> !> !
> !> !
> !> !> i am using j2sdk1.3.1 and downloaded postgresql.jar from the
> !> !> specified site which said drivers for jdk1.2+
> !> !
> !> !> !> Internal error: caught an unexpected exception.
> !> !> !> Please check your CLASSPATH and your installation.
> !> !> !> java/lang/NoSuchMethodError:
> !> !> !java/sql/Statement.getResultSetConcurrency()I
> !> !> !
> !> !
> !> !
> !>
> !> -----------------
> !> rm -rf /bin/laden
> !> -----------------
> !>
> !
> !
> !---------------------------(end of broadcast)---------------------------
> !TIP 6: Have you searched our list archives?
> !
> !http://archives.postgresql.org
> !
>
> -----------------
> rm -rf /bin/laden
> -----------------
>


Re: strange error

From
# sriram #
Date:
hi all...in addition to all those errors i could get some more
information...

this is the dump that i get when i run the simplest of jdbc
inserts/selects

helping mails plz...
-------------------------------------------------------------------------------------------
[sriram@nmlinux2 sriram]$ java jdbc
020301.16:00:08.437  [3033] read_pg_options: verbose=2,query=2,syslog=0
020301.16:00:08.440  [3033] started: host=127.0.0.1 user=sriram database=mydb
020301.16:00:08.440  [3033] InitPostgres
020301.16:00:08.818  [3033] reset_client_encoding()..
020301.16:00:08.820  [3033] reset_client_encoding() done.
020301.16:00:08.831  [3033] StartTransactionCommand
020301.16:00:08.831  [3033] query: set datestyle to 'ISO'; select version(), case when pg_encoding_to_char(1)
= 'SQL_ASCII' then 'UNKNOWN' else getdatabaseencoding() end;
020301.16:00:08.974  [3033] ProcessUtility: set datestyle to 'ISO'; select version(), case when
pg_encoding_to_char(1) = 'SQL_ASCII' then 'UNKNOWN' else getdatabaseencoding() end;
020301.16:00:08.996  [3033] ProcessQuery
020301.16:00:09.008  [3033] CommitTransactionCommand
020301.16:00:09.212  [3033] StartTransactionCommand
020301.16:00:09.212  [3033] query: SELECT * FROM TABLE1
020301.16:00:09.301  [3033] ProcessQuery
020301.16:00:09.307  [3033] CommitTransactionCommand
Internal error: caught an unexpected exception.
Please check your CLASSPATH and your installation.
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 jdbc.main(jdbc.java:18)
pq_recvbuf: unexpected EOF on client connection
020301.16:00:09.475  [3033] proc_exit(0)
020301.16:00:09.475  [3033] shmem_exit(0)
020301.16:00:09.475  [3033] exit(0)
Aborted
-------------------------------------------------------------------------------------------
On Tue, 26 Feb 2002, Nick Fankhauser wrote:

!Date: Tue, 26 Feb 2002 07:39:52 -0500
!From: Nick Fankhauser <nickf@ontko.com>
!To: Psql-Jdbc <pgsql-jdbc@postgresql.org>, # sriram # <sriram@imsc.ernet.in>
!Subject: Re: [JDBC] strange error
!
!I'll copy this to the JDBC list again. (I'd suggest posting all of these to
!the list- While I'm happy to try to help, I'm not the most informed person
!on the list, so you really need everyone's eyeballs checking these problems
!out.)
!
!Here are a few more ideas:
!
!
!> well....i missed the database...it should read
!> jdbc:postgres://localhost:5432/mydb," "," ".....
!OK, so that's not the problem.
!
!
!> i mentioned apache and tomcat...to make matters more simple if someone
!> really feels that my jdbc classpath should also be present on the tomcat
!> lib directory....i tried that also...(sounds silly though)
!
!Are you running this through a servlet, or just in a standalone application?
!I'd suggest trying to debug this with a simple standalone application first
!& get tomcat involved once the database issue is resolved.
!
!
!> i ran netstat --tcp -a -n | grep 5432 and i found just 5432 listening to
!> my requests and there are no other clashes...
!
!I think others have experienced disconnects after an initial response due to
!some packet filtering, so I'm still curious about whether you have any
!network security software running.
!
!
!> i also tried running postmaster on a different port...but no avail...
!> some one mentioned that i am trying to access a jdbc2 statement......
!> how far can i go in that direction...
!
!
!> PS..amazingly mysql also throws the same error ??
!
!I think this is an important clue. I think it points again to another piece
!of software interfering.
!
!-NickF
!
!
!
!
!
!
!
!>
!>
!> On Fri, 22 Feb 2002, Nick Fankhauser wrote:
!>
!> !Hi-
!> !
!> !I'm going to copy your response to the JDBC list, so others can view the
!> !config info.
!> !
!> !The snippet of code that you include doesn't appear to specify a database
!> !name in the URL- is it really this way, or is that just from
!> pasting it into
!> !the mail message? If this is an exact copy, maybe we've found
!> your problem.
!> !
!> !Nothing in your environment looks like a problem to me. You
!> mention tomcat &
!> !apache, but so far these aren't involved, correct? It looks like
!> you're just
!> !trying to get a plain vanilla connection to the database going.
!> !
!> !You mentioned in an earlier post that you got the message "pg_recvbuf :
!> !client closed connection" in one of the logs. Is it possible
!> that you have
!> !some sort of network security software running that might interfere with
!> !tcp/ip socket communication? Even though you're on the same machine, the
!> !communication looks like any other network traffic.
!> !
!> !Those are my three best guesses. The first one seems obvious, but doesn't
!> !seem to match the error message, that's why I thought it might just have
!> !gotten copied into the mail wrong.
!> !
!> !-NickF
!> !
!> !
!> !
!> !> -----Original Message-----
!> !> From: # sriram # [mailto:sriram@imsc.ernet.in]
!> !> Sent: Friday, February 22, 2002 8:15 AM
!> !> To: Nick Fankhauser
!> !> Subject: RE: [JDBC] strange error
!> !>
!> !>
!> !> ok here we go...
!> !>
!> !> i downloaded the tar archive from sun ....
!> !> and then the postgresql.jar from one of the postgres links...
!> !> i run mdk8 with apache and tomcat servers...
!> !> i use postgresql 7.1 (i believe)
!> !> my classpath is perfect....
!> !> my installation sits in /usr/local
!> !>
!> !> really puzzling ??
!> !>
!> !> may be i will attach the code also...
!> !>
!> !> import java.sql.Connection;
!> !> import java.sql.DriverManager;
!> !> import java.sql.ResultSet;
!> !> import java.sql.Statement;
!> !>
!> !> public class jdbc
!> !> {
!> !>     public static void main(String args[]) throws
!> !> SQLException,ClassNotFoundException
!> !>     {
!> !>     Class.forName("org.postgresql.Driver");
!> !>     Connection
!> !> con=DriverManager.getConnection("jdbc:postgresql://localhost:5432"
!> !> ,"sriram","******");
!> !>     Statement s=con.prepareStatement();
!> !>     s.execute("insert into...................");
!> !>     }
!> !> }
!> !>
!> !> and the host of errors..which i have already included
!> !>
!> !>
!> !>
!> !> On Fri, 22 Feb 2002, Nick Fankhauser wrote:
!> !>
!> !> !Although it sounds like you have matched up the correct versions
!> !> of the jvm
!> !> !& jdbc driver, the error message still seems to point to a
!> problem in you
!> !> !environment rather than your code. Please give us some more
!> !> details on your
!> !> !platform, such as the source of the jvm
!> (Sun/IBM/blackdown/Jikes, etc...)
!> !> !and versions & sources of anything else you can think of that might be
!> !> !relevant.
!> !> !
!> !> !-NickF
!> !> !
!> !> !
!> !> !> i am using j2sdk1.3.1 and downloaded postgresql.jar from the
!> !> !> specified site which said drivers for jdk1.2+
!> !> !
!> !> !> !> Internal error: caught an unexpected exception.
!> !> !> !> Please check your CLASSPATH and your installation.
!> !> !> !> java/lang/NoSuchMethodError:
!> !> !> !java/sql/Statement.getResultSetConcurrency()I
!> !> !> !
!> !> !
!> !> !
!> !>
!> !> -----------------
!> !> rm -rf /bin/laden
!> !> -----------------
!> !>
!> !
!> !
!> !---------------------------(end of broadcast)---------------------------
!> !TIP 6: Have you searched our list archives?
!> !
!> !http://archives.postgresql.org
!> !
!>
!> -----------------
!> rm -rf /bin/laden
!> -----------------
!>
!
!
!---------------------------(end of broadcast)---------------------------
!TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
!

----------
mAtScIeNcE
----------


Re: strange error

From
"Nick Fankhauser"
Date:
Have you had a chance to try Dave Cramer's suggestion of monitoring the port
with netstat yet? Tom Lane's suggestions about process limits also looked
like they were worth following up on.

All of the evidence you've given us recently points to an interruption of
communication between client & backend, so either something is breaking the
network connection, or one of the processes is terminating unexpectedly.
That means that the source of the problem is likely outside of JDBC and you
will need to do some process monitoring at the system level.

-NickF

> -----Original Message-----
> From: pgsql-jdbc-owner@postgresql.org
> [mailto:pgsql-jdbc-owner@postgresql.org]On Behalf Of # sriram #
> Sent: Friday, March 01, 2002 5:21 AM
> To: Nick Fankhauser
> Cc: Psql-Jdbc
> Subject: Re: [JDBC] strange error
>
>
> hi all...in addition to all those errors i could get some more
> information...
>
> this is the dump that i get when i run the simplest of jdbc
> inserts/selects
>
> helping mails plz...
> ------------------------------------------------------------------
> -------------------------
> [sriram@nmlinux2 sriram]$ java jdbc
> 020301.16:00:08.437  [3033] read_pg_options: verbose=2,query=2,syslog=0
> 020301.16:00:08.440  [3033] started: host=127.0.0.1 user=sriram
> database=mydb
> 020301.16:00:08.440  [3033] InitPostgres
> 020301.16:00:08.818  [3033] reset_client_encoding()..
> 020301.16:00:08.820  [3033] reset_client_encoding() done.
> 020301.16:00:08.831  [3033] StartTransactionCommand
> 020301.16:00:08.831  [3033] query: set datestyle to 'ISO'; select
> version(), case when pg_encoding_to_char(1)
> = 'SQL_ASCII' then 'UNKNOWN' else getdatabaseencoding() end;
> 020301.16:00:08.974  [3033] ProcessUtility: set datestyle to
> 'ISO'; select version(), case when
> pg_encoding_to_char(1) = 'SQL_ASCII' then 'UNKNOWN' else
> getdatabaseencoding() end;
> 020301.16:00:08.996  [3033] ProcessQuery
> 020301.16:00:09.008  [3033] CommitTransactionCommand
> 020301.16:00:09.212  [3033] StartTransactionCommand
> 020301.16:00:09.212  [3033] query: SELECT * FROM TABLE1
> 020301.16:00:09.301  [3033] ProcessQuery
> 020301.16:00:09.307  [3033] CommitTransactionCommand
> Internal error: caught an unexpected exception.
> Please check your CLASSPATH and your installation.
> 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 jdbc.main(jdbc.java:18)
> pq_recvbuf: unexpected EOF on client connection
> 020301.16:00:09.475  [3033] proc_exit(0)
> 020301.16:00:09.475  [3033] shmem_exit(0)
> 020301.16:00:09.475  [3033] exit(0)
> Aborted
> ------------------------------------------------------------------
> -------------------------
> On Tue, 26 Feb 2002, Nick Fankhauser wrote:
>
> !Date: Tue, 26 Feb 2002 07:39:52 -0500
> !From: Nick Fankhauser <nickf@ontko.com>
> !To: Psql-Jdbc <pgsql-jdbc@postgresql.org>, # sriram #
> <sriram@imsc.ernet.in>
> !Subject: Re: [JDBC] strange error
> !
> !I'll copy this to the JDBC list again. (I'd suggest posting all
> of these to
> !the list- While I'm happy to try to help, I'm not the most
> informed person
> !on the list, so you really need everyone's eyeballs checking
> these problems
> !out.)
> !
> !Here are a few more ideas:
> !
> !
> !> well....i missed the database...it should read
> !> jdbc:postgres://localhost:5432/mydb," "," ".....
> !OK, so that's not the problem.
> !
> !
> !> i mentioned apache and tomcat...to make matters more simple if someone
> !> really feels that my jdbc classpath should also be present on
> the tomcat
> !> lib directory....i tried that also...(sounds silly though)
> !
> !Are you running this through a servlet, or just in a standalone
> application?
> !I'd suggest trying to debug this with a simple standalone
> application first
> !& get tomcat involved once the database issue is resolved.
> !
> !
> !> i ran netstat --tcp -a -n | grep 5432 and i found just 5432
> listening to
> !> my requests and there are no other clashes...
> !
> !I think others have experienced disconnects after an initial
> response due to
> !some packet filtering, so I'm still curious about whether you have any
> !network security software running.
> !
> !
> !> i also tried running postmaster on a different port...but no avail...
> !> some one mentioned that i am trying to access a jdbc2 statement......
> !> how far can i go in that direction...
> !
> !
> !> PS..amazingly mysql also throws the same error ??
> !
> !I think this is an important clue. I think it points again to
> another piece
> !of software interfering.
> !
> !-NickF
> !
> !
> !
> !
> !
> !
> !
> !>
> !>
> !> On Fri, 22 Feb 2002, Nick Fankhauser wrote:
> !>
> !> !Hi-
> !> !
> !> !I'm going to copy your response to the JDBC list, so others
> can view the
> !> !config info.
> !> !
> !> !The snippet of code that you include doesn't appear to
> specify a database
> !> !name in the URL- is it really this way, or is that just from
> !> pasting it into
> !> !the mail message? If this is an exact copy, maybe we've found
> !> your problem.
> !> !
> !> !Nothing in your environment looks like a problem to me. You
> !> mention tomcat &
> !> !apache, but so far these aren't involved, correct? It looks like
> !> you're just
> !> !trying to get a plain vanilla connection to the database going.
> !> !
> !> !You mentioned in an earlier post that you got the message
> "pg_recvbuf :
> !> !client closed connection" in one of the logs. Is it possible
> !> that you have
> !> !some sort of network security software running that might
> interfere with
> !> !tcp/ip socket communication? Even though you're on the same
> machine, the
> !> !communication looks like any other network traffic.
> !> !
> !> !Those are my three best guesses. The first one seems obvious,
> but doesn't
> !> !seem to match the error message, that's why I thought it
> might just have
> !> !gotten copied into the mail wrong.
> !> !
> !> !-NickF
> !> !
> !> !
> !> !
> !> !> -----Original Message-----
> !> !> From: # sriram # [mailto:sriram@imsc.ernet.in]
> !> !> Sent: Friday, February 22, 2002 8:15 AM
> !> !> To: Nick Fankhauser
> !> !> Subject: RE: [JDBC] strange error
> !> !>
> !> !>
> !> !> ok here we go...
> !> !>
> !> !> i downloaded the tar archive from sun ....
> !> !> and then the postgresql.jar from one of the postgres links...
> !> !> i run mdk8 with apache and tomcat servers...
> !> !> i use postgresql 7.1 (i believe)
> !> !> my classpath is perfect....
> !> !> my installation sits in /usr/local
> !> !>
> !> !> really puzzling ??
> !> !>
> !> !> may be i will attach the code also...
> !> !>
> !> !> import java.sql.Connection;
> !> !> import java.sql.DriverManager;
> !> !> import java.sql.ResultSet;
> !> !> import java.sql.Statement;
> !> !>
> !> !> public class jdbc
> !> !> {
> !> !>     public static void main(String args[]) throws
> !> !> SQLException,ClassNotFoundException
> !> !>     {
> !> !>     Class.forName("org.postgresql.Driver");
> !> !>     Connection
> !> !> con=DriverManager.getConnection("jdbc:postgresql://localhost:5432"
> !> !> ,"sriram","******");
> !> !>     Statement s=con.prepareStatement();
> !> !>     s.execute("insert into...................");
> !> !>     }
> !> !> }
> !> !>
> !> !> and the host of errors..which i have already included
> !> !>
> !> !>
> !> !>
> !> !> On Fri, 22 Feb 2002, Nick Fankhauser wrote:
> !> !>
> !> !> !Although it sounds like you have matched up the correct versions
> !> !> of the jvm
> !> !> !& jdbc driver, the error message still seems to point to a
> !> problem in you
> !> !> !environment rather than your code. Please give us some more
> !> !> details on your
> !> !> !platform, such as the source of the jvm
> !> (Sun/IBM/blackdown/Jikes, etc...)
> !> !> !and versions & sources of anything else you can think of
> that might be
> !> !> !relevant.
> !> !> !
> !> !> !-NickF
> !> !> !
> !> !> !
> !> !> !> i am using j2sdk1.3.1 and downloaded postgresql.jar from the
> !> !> !> specified site which said drivers for jdk1.2+
> !> !> !
> !> !> !> !> Internal error: caught an unexpected exception.
> !> !> !> !> Please check your CLASSPATH and your installation.
> !> !> !> !> java/lang/NoSuchMethodError:
> !> !> !> !java/sql/Statement.getResultSetConcurrency()I
> !> !> !> !
> !> !> !
> !> !> !
> !> !>
> !> !> -----------------
> !> !> rm -rf /bin/laden
> !> !> -----------------
> !> !>
> !> !
> !> !
> !> !---------------------------(end of
> broadcast)---------------------------
> !> !TIP 6: Have you searched our list archives?
> !> !
> !> !http://archives.postgresql.org
> !> !
> !>
> !> -----------------
> !> rm -rf /bin/laden
> !> -----------------
> !>
> !
> !
> !---------------------------(end of broadcast)---------------------------
> !TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
> !
>
> ----------
> mAtScIeNcE
> ----------
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
>


Re: strange error

From
# sriram #
Date:
let me also check that...

Dave suggested i post the driver jar file....

it is the same postgresql.jar file that i downloaded from
jdbc.postgresql.org....

i think netstat should give me something interesting to think about..

let me check it and then post my findings..

thanks
sriram




On Fri, 1 Mar 2002, Nick Fankhauser wrote:

!Date: Fri, 1 Mar 2002 08:53:57 -0500
!From: Nick Fankhauser <nickf@ontko.com>
!To: # sriram # <sriram@imsc.ernet.in>
!Cc: Psql-Jdbc <pgsql-jdbc@postgresql.org>
!Subject: RE: [JDBC] strange error
!
!Have you had a chance to try Dave Cramer's suggestion of monitoring the port
!with netstat yet? Tom Lane's suggestions about process limits also looked
!like they were worth following up on.
!
!All of the evidence you've given us recently points to an interruption of
!communication between client & backend, so either something is breaking the
!network connection, or one of the processes is terminating unexpectedly.
!That means that the source of the problem is likely outside of JDBC and you
!will need to do some process monitoring at the system level.
!
!-NickF
!
!> -----Original Message-----
!> From: pgsql-jdbc-owner@postgresql.org
!> [mailto:pgsql-jdbc-owner@postgresql.org]On Behalf Of # sriram #
!> Sent: Friday, March 01, 2002 5:21 AM
!> To: Nick Fankhauser
!> Cc: Psql-Jdbc
!> Subject: Re: [JDBC] strange error
!>
!>
!> hi all...in addition to all those errors i could get some more
!> information...
!>
!> this is the dump that i get when i run the simplest of jdbc
!> inserts/selects
!>
!> helping mails plz...
!> ------------------------------------------------------------------
!> -------------------------
!> [sriram@nmlinux2 sriram]$ java jdbc
!> 020301.16:00:08.437  [3033] read_pg_options: verbose=2,query=2,syslog=0
!> 020301.16:00:08.440  [3033] started: host=127.0.0.1 user=sriram
!> database=mydb
!> 020301.16:00:08.440  [3033] InitPostgres
!> 020301.16:00:08.818  [3033] reset_client_encoding()..
!> 020301.16:00:08.820  [3033] reset_client_encoding() done.
!> 020301.16:00:08.831  [3033] StartTransactionCommand
!> 020301.16:00:08.831  [3033] query: set datestyle to 'ISO'; select
!> version(), case when pg_encoding_to_char(1)
!> = 'SQL_ASCII' then 'UNKNOWN' else getdatabaseencoding() end;
!> 020301.16:00:08.974  [3033] ProcessUtility: set datestyle to
!> 'ISO'; select version(), case when
!> pg_encoding_to_char(1) = 'SQL_ASCII' then 'UNKNOWN' else
!> getdatabaseencoding() end;
!> 020301.16:00:08.996  [3033] ProcessQuery
!> 020301.16:00:09.008  [3033] CommitTransactionCommand
!> 020301.16:00:09.212  [3033] StartTransactionCommand
!> 020301.16:00:09.212  [3033] query: SELECT * FROM TABLE1
!> 020301.16:00:09.301  [3033] ProcessQuery
!> 020301.16:00:09.307  [3033] CommitTransactionCommand
!> Internal error: caught an unexpected exception.
!> Please check your CLASSPATH and your installation.
!> 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 jdbc.main(jdbc.java:18)
!> pq_recvbuf: unexpected EOF on client connection
!> 020301.16:00:09.475  [3033] proc_exit(0)
!> 020301.16:00:09.475  [3033] shmem_exit(0)
!> 020301.16:00:09.475  [3033] exit(0)
!> Aborted
!> ------------------------------------------------------------------
!> -------------------------
!> On Tue, 26 Feb 2002, Nick Fankhauser wrote:
!>
!> !Date: Tue, 26 Feb 2002 07:39:52 -0500
!> !From: Nick Fankhauser <nickf@ontko.com>
!> !To: Psql-Jdbc <pgsql-jdbc@postgresql.org>, # sriram #
!> <sriram@imsc.ernet.in>
!> !Subject: Re: [JDBC] strange error
!> !
!> !I'll copy this to the JDBC list again. (I'd suggest posting all
!> of these to
!> !the list- While I'm happy to try to help, I'm not the most
!> informed person
!> !on the list, so you really need everyone's eyeballs checking
!> these problems
!> !out.)
!> !
!> !Here are a few more ideas:
!> !
!> !
!> !> well....i missed the database...it should read
!> !> jdbc:postgres://localhost:5432/mydb," "," ".....
!> !OK, so that's not the problem.
!> !
!> !
!> !> i mentioned apache and tomcat...to make matters more simple if someone
!> !> really feels that my jdbc classpath should also be present on
!> the tomcat
!> !> lib directory....i tried that also...(sounds silly though)
!> !
!> !Are you running this through a servlet, or just in a standalone
!> application?
!> !I'd suggest trying to debug this with a simple standalone
!> application first
!> !& get tomcat involved once the database issue is resolved.
!> !
!> !
!> !> i ran netstat --tcp -a -n | grep 5432 and i found just 5432
!> listening to
!> !> my requests and there are no other clashes...
!> !
!> !I think others have experienced disconnects after an initial
!> response due to
!> !some packet filtering, so I'm still curious about whether you have any
!> !network security software running.
!> !
!> !
!> !> i also tried running postmaster on a different port...but no avail...
!> !> some one mentioned that i am trying to access a jdbc2 statement......
!> !> how far can i go in that direction...
!> !
!> !
!> !> PS..amazingly mysql also throws the same error ??
!> !
!> !I think this is an important clue. I think it points again to
!> another piece
!> !of software interfering.
!> !
!> !-NickF
!> !
!> !
!> !
!> !
!> !
!> !
!> !
!> !>
!> !>
!> !> On Fri, 22 Feb 2002, Nick Fankhauser wrote:
!> !>
!> !> !Hi-
!> !> !
!> !> !I'm going to copy your response to the JDBC list, so others
!> can view the
!> !> !config info.
!> !> !
!> !> !The snippet of code that you include doesn't appear to
!> specify a database
!> !> !name in the URL- is it really this way, or is that just from
!> !> pasting it into
!> !> !the mail message? If this is an exact copy, maybe we've found
!> !> your problem.
!> !> !
!> !> !Nothing in your environment looks like a problem to me. You
!> !> mention tomcat &
!> !> !apache, but so far these aren't involved, correct? It looks like
!> !> you're just
!> !> !trying to get a plain vanilla connection to the database going.
!> !> !
!> !> !You mentioned in an earlier post that you got the message
!> "pg_recvbuf :
!> !> !client closed connection" in one of the logs. Is it possible
!> !> that you have
!> !> !some sort of network security software running that might
!> interfere with
!> !> !tcp/ip socket communication? Even though you're on the same
!> machine, the
!> !> !communication looks like any other network traffic.
!> !> !
!> !> !Those are my three best guesses. The first one seems obvious,
!> but doesn't
!> !> !seem to match the error message, that's why I thought it
!> might just have
!> !> !gotten copied into the mail wrong.
!> !> !
!> !> !-NickF
!> !> !
!> !> !
!> !> !
!> !> !> -----Original Message-----
!> !> !> From: # sriram # [mailto:sriram@imsc.ernet.in]
!> !> !> Sent: Friday, February 22, 2002 8:15 AM
!> !> !> To: Nick Fankhauser
!> !> !> Subject: RE: [JDBC] strange error
!> !> !>
!> !> !>
!> !> !> ok here we go...
!> !> !>
!> !> !> i downloaded the tar archive from sun ....
!> !> !> and then the postgresql.jar from one of the postgres links...
!> !> !> i run mdk8 with apache and tomcat servers...
!> !> !> i use postgresql 7.1 (i believe)
!> !> !> my classpath is perfect....
!> !> !> my installation sits in /usr/local
!> !> !>
!> !> !> really puzzling ??
!> !> !>
!> !> !> may be i will attach the code also...
!> !> !>
!> !> !> import java.sql.Connection;
!> !> !> import java.sql.DriverManager;
!> !> !> import java.sql.ResultSet;
!> !> !> import java.sql.Statement;
!> !> !>
!> !> !> public class jdbc
!> !> !> {
!> !> !>     public static void main(String args[]) throws
!> !> !> SQLException,ClassNotFoundException
!> !> !>     {
!> !> !>     Class.forName("org.postgresql.Driver");
!> !> !>     Connection
!> !> !> con=DriverManager.getConnection("jdbc:postgresql://localhost:5432"
!> !> !> ,"sriram","******");
!> !> !>     Statement s=con.prepareStatement();
!> !> !>     s.execute("insert into...................");
!> !> !>     }
!> !> !> }
!> !> !>
!> !> !> and the host of errors..which i have already included
!> !> !>
!> !> !>
!> !> !>
!> !> !> On Fri, 22 Feb 2002, Nick Fankhauser wrote:
!> !> !>
!> !> !> !Although it sounds like you have matched up the correct versions
!> !> !> of the jvm
!> !> !> !& jdbc driver, the error message still seems to point to a
!> !> problem in you
!> !> !> !environment rather than your code. Please give us some more
!> !> !> details on your
!> !> !> !platform, such as the source of the jvm
!> !> (Sun/IBM/blackdown/Jikes, etc...)
!> !> !> !and versions & sources of anything else you can think of
!> that might be
!> !> !> !relevant.
!> !> !> !
!> !> !> !-NickF
!> !> !> !
!> !> !> !
!> !> !> !> i am using j2sdk1.3.1 and downloaded postgresql.jar from the
!> !> !> !> specified site which said drivers for jdk1.2+
!> !> !> !
!> !> !> !> !> Internal error: caught an unexpected exception.
!> !> !> !> !> Please check your CLASSPATH and your installation.
!> !> !> !> !> java/lang/NoSuchMethodError:
!> !> !> !> !java/sql/Statement.getResultSetConcurrency()I
!> !> !> !> !
!> !> !> !
!> !> !> !
!> !> !>
!> !> !> -----------------
!> !> !> rm -rf /bin/laden
!> !> !> -----------------
!> !> !>
!> !> !
!> !> !
!> !> !---------------------------(end of
!> broadcast)---------------------------
!> !> !TIP 6: Have you searched our list archives?
!> !> !
!> !> !http://archives.postgresql.org
!> !> !
!> !>
!> !> -----------------
!> !> rm -rf /bin/laden
!> !> -----------------
!> !>
!> !
!> !
!> !---------------------------(end of broadcast)---------------------------
!> !TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
!> !
!>
!> ----------
!> mAtScIeNcE
!> ----------
!>
!>
!> ---------------------------(end of broadcast)---------------------------
!> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
!>
!
!

----------
mAtScIeNcE
----------