Received: from maia.hub.org (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id A372F634A1F for ; Tue, 9 Mar 2010 12:51:26 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 33885-03 for ; Tue, 9 Mar 2010 16:51:15 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-ww0-f46.google.com (mail-ww0-f46.google.com [74.125.82.46]) by mail.postgresql.org (Postfix) with ESMTP id 96485632B4B for ; Tue, 9 Mar 2010 12:51:15 -0400 (AST) Received: by wwb39 with SMTP id 39so375224wwb.19 for ; Tue, 09 Mar 2010 08:51:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=vlirXLw+i0PVUO5BQdHzHOLBM/E72Z7Tt27iFce4C3o=; b=Cg74Vfy5IiM8iG5ThxWilL3LfWQAhu08qJAhS8beLOG6LYuSFPuQFMQrWt1gUfJ9Np l3K674hB/Lue5v+a22Pt3sUvtqPdFLx8vk7zLe+lZqLeqNWB0MNEXCgASQp3e6R8ssU6 RvfADWuYKGbhwYF3EUZN+J3j6XhVPwDwSMGJA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=OgQAuoi7oejN2XW67t61TdCAPojwMBEo7I7JllamxjVx6zXIw+6cilqDDKPrt0z94R Vq0g5jnLgENoOpXfXDb21gWbqILkWdTLH8ciSIcgFdmoVqO7QUclBj5E6KosTqTwYuFw AvSzIcXhCzV9ErxGoNVGL2iGd4ZCS2J0qxnPI= MIME-Version: 1.0 Received: by 10.216.180.141 with SMTP id j13mr5447wem.227.1268153474479; Tue, 09 Mar 2010 08:51:14 -0800 (PST) Date: Tue, 9 Mar 2010 22:21:14 +0530 Message-ID: <375c2da1003090851h36daef83v2ced94b02051b08b@mail.gmail.com> Subject: org.postgresql.util.PSQLException: Protocol error. Session setup failed From: Major Services To: pgsql-jdbc@postgresql.org Content-Type: multipart/alternative; boundary=0016367fa8435df830048160fd1e X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.456 tagged_above=-10 required=5 tests=AWL=-0.717, BAYES_20=-0.74, HTML_MESSAGE=0.001 X-Spam-Level: X-Archive-Number: 201003/22 X-Sequence-Number: 20362 --0016367fa8435df830048160fd1e Content-Type: text/plain; charset=ISO-8859-1 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 --0016367fa8435df830048160fd1e Content-Type: text/html; charset=ISO-8859-1 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






--0016367fa8435df830048160fd1e--