Re: JDBC in PostgreSql for Linux - Mailing list pgsql-general

From Thomas Kellerer
Subject Re: JDBC in PostgreSql for Linux
Date
Msg-id bcus8a$vfh$1@main.gmane.org
Whole thread Raw
In response to Re: JDBC in PostgreSql for Linux  ("Kallol Nandi" <kallol.nandi@indussoft.com>)
List pgsql-general
Kallol Nandi schrieb:
> Hi,
>
> This is the code that I am using for native JDBC Driver to connect to
> PostgreSql in Linux.
> BTW the version of Postgres is 7.2.2 and the jar file is jdbc7.1-1.2.jar.
>
>
 > [...]
> ****************************************************************************
> I am getting the error mentioned i my earlier mail in the following line :
>
>      Connection con=DriverManager.getConnection(url,userid,password);
>
> The error is :
> ****************************************************************************
> **
>  I get the following error :
>  Driver not found for URL: jdbc:postgresql@10.100.102.31:5432:notes
>  java.sql.SQLException: Driver not found for URL:
> jdbc:postgresql@10.100.102.31:5432:notes

In 99% of the cases this is due to a badly defined classpath. I see two
potential problems here:

- You are not including the jdbc jar file when starting your app
- The GNU JVM does not support Class.forName("org.postgresql.Driver");

If you are sure you are defining the correct classpath: have you tried
the same thing with SUN's JDK??

Thomas


pgsql-general by date:

Previous
From: Hervé Piedvache
Date:
Subject: Re: Strange trouble with pg_dump import
Next
From: Erik Price
Date:
Subject: Re: dropping sequences