Q
Problem solve Get help with specific problems with your technologies, process and projects.

Connecting to DB2 from a Java agent using db2java.zip JDBC driver

I am trying to connect to DB2 from a Java agent using db2java.zip JDBC driver in Notes 5 client. The code is:

DriverManager.registerDriver
((Driver)Class.forName("COM.ibm.db2.
jdbc.net.DB2Driver").newInstance());
Connection connection = 
DriverManager.getConnection(url,username, 
password);

At runtime I get the error:
java.lang.NoClassDefFoundError: java/security/PrivilegedExceptionAction

I check the rt.jar and PrivilegedExceptionAction is not there. The same code works fine in Notes 6 with the same driver (for Notes 6 rt.jar contains PrivilegedExceptionAction class).

Can you please tell me if there is a different version for db2java.zip driver that is compatible with JDK 1.1 used in Domino 5? Thanks.

I have not seen this particular issue before. However, I have encountered issues when the db2java.zip is not the same version as the version of DB2 that's installed. For example, if you have a db2java.zip in your 'lib' directory that was part of a previous version of DB2 (and the assumption here is that you upgraded DB2), then copying the latest db2java.zip into your lib directory could resolve the issue. Failing that, call IBM support!

Do you have comments on this Ask the Expert question and response? Let us know.

Dig Deeper on Java for Lotus Notes Domino

SearchWindowsServer
Search400
  • Favorite iSeries cheat sheets

    Here you'll find a collection of valuable cheat sheets gathered from across the iSeries/Search400.com community. These cheat ...

  • HTML cheat sheet

    This is a really cool cheat sheet if you're looking to learn more about HTML. You'll find just about everything you every wanted ...

  • Carol Woodbury: Security

    Carol Woodbury

SearchDataCenter
SearchContentManagement
Close