Re: strange error

From: "Nick Fankhauser" <nickf(at)ontko(dot)com>
To: "Psql-Jdbc" <pgsql-jdbc(at)postgresql(dot)org>, "# sriram #" <sriram(at)imsc(dot)ernet(dot)in>
Subject: Re: strange error
Date: 2002-02-26 12:39:52
Message-ID: NEBBLAAHGLEEPCGOBHDGEEBDEHAA.nickf@ontko.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

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(at)imsc(dot)ernet(dot)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
> -----------------
>

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message # sriram # 2002-02-26 13:04:06 Re: Strange Error
Previous Message Matteo Beccati 2002-02-26 09:36:20 Timestamp output