Error loading Agent Class: JavaAgent

Does anyone have experience on calling a Java agent from a LotusScript agent?

I am using the following code:

Dim agent As NotesAgent

Set agent = dbCurrent.GetAgent(“thenameoftheJAVAagent”)

If agent Is Nothing Then

’ error message

End If

Call agent.Run(doc.NoteID)

and I am getting the following error message:

HTTP JVM: Error loading Agent Class: JavaAgent

HTTP JVM: java.lang.ClassNotFoundException: JavaAgent

HTTP JVM: at lotus.domino.AgentLoader.loadClass(Unknown Source)

HTTP JVM: at java.lang.ClassLoader.loadClass(ClassLoader.java:448)

HTTP JVM: at lotus.domino.AgentLoader.runAgent(Unknown Source)

Is there any specific setting I should do in the Java agent in order to be found?

I am using the following in the Java agent:

public class JavaAgent extends AgentBase {

etc etc

Any idea will be welcome!

Subject: Error loading Agent Class: JavaAgent

Sounds like you need to add an import statement to your Java agent. When you create the agent (in Designer) it should generate the required code “stub” . . . something like:

import lotus.domino.*;

public class JavaAgent extends AgentBase {

public void NotesMain() {

	try {

		// your code goes here



	} catch (Exception e) {

		e.printStackTrace();

	}

}

}