Re: No suitable driver error trying to connect to postgresql

Lists: pgsql-jdbc
From: syg6(at)yahoo(dot)com (Robert Bowen)
To: pgsql-jdbc(at)postgresql(dot)org
Subject: No suitable driver error trying to connect to postgresql from jdeveloper
Date: 2004-08-06 12:05:16
Message-ID: 77723de8.0408060405.203be2be@posting.google.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-jdbc

Anyone have this problem? Usually it is because of a classpath error
but I have copied my jar file(s) into the jdeveloper/jdbc/lib
directory (where the oracle jdbc drivers are ...) and tried the
following:

Connection Type : 3rd Party JDBC Driver

Username and password correct (verified using pgAdmin)

Driver class : org.postgresql.Driver

Classpath : I have tried all 4 drivers that come with postgresql 7.5
-- pg74.214.jdbc1.jar, jdbc2.jar, jdbc2ee.jar and jdbc3.jar.

url : localhost:5432 (this works in pgAdmin)

... no dice. Any clues? My connection to Oracle 9i from jdeveloper
works fine ... As does my pgAdmin connection to postgresql ...

Many thanks!
syg


From: Kris Jurka <books(at)ejurka(dot)com>
To: Robert Bowen <syg6(at)yahoo(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: No suitable driver error trying to connect to postgresql
Date: 2004-08-06 16:09:33
Message-ID: Pine.BSO.4.56.0408061106390.11823@leary.csoft.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-jdbc

On Fri, 6 Aug 2004, Robert Bowen wrote:

> Anyone have this problem? Usually it is because of a classpath error
> but I have copied my jar file(s) into the jdeveloper/jdbc/lib
> directory (where the oracle jdbc drivers are ...) and tried the
> following:
>
> url : localhost:5432 (this works in pgAdmin)
>

pgAdmin is not a java client, so there are a number of differences. I
imagine you want a url of the form

jdbc:postgresql://localhost:5432/mydatabase

also a JDBC connection requires tcpip sockets enabled on the server and
access allowed in pg_hba.conf which pgAdmin doesn't necessarily need.

Finally you haven't given any error messages so the above is just
speculation.

Kris Jurka


From: Dave Cramer <pg(at)fastcrypt(dot)com>
To: Robert Bowen <syg6(at)yahoo(dot)com>
Cc: "pgsql-jdbc(at)postgresql(dot)org" <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: No suitable driver error trying to connect to
Date: 2004-08-06 16:10:21
Message-ID: 1091808621.1548.69.camel@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-jdbc

the url is incorrect

it needs to be.
jdbc:postgresql://host:port/database

Dave
On Fri, 2004-08-06 at 08:05, Robert Bowen wrote:
> Anyone have this problem? Usually it is because of a classpath error
> but I have copied my jar file(s) into the jdeveloper/jdbc/lib
> directory (where the oracle jdbc drivers are ...) and tried the
> following:
>
> Connection Type : 3rd Party JDBC Driver
>
>
> Username and password correct (verified using pgAdmin)
>
> Driver class : org.postgresql.Driver
>
> Classpath : I have tried all 4 drivers that come with postgresql 7.5
> -- pg74.214.jdbc1.jar, jdbc2.jar, jdbc2ee.jar and jdbc3.jar.
>
> url : localhost:5432 (this works in pgAdmin)
>
> ... no dice. Any clues? My connection to Oracle 9i from jdeveloper
> works fine ... As does my pgAdmin connection to postgresql ...
>
> Many thanks!
> syg
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
>
--
Dave Cramer
519 939 0336
ICQ # 14675561