Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

PostgreSql Connection Error:

 
Prash Singh
Ranch Hand
Posts: 103
jQuery Netbeans IDE Notepad
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 6663
5
Firefox Browser Linux MyEclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ClassNotFound for which class ?
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Prash Singh
Ranch Hand
Posts: 103
jQuery Netbeans IDE Notepad
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Sir

The exception is:

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

Please suggest what to do?
 
Prash Singh
Ranch Hand
Posts: 103
jQuery Netbeans IDE Notepad
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hat lib folder is this ? Are you talking about a web application ?


Sir this is RMI based distributed application.

 
Rahul Nair
Ranch Hand
Posts: 138
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic