pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tony Smith <quickome@yahoo.com>
To: pgsql-jdbc@postgresql.org
Subject: remote connection with JDBC
Date: Sun, 21 Nov 2004 09:30:00 -0800 (PST)
Message-ID: <20041121173000.77040.qmail@web41604.mail.yahoo.com> (raw)

Hi, 
 
I am trying to connect postgresql database from a remote pc. Here is my code:
 
   Class.forName("org.postgresql.Driver");
   Connection conn = DriverManager.getConnection("jdbc:postgresql://machine.mylbl.gov:5432/mydatabase", "username", "passwd");

 
But I always get the following exception:
 

org.postgresql.util.PSQLException: The connection attempt failed.

Exception: java.io.EOFException

Stack Trace:

java.io.EOFException

at org.postgresql.core.PGStream.ReceiveChar(PGStream.java:244)

at org.postgresql.core.v3.ConnectionFactoryImpl.doAuthentication(ConnectionFactoryImpl.java:222)

at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:94)

at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:65)

at org.postgresql.jdbc2.AbstractJdbc2Connection.<init>(AbstractJdbc2Connection.java:106)

at org.postgresql.jdbc2.Jdbc2Connection.<init>(Jdbc2Connection.java:15)

at org.postgresql.Driver.connect(Driver.java:140)

at java.sql.DriverManager.getConnection(DriverManager.java:538)

at java.sql.DriverManager.getConnection(DriverManager.java:188)

at Test.main(Test.java:29)

End of Stack Trace

at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:119)

at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:65)

at org.postgresql.jdbc2.AbstractJdbc2Connection.<init>(AbstractJdbc2Connection.java:106)

at org.postgresql.jdbc2.Jdbc2Connection.<init>(Jdbc2Connection.java:15)

at org.postgresql.Driver.connect(Driver.java:140)

at java.sql.DriverManager.getConnection(DriverManager.java:538)

at java.sql.DriverManager.getConnection(DriverManager.java:188)

at Test.main(Test.java:29)

 

Why:

 

Thanks,


Tony

 

		
---------------------------------
Do you Yahoo!?
 Discover all thatÂ’s new in My Yahoo!

view thread (4+ messages)  latest in thread

Message-ID: <20041121173000.77040.qmail@web41604.mail.yahoo.com>
Permalink:  ../20041121173000.77040.qmail@web41604.mail.yahoo.com/
Also on:    postgresql.org/message-id/20041121173000.77040.qmail@web41604.mail.yahoo.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: quickome@yahoo.com
  Subject: Re: remote connection with JDBC
  In-Reply-To: <20041121173000.77040.qmail@web41604.mail.yahoo.com>
  References: <20041121173000.77040.qmail@web41604.mail.yahoo.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox