Here’s my CLASSPATH
.;C:\PROGRA~1\IBM\SQLLIB\java\db2java.zip;C:\PROGRA~1\IBM\SQLLIB\java\db2jcc.jar;C:\PROGRA~1\IBM\SQLLIB\java\sqlj.zip;C:\PROGRA~1\IBM\SQLLIB\java\db2jcc_license_cu.jar;C:\PROGRA~1\IBM\SQLLIB\bin;
Here’s a snipit of my agent
public class JavaAgent extends AgentBase {
public void NotesMain() {
try {
Session session = getSession();
AgentContext agentContext = session.getAgentContext();
Class.forName("com.ibm.db2.jcc.DB2Driver");
Here’s the Java Debug Consol message
java.lang.ClassNotFoundException: com.ibm.db2.jcc.DB2Driver
at lotus.domino.AgentLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(ClassLoader.java:448)
at java.lang.Class.forName1(Native Method)
at java.lang.Class.forName(Class.java:142)
at JavaAgent.NotesMain(JavaAgent.java:16)
at lotus.domino.AgentBase.runNotes(Unknown Source)
at lotus.domino.NotesThread.run(NotesThread.java:208)
What am I doing wrong? Thanks.
-Don
Subject: Lotus Notes Agent JDBC help please
Don -
Are you running it as an agent or as a standalone in an external ide? If you’re running it as an agent, how are you determining your classpath? When I print out the classpath for an agent, it never produces anything like that. It’s usually something like “;.” (semicolon+dot). The Notes JVM does not use your system’s classpath environment variable (if that’s what you’ve assumed). Files that you need to be in the classpath need to be:
added to the JVM’s ext directory,
set up in a “JavaUserClasses” environment variable in the notes.ini, or
added to the agent’s design note via the “Edit Project” button.
Option #2 is restricted to 255 characters and option #3 has never worked well for me . . . tends to result in memory problems. So I would suggest adding db2java.zip to the ext directory. You’ll need to restart afterwards too.
dgg
Subject: RE: Lotus Notes Agent JDBC help please
Importing classes into a script library would be a fourth possibility, in theory.
I second the first option, making sure that the packages are available both, locally and on the server.
Subject: RE: Lotus Notes Agent JDBC help please
Putting db2java.zip into the lotus\notes\jvm\lib\ext directory did the trick. Yes, I did assume my Windows CLASSPATH was sufficient. Oh well. Thanks all for your posts!
-Don
Subject: Lotus Notes Agent JDBC help please
Search the forum for classpath, there are several discussions on this issue with solutions.
Subject: RE: Lotus Notes Agent JDBC help please
Don’t forget that if the agent is running on the server as a scheduled agent for example, then the jars need to be on the servers classpath too.
Frunobulax
Subject: RE: Lotus Notes Agent JDBC help please
Right now I’m just trying to get to run locally…