That URL doesn't look right. Here is one that works:
jdbc:postgresql://localhost:5432/postgres
Maybe some of the fields default if not provided. If the URL is not
your issue, then provide the database version and the exact version of
the JDBC driver JAR file you are using.
--
Guy Rouillier
--
Sent via pgsql-jdbc mailing list (pgsql...@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc
On Sat, 3 Jan 2009, abhijeet dharurkar wrote:
> all setings are correct but while running the program from command line it
> gives the error.......
>
> Exception in thread "main" org.postgresql.util.PSQLException: Protocol
> error. Session setup failed.
> at
> org.postgresql.core.v3.ConnectionFactoryImpl.doAuthentication(ConnectionFactoryImpl.java:381)
> at
>
During the authentication step of the connection startup process we expect
only a couple of different message types. Something about your setup is
giving a message type the driver is not prepared for. Without knowing
what message it is, it's not clear how to help. I've added additional
logging to the driver to print out the message type. Please try this
driver and post the results.
http://ejurka.com/pgsql/jars/startlog/
Kris Jurka