I am currently trying to connect to a DB2 database from an agent. The first time the agent runs the connection is successful. After the first time, each time the agent runs i get the following error:
java.sql.SQLException: java.lang.UnsatisfiedLinkError: Native Library C:\Program Files\SQLLIB\bin\db2jdbc.dll already loaded in another classloader
at COM.ibm.db2.jdbc.app.DB2Driver.<init>(Unknown Source)
The db2java.zip is set in the agent properties NOT in notes.ini. The connection is set up in the following way:
url = “jdbc:db2:cart”;
Class.forName(“COM.ibm.db2.jdbc.app.DB2Driver”).newInstance();
con = DriverManager.getConnection( url,“test”,“test”);
Anyone got any ideas on how to fix this?