I am trying to write a Java agent that will do a query in a db2 table and bring back the results. We added the JavaUserClasses=/QIBM/ProdData/http/public/jt400/lib/jt400.jar
to the Notes.ini file
I am using the below code in an agent but i get the following error:
java.lang.ClassNotFoundException
at java.lang.Class.forName1(Native Method)
at java.lang.Class.forName(Class.java:142)
at JavaAgent.NotesMain(JavaAgent.java:27)
at lotus.domino.AgentBase.runNotes(Unknown Source)
at lotus.domino.NotesThread.run(NotesThread.java:215)
Can someone PLEASE tell me what I am doing wrong!?!?!?!?
I’m guessing you are getting this error when you try to save your agent and not later when you go to run it. If so, add the jt400.jar file to the project. Click on “Edit Project” at the bottom in Designer and navigate to the jt400.jar file and add it.
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:29)
at lotus.domino.AgentBase.runNotes(Unknown Source)
at lotus.domino.NotesThread.run(NotesThread.java:215)
You should not be going back to those old ways of referencing the JAR file. Ralf told you what you need. “Class not found” can also mean “I don’t have authority to access the class”. So make sure your agent has the authority. It could be an OS setting. I suggested you read my old posts – one of the tips I mentioned is setting the agent properties security to 3 which gives your agent certain rights involving accessing files outside the Notes world which reside on the hard drive.
Unfortunately, I have not found any Notes and Java documentation. It stinks being the "bleeding edge" because every time I post a question to this forum about Java and Notes, I never get a response since not many people are doing this.
Ok there is much java documentation on the net. Just google for it. And the Notes classes are pretty well documented in the Designer help. So where is the problem. Anyway the problem in this thread is not a notes java problem. It is a pure JDBC JT400 question.