File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes NullPointerException while closing PreparedStatement Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "NullPointerException while closing PreparedStatement" Watch "NullPointerException while closing PreparedStatement" New topic
Author

NullPointerException while closing PreparedStatement

Jay Mehta
Greenhorn

Joined: Feb 04, 2003
Posts: 4
I get this error while I close a PreparedStatement. I have checked to see if the PreparedStatement was null before calling close on it, It is not null yet an error is thrown.My connection is also valid and this error is thrown sometimes.Can somebody help??
java.lang.NullPointerException
at oracle.jdbc.dbaccess.DBData.clearIt(DBData.jav(Compiled Code))
at oracle.jdbc.dbaccess.DBDataSetImpl.clearItem(DBDataSetImpl.java:2154)
at oracle.jdbc.driver.OraclePreparedStatement.clearParameters(OraclePreparedStatement.java:2594)
at com.ibm.ejs.cm.cache.CachedStatement.clearParameters(CachedStatement.java)
at com.ibm.ejs.cm.cache.StatementCache.releaseStatement(StatementCache.java)
at com.ibm.ejs.cm.cache.CachedStatement.close(CachedStatement.java)
at com.ibm.ejs.cm.proxy.StatementProxy.__close(StatementProxy.java(Compiled Code))
at com.ibm.ejs.cm.proxy.StatementProxy.close(StatementProxy.java(Compiled Code))
Karan V Praba
Ranch Hand

Joined: Oct 31, 2002
Posts: 41
Hai Buddy,
Can u place the code.............?
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: NullPointerException while closing PreparedStatement
 
Similar Threads
EJB failure: CNTR0019E: Non-application exception
stale connection exception
NullPointerException while closing PreparedStatement
weird Db2exception
NullPointerException while closing PreparedStatements