Skip site navigation (1) Skip section navigation (2)

Re: org.postgresql.util.PSQLException: Protocol error. Session setup failed

From: Mark Kirkwood <mark(dot)kirkwood(at)catalyst(dot)net(dot)nz>
To: Major Services <services(dot)major(at)gmail(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: org.postgresql.util.PSQLException: Protocol error. Session setup failed
Date: 2010-03-09 22:32:18
Message-ID: 4B96CC72.2070306@catalyst.net.nz (view raw or flat)
Thread:
Lists: 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

In response to

Responses

pgsql-jdbc by date

Next:From: Andreas Joseph KroghDate: 2010-03-09 23:39:14
Subject: Retrieving multidimentional array-column using JDBC
Previous:From: Major ServicesDate: 2010-03-09 17:41:00
Subject: Re: org.postgresql.util.PSQLException: Protocol error. Session setup failed

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group