From: | Maciek Sakrejda <msakrejda(at)truviso(dot)com> |
---|---|
To: | dmp <danap(at)ttc-cmc(dot)net> |
Cc: | Major Services <services(dot)major(at)gmail(dot)com>, pgsql-jdbc(at)postgresql(dot)org |
Subject: | Re: org.postgresql.util.PSQLException: Protocol error. Session setup failed |
Date: | 2010-03-09 17:22:46 |
Message-ID: | 895e58dd1003090922k54e67f44k94f1903a72b5879f@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
I don't imagine Class.forName() would throw a PSQLException.
If I'm reading the ConnectionFactoryImpl code correctly, the server
seems to be responding to the Startup message with something that is
neither an error nor an authentication request, which seems weird. Can
you use Wireshark or tcpdump to look at traffic on the wire?
---
Maciek Sakrejda | Software Engineer | Truviso
1065 E. Hillsdale Blvd., Suite 230
Foster City, CA 94404
(650) 242-3500 Main
(650) 242-3516 T
(510) 717-5398 M
(650) 242-3501 F
msakrejda(at)truviso(dot)com
www.truviso.com
On Tue, Mar 9, 2010 at 8:56 AM, dmp <danap(at)ttc-cmc(dot)net> wrote:
> Did not look up error, but looks like the Class.forName().
> Attached standard main() to create a connection to PostgreSQL.
>
> danap.
>
>
> //============================================================
> // Main public access point method for instantiating the
> // PostgreSQL_JDBC application. Arguments: database, username,
> // & password.
> // ==============================================================
>
> public static void main(String[] args) throws SQLException,
> InstantiationException,
> IllegalAccessException, ClassNotFoundException, InterruptedException
> {
> String host, database, username, password;
> Connection dbConnection;
>
> // Collect connection properties. and setup connection.
>
> //host = "cindy";
> host = "localhost";
>
> if (args.length != 0)
> {
> database = args[0];
> username = (args.length > 1) ? args[1] : null;
> password = (args.length > 2) ? args[2] : null;
> }
> else
> {
> database = "key_tables";
> username = "";
> password = "";
> }
>
> dbConnection = null;
> Class.forName("org.postgresql.Driver").newInstance();
> dbConnection = DriverManager.getConnection("jdbc:postgresql://" + host
> + "/" + database, username,
> password);
> System.out.println("Connection Created");
>
> new PostgreSQL_JDBC(dbConnection);
>
> // Close.
> dbConnection.close();
> System.out.println("Connection Closed");
> }
>
> --
> Sent via pgsql-jdbc mailing list (pgsql-jdbc(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-jdbc
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | Major Services | 2010-03-09 17:41:00 | Re: org.postgresql.util.PSQLException: Protocol error. Session setup failed |
Previous Message | dmp | 2010-03-09 16:56:20 | Re: org.postgresql.util.PSQLException: Protocol error. Session setup failed |