aspose file tools*
The moose likes JDBC and the fly likes DB2SQLJConnection NullPointerException Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "DB2SQLJConnection NullPointerException" Watch "DB2SQLJConnection NullPointerException" New topic
Author

DB2SQLJConnection NullPointerException

shiva
Greenhorn

Joined: Feb 03, 2004
Posts: 6
Could you help me out.. I am getting this error.
java.lang.NullPointerException
at COM.ibm.db2os390.sqlj.jdbc.DB2SQLJConnection.addStatement(DB2SQLJConn
ction.java:1096)
at COM.ibm.db2os390.sqlj.jdbc.DB2SQLJConnection.prepareCall(DB2SQLJConne
tion.java:1270)
at com.ibm.db2.jcc.DB2LogicalConnection.prepareCall(DB2LogicalConnection
java:177)
Using db2j2classes.zip for ConnectionPooling. Calling stored-proc. First call to the stored procedure is fine. Subsequent calls to the same stored-proc are throwing exceptions. Getting new connection before calling stored-proc.
Printed a few connections. they are
com.ibm.db2.jcc.DB2LogicalConnection@2b983f7�mClosed=fal
se;mConnection=573a83f4�:
com.ibm.db2.jcc.DB2LogicalConnection@38d483f4�mClosed=fa
lse;mConnection=573a83f4�:
What is mConnection? They show the same address
I am getting above error while
cstmt = con.prepareCall(sql);

Thanks
[ February 03, 2004: Message edited by: shiva ko ]
 
 
subject: DB2SQLJConnection NullPointerException