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 |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
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
From | Date | Subject | |
---|---|---|---|
Next Message | Andreas Joseph Krogh | 2010-03-09 23:39:14 | Retrieving multidimentional array-column using JDBC |
Previous Message | Major Services | 2010-03-09 17:41:00 | Re: org.postgresql.util.PSQLException: Protocol error. Session setup failed |