Skip site navigation (1) Skip section navigation (2)

Regarding Error installing jdbc7.0-1.2.jar

From: Shanmugasundaram <shan(at)ceedees(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: Regarding Error installing jdbc7.0-1.2.jar
Date: 2001-09-09 08:55:38
Message-ID: 3B9B2E8A.93EC3C68@ceedees.com (view raw or flat)
Thread:
Lists: pgsql-jdbc
hi,
I am using JDK1.2.2. I tried to install postgresql-7.0.3-2.i386.rpm and
its supporting rpms(devel,server,jdbc)
and I succeeded. I am able to open the database using 'psql' and create
tables. Then, I tried to install the jar
file for jdbc 'jdbc7.0-1.2. jar' and extracted it to the directory
/usr/lib/pgsql. Then, I tried to connect database
with jdbc with a sample java program. I gave it like the following way:

try
{
    Class.forName("postgresql.Driver");
    con=DriverManager.getConnection("jdbc:postgresql://IP
address/","user1","pass1");
}
catch(SQLException se){}
catch(ClassNotFoundException ce){}

.......
......
After compiling successfully, it comes with the following error:
Exception in the thread "main"
java.lang.NoClassDefFoundError : postgresql/Driver (wrong name:
org/postgresql/Driver)
at java.lang.ClassLoader.defineClass0(Native Method)
.......

What could be wrong?
Thanks in advance.
shan.


Responses

pgsql-jdbc by date

Next:From: Rene PijlmanDate: 2001-09-09 09:08:12
Subject: Re: Need help with JDBC driver. Problem, - getExportedKeys=
Previous:From: Rene PijlmanDate: 2001-09-09 08:51:36
Subject: Re: [HACKERS] Troubles using German Umlauts with JDBC

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group