From: | Joseph Shraibman <jks(at)selectacast(dot)net> |
---|---|
To: | Justin Jaynes <justinjaynes(at)hotmail(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Using the JDBC Driver in version 7.02 |
Date: | 2000-07-10 20:57:46 |
Message-ID: | 396A38CA.FE1AE81D@selectacast.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
You have to format your url properly so the java runtime can figure out
what driver to use for the connection.
Justin Jaynes wrote:
>
> Hello. I am using Postgres 7.02 on my redhat linux box. I have installed
> the JDK and a JSP engine.
>
> I have also copied the JDBC level 4 Drivers that came with postgresql 7.02
> onto my hard drive.
>
> When I try to interface with it in java, even after loading the driver with
> the line:
>
> Class.forName("org.postgresql.Driver");
>
> I get an error that the DriverManager cannot find a suitable driver.
>
> The code I use to connect goes as follows:
>
> Connection chamber = DriverManager.getConnection("localhost:5432");
>
> I also tried it as:
>
> Connection chamber =
> DriverManager.getConnection("localhost:5432","username","password");
>
> and still no luck.
>
> Can anyone help with this problem?
>
> I have two suspicions: First, that I am not pointing to the right class in
> the jar file. Driver.class might be the wrong file to start with. Second,
> maybe my server is not taking requests properly, so Java says "hey, this
> driver is not working." when it's not the drivers fault, but the servers
> fault.
>
> Just so you know, I set up my server to trust all localhost connections.
> ________________________________________________________________________
> Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com
From | Date | Subject | |
---|---|---|---|
Next Message | Giulio Orsero | 2000-07-10 21:14:42 | Re: Another mySQL to PostgreSQL move question |
Previous Message | Andrew Sullivan | 2000-07-10 20:54:19 | dump files |