0

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?

2
  • 1
    You 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. Commented Feb 14, 2011 at 7:04
  • 1
    "and something related to drivers" is not a valid Java exception nor a valid Postgres error message. Commented Feb 14, 2011 at 7:55

1 Answer 1

1

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.

Sign up to request clarification or add additional context in comments.

4 Comments

which version have to download for postgresql8.2 database
@neha: what's so unclear about the sentence: "This is the current version of the driver. Unless you have unusual requirements (running old applications or JVMs), this is the driver you should be using" on the download page?
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???
@neha: provide a code example on how you are trying to access it.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.