Re: Connection Problem with JDBC

From: "Nick Fankhauser" <nickf(at)ontko(dot)com>
To: "Steven Murphy" <stevenmurphy(at)hotmail(dot)com>, <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: Connection Problem with JDBC
Date: 2002-02-11 20:44:04
Message-ID: NEBBLAAHGLEEPCGOBHDGCEEFEFAA.nickf@ontko.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc


> The command I am using to run the program is
> java -Djdbc.drivers=org.postgresql.Driver ConnectDemo
> jdbc:postgresql:javatest postgres ' '

I think if it was a classpath problem, you'd be getting a
"ClassNotFoundException" I believe the "No Suitable Driver" indicates that
among the drivers you have loaded, none matches the database url passed to
DriverManager.getConnection. ...But the command & url above look just fine &
I can't see any opportunity in your program for the url to get mangled.

Have you tried loading the drivers using Class.forName in main? I'm not sure
what it would tell us if it worked, but if it didn't work that way, I think
I'd download the driver again.

-Nick

--------------------------------------------------------------------------
Nick Fankhauser nickf(at)ontko(dot)com Phone 1.765.935.4283 Fax 1.765.962.9788
Ray Ontko & Co. Software Consulting Services http://www.ontko.com/

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Pavel Tavoda 2002-02-12 11:03:45 Re: newb: Howto tell if jdbc is compiled-in?
Previous Message Steven Murphy 2002-02-11 20:12:43 Re: Connection Problem with JDBC