aspose file tools*
The moose likes JDBC and the fly likes PostgreSql Connection Error: Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "PostgreSql Connection Error:" Watch "PostgreSql Connection Error:" New topic
Author

PostgreSql Connection Error:

Prash Singh
Ranch Hand

Joined: Aug 23, 2009
Posts: 103

Dear All,

I am having a problem using Postgresql.
We used to put all jar files in the lib folder of our project.
Before using postgresql, we were using oracle.
The Oracle jar file i.e. ojdbc14.jar was placed in the same lib folder as mentioned above.

The problem is in case of postgresql it always shows ClassNotFoundException.
I have already put jar file of postgresql in the libv folder, but it's just not working.

Please help me.
Thanks in Advance

Deepak Bala
Bartender

Joined: Feb 24, 2006
Posts: 6662
    
    5

ClassNotFound for which class ?


SCJP 6 articles - SCJP 5/6 mock exams - More SCJP Mocks
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14688
    
  16

What lib folder is this ? Are you talking about a web application ? If not, you may have to explicitly include the Postgresql JARs in your CLASSPATH.


[My Blog]
All roads lead to JavaRanch
Prash Singh
Ranch Hand

Joined: Aug 23, 2009
Posts: 103

Dear Sir

The exception is:

java.lang.RuntimeException: java.lang.ClassNotFoundException: org.postgresql.Driver

Please suggest what to do?
Prash Singh
Ranch Hand

Joined: Aug 23, 2009
Posts: 103

hat lib folder is this ? Are you talking about a web application ?


Sir this is RMI based distributed application.

Rahul Nair
Ranch Hand

Joined: Dec 01, 2007
Posts: 138
Hi,

Please make sure the Class which you are using for making a connection is available in the jar your are using for postgresql.
After that put it in the correct place so that your application can access it, you may either put it in the lib directory or add jar's path in classpath.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: PostgreSql Connection Error: