File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes DB2 App Driver gives Null Pointer 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 » Databases » JDBC
Bookmark "DB2 App Driver gives Null Pointer" Watch "DB2 App Driver gives Null Pointer" New topic
Author

DB2 App Driver gives Null Pointer

Wade Thompson
Greenhorn

Joined: Sep 26, 2005
Posts: 2
Anybody have any ideas. Win XP, ServletExec 5.0 , Db2 Client 8.1
I have uninstalled, cleaned my class path and I get the same error after reinstalling.

java.lang.NullPointerException
at COM.ibm.db2.jdbc.app.SQLExceptionGenerator.throw_SQLException(Unknown Source)
at COM.ibm.db2.jdbc.app.SQLExceptionGenerator.check_return_code(Unknown Source)
at COM.ibm.db2.jdbc.app.DB2Connection.connect(Unknown Source)
at COM.ibm.db2.jdbc.app.DB2Connection.(Unknown Source)
at COM.ibm.db2.jdbc.app.DB2Driver.connect(Unknown Source)
at java.sql.DriverManager.getConnection(DriverManager.java:525)
at java.sql.DriverManager.getConnection(DriverManager.java:171)

I have put a sys out in my code and it passes the correct connection string. It seems that between the DriverManager and the App driver, the connection string goes away. Any body seen anything like this before.
Dave Salter
Ranch Hand

Joined: Jul 20, 2005
Posts: 292

Can you show us the code you are using?
Wade Thompson
Greenhorn

Joined: Sep 26, 2005
Posts: 2
I'll pull together some of the code that is used. More info: the servlet uses connection pooling, and command line java programs that access the db via the same driver work fine.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: DB2 App Driver gives Null Pointer
 
Similar Threads
No suitable Driver in DB2
Error when getting a connection from DB2 DB
Db2 v8.0 Type 4 driver with Websphere
java DB2 program
Error connecting to DB2 database in localhost