Hi Gurus

I'm trying to connect to my Oracle9i database via a Java servlet but 
got the following error message in the web browser: 

Internal error: exception thrown from the servlet service function 
(uri=/servlet/HelloWWW6): java.lang.NullPointerException, Stack: 
java.lang.NullPointerException 
at oracle.jdbc.oci8.OCIDBAccess.check_error(OCIDBAccess.java:1743) 
at oracle.jdbc.oci8.OCIEnv.getEnvHandle(OCIEnv.java:69) 
at oracle.jdbc.oci8.OCIDBAccess.logon(OCIDBAccess.java:452) 
at oracle.jdbc.driver.OracleConnection.(OracleConnection.java:287) 
at oracle.jdbc.driver.OracleDriver.getConnectionInstance 
(OracleDriver.java:442) 
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:321) 
at java.sql.DriverManager.getConnection(DriverManager.java:512) 
at java.sql.DriverManager.getConnection(DriverManager.java:172) 
at HelloWWW6.doGet(HelloWWW6.java:40) 
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) 
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) 
at 
com.iplanet.server.http.servlet.NSServletRunner.invokeServletService 
(NSServletRunner.java:897) 
at com.iplanet.server.http.servlet.NSServletRunner.Service 
(NSServletRunner.java:464) 


My class path is: 

Java VM 
classpath: /u01/iplanet/servers/plugins/servlets/examples/legacy/beans 
.10/SDKBeans10.jar:/usr/local/javamail-1.2/mail.jar:/usr/local/jaf- 
1.0.1/activation.jar:/u02/app/oracle/product/9i/lib:/u02/app/oracle/pr 
oduct/9i/jdbc/lib:/u02/app/oracle/product/9i/jdbc/lib/classes12.zip:/u 
02/app/oracle/product/9i/jdbc/lib/nls_charset12.zip:/u01/iplanet/serve 
rs/bin/https/jar/NSServletLayer.jar:/u01/iplanet/servers/bin/https/jar 
/NSJavaUtil.jar:/u01/iplanet/servers/bin/https/jar/NSJavaMiscUtil.jar: 
/u01/iplanet/servers/bin/https/jar/servlet.jar:/u01/iplanet/servers/bi 
n/https/jar/servlet-2.3-filters- 
api.jar:/u01/iplanet/servers/bin/https/jar/jsp092.jar:/u01/iplanet/ser 
vers/bin/https/jar/jaxp.jar:/u01/iplanet/servers/bin/https/jar/crimson 
.jar:/u01/iplanet/servers/bin/https/jar/xalan.jar:/u01/iplanet/servers 
/bin/https/jar/jspengine.jar: 

My LD_LIBRARY_PATH is: 

/u02/app/oracle/product/9i/lib:/u02/app/oracle/product/9i/jdbc/lib:/u0 
2/app/oracle/product/9i/jdbc/lib/classes12.zip:/u02/app/oracle/product 
/9i/jdbc/lib/nls_charset12.zip 

Can anyone help? This is currently driving me nuts. I was able to 
connect when I changed it to an application. 

I am using the Iplanet Webserver 6.0 on a Linux 7.2 platform. 
The database (Oracle 8.1.7) is on a seperate box on a Solaris 8 platform.  Like I said, sqlplus works fine from Linux (so no TNSnames.ora problems), standard java application works fine (so classpath is fine) but when I change it to a servlet (which means it now goes through the webserver, I get this error message).

The classpath on the command line is exactly the same as the classpath for the webserver!

Does anyone know what the source code is trying to do at 
OCIDBAccess.java:1743 ? 

Thanks guys! 





------------------------------------------------
Join Excite! - http://www.excite.com
The most personalized portal on the Web!