lotus domino - JavaAgent" java.lang.NoClassDefFoundError: de.bea.domingo.DNotesFactory -
i'm try debuging follownig java agent in domino designer
public class javaagent extends agentbase { public void notesmain() { dnotesfactory factory = dnotesfactory.getinstance(); dsession session = factory.getsession(); ddatabase database; try { database = session.getdatabase("", "names.nsf"); dview view = database.getview("($users)"); iterator entries = view.getallentries(); while (entries.hasnext()) { dviewentry entry = (dviewentry) entries.next(); system.out.println(entry.getcolumnvalues().get(0)); } } catch (exception e) { // todo auto-generated catch block e.printstacktrace(); } } }
but following exception
javaagent" java.lang.noclassdeffounderror: de.bea.domingo.dnotesfactory
java.lang.noclassdeffounderror
runtime error. means, domingo-1.5.1.jar
available in designer during editing , saving java agent , code compiled.
so, jar file not available @ runtime.
there 3 ways store jar files java agents available @ runtime:
- in directory ...\lotus\notes\jvm\lib\ext
- in agent's archive part
- in java library's archive part
be aware jar files in code/jars ignored java agents (they can used xpages).
1.
copy jar file directory ...\lotus\notes\jvm\lib\ext. restart notes client. java agent run on notes client then.
2.
add jar file import/archive java agent itself:
3.
if have several agents using jar file should create java library jar file , include library agents:
from other questions can see working notes domino version 9. project domingo pretty out of date , doesn't support new functionalities. use openntf domino api org.openntf.domino instead. description how use api java agents can find here. places store jar files java agents same though.
Comments
Post a Comment