Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Configure JDBC driver with NetBeans

843859Jul 17 2006 — edited Jul 17 2006
Hello, I'm try to make a program using Postgresql database manager. I downloaded the postgresql driver and install it adding in NetBeans enviroment like a Jar file in project properties. My source code is:

public DataBaseUtils() throws SQLException
{
System.out.println("Cargando Driver para Postgres");
try
{
Class.forName("org.postgresql.Driver");
}catch (ClassNotFoundException e)
{
System.out.println("El driver para postgres no ha podido ser cargado");
e.printStackTrace();
}
...
}

When i try to execute that throws the next error mensage:

java.lang.ClassNotFoundException: org.postgresql.Driver
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1332)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1181)

- My CLASSPATH it's:

CLASSPATH="C:\Documents and Settings\Antonio.PERSEO\Carrito_Compra\org\postgresql\Driver; C:\Documents and settings\Antonio.PERSEO\Carrito_Compra\postgresql-8.1-407.jdbc3.zip"

I test the database with NetBeans utilities and it works properly.

I dont know the reason of this mensage, I have followed the steps to configure a new driver on NetBeans.
I need help to resolve this problem... Thanks... and sorry for my english :)
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 14 2006
Added on Jul 17 2006
1 comment
430 views