pratnala pratnala - 1 year ago 94
Java Question

Tomcat cannot find the Postgres driver

I have a webapp in Tomcat which connects to a PostgreSQL database. I have included the JDBC PostgreSQL driver in the

folder of my webapp. The IDE I am using is Eclipse.

I get this error

java.lang.ClassNotFoundException: org.postgresql.driver

Relevant code snippet:

String connectionUrlString = "jdbc:postgresql://server_addr:5432/db_name";
Connection dbConnection = null;
dbConnection = DriverManager.getConnection (connectionUrlString, username, password);

Answer Source

Try with a capital D:

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download