Regarding Installation of jdbc7.0-1.1.jar with postgresql-7.0.3-2.i386.rpm

Поиск
Список
Период
Сортировка
От Bhuvaneswari
Тема Regarding Installation of jdbc7.0-1.1.jar with postgresql-7.0.3-2.i386.rpm
Дата
Msg-id 3B9B2AC9.BB614C94@ceedees.com
обсуждение исходный текст
Список pgsql-jdbc
hi,
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.1.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:postgreql://IP/","user1","pass1");

}
catch(SQLException e){}
catch(ClassNotFoundException e){}
......
.......
After compiling successfully, it comes with the following error:
Exception in 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


В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Barry Lind
Дата:
Сообщение: Patch to add bytea support to JDBC
Следующее
От:
Дата:
Сообщение: Re: no suitable driver