Re: org.postgresql.util.PSQLException: Protocol error. Session setup failed - Mailing list pgsql-jdbc

From Mark Kirkwood
Subject Re: org.postgresql.util.PSQLException: Protocol error. Session setup failed
Date
Msg-id 4B96CC72.2070306@catalyst.net.nz
Whole thread Raw
In response to org.postgresql.util.PSQLException: Protocol error. Session setup failed  (Major Services <services.major@gmail.com>)
Responses Re: org.postgresql.util.PSQLException: Protocol error. Session setup failed  (Major Services <services.major@gmail.com>)
List pgsql-jdbc
Major Services wrote:
> I am trying to connect to PostgreSQL database on my local system.
>
> The code is:
>
> Class.forName("org.postgresql.Driver");
> String url =
> "jdbc:postgresql://localhost:5432/postgres?user=postgres&password=major";
> Connection conn = DriverManager.getConnection(url);
>
> Running the code I get:
>
> org.postgresql.util.PSQLException: Protocol error. Session setup failed.
>
> Using postgresql-8.4-701.jdbc3 on PostgreSql 8.4
>
>
>
>
>

Try adding some debug info (will help us see what is going on) - e.g:


  Class.forName("org.postgresql.Driver");
  String url =
"jdbc:postgresql://localhost:5432/postgres?user=postgres&password=major";

  Properties props = new Properties();
  props.setProperty("loglevel","2");

  Connection conn = DriverManager.getConnection(url, props);



regards

Mark

pgsql-jdbc by date:

Previous
From: Major Services
Date:
Subject: Re: org.postgresql.util.PSQLException: Protocol error. Session setup failed
Next
From: Andreas Joseph Krogh
Date:
Subject: Retrieving multidimentional array-column using JDBC