Home » Developer & Programmer » JDeveloper, Java & XML » run time error for oracle connection from java
run time error for oracle connection from java [message #91969] Tue, 06 January 2004 19:09 Go to next message
Gaurav
Messages: 20
Registered: February 2002
Junior Member
hello friends,
i m in the middle of 1 problem
Problem is regarding
DriverManager.getConnection()

code starts here...

Class.forName("oracle.jdbc.driver.OracleDriver");
con= DriverManager.getConnection("jdbc:odbc:;DSN=payroll","scott","tiger");

but it is giving error like

Exception:oracle.jdbc.driver.OracleDriver
java.lang.NullPointerException

Hoping for the solution
Re: run time error for oracle connection from java [message #91970 is a reply to message #91969] Wed, 07 January 2004 00:15 Go to previous message
Frank Naude
Messages: 4569
Registered: April 1998
Senior Member
Hi,

Your CLASSPATH probably doesn't reference the Oracle Driver. Ensure you use a CLASSPATH like this:

$ echo $CLASSPATH
.:/app/oracle/product/9.2.0/jdbc/lib/classes111.zip


Best regards.

Frank
Previous Topic: Doubt in JDBC.
Next Topic: Is this right?
Goto Forum:
  


Current Time: Tue Aug 03 23:07:35 CDT 2021