When I'm connecting to my database (PostgreSQL 8.2) through JDBC it gives an error ClassNotFound and something related to drivers. How do I fix this?
-
1You need to be more precise. Cut and paste the exact error message here. Chances are you just need to include the drivers in the classpath.Jon Skeet– Jon Skeet2011-02-14 07:04:01 +00:00Commented Feb 14, 2011 at 7:04
-
1"and something related to drivers" is not a valid Java exception nor a valid Postgres error message.user330315– user3303152011-02-14 07:55:46 +00:00Commented Feb 14, 2011 at 7:55
Add a comment
|
1 Answer
I guess you need to put the postgres jdbc driver on your classpath. You can download it from http://jdbc.postgresql.org/
Latest version 8 or 9 drivers should to (stable) like the 9.0-801 driver. To quote the size :
If you are using the 1.6 JVM, then you should use the JDBC4 version.
4 Comments
neha soni
which version have to download for postgresql8.2 database
neha soni
i have put postgresql.jar at java\jre\ext\postgresql.jar but its not working and also set classpath .;c\postgresql.jar. it still giving an exception classnotfound(). what should i do now???
Heiko Rupp
@neha: provide a code example on how you are trying to access it.