Thread: No suitable driver error trying to connect to postgresql from jdeveloper

No suitable driver error trying to connect to postgresql from jdeveloper

From
syg6@yahoo.com (Robert Bowen)
Date:
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

Re: No suitable driver error trying to connect to

From
Dave Cramer
Date:
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


Re: No suitable driver error trying to connect to postgresql

From
Kris Jurka
Date:

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