java.sql.Connection object is null
843854Oct 14 2002 — edited Oct 15 2002I think I'm able to connect to Oracle from HP-UX 11 using an OCI driver. However, the following line of code is causing a NullPointerException:
oraCallStmt = (OracleCallableStatement)conn.prepareCall( "{exec sp_package.sp_name(?,?,?,?,?)}" );
I believe this is because the conn object was never created and is therefore null. Here is the Connection statement which seems to execute fine:
Connection conn = DriverManager.getConnection("jdbc:oracle:oci:@ORACLE_SID", "user", "passwd");
The runtime error I'm getting is:
Exception in thread "main" java.lang.NullPointerException
Has anyone solved this issue? Thanks.
- Rajesh Vasisht