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