Run Agent Using Java Application

I am using Domino8.0.2 . I am using run agent in my java application. when executing the Run Agent, the following error occurs.this is my agent…This is part of my code…

AgentContext agentContext = s.getAgentContext();

					Document doc = newdb.createDocument();

					doc.replaceItemValue("FileName", dxlPath);

					doc.save(true, true);

					String paramid = doc.getNoteID();

					Agent agent = newdb.getAgent("JavaImport");

					agent.run(paramid);

This is the following error…

Exception in thread “Thread-1” java.lang.NoClassDefFoundError: lotus/domino/webs

vc/client/Service

    at lotus.domino.local.Agent.Nrun(Native Method)

    at lotus.domino.local.Agent.run(Unknown Source)

    at com.Oppsol.EmailManager.NotesMailOpener.runNotes(NotesMailOpener.java

:332)

    at lotus.domino.NotesThread.run(Unknown Source)

12/23/2008 11:03:00 AM JVM: The lotus/domino/websvc/client/Service class could

not be loaded.

An unexpected error has been detected by HotSpot Virtual Machine:

EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d6c6d31, pid=800, tid=1128

Java VM: Java HotSpot™ Client VM (1.5.0_05-b05 mixed mode, sharing)

Problematic frame:

V [jvm.dll+0x86d31]

An error report file with more information is saved as hs_err_pid800.log

If you would like to submit a bug report, please visit:

Report a Bug

Subject: Runagent for domino8

This code work for Domino 7.0. But when we test for Domino 8, the Run Agent doesn’t work.

Subject: The same error

is any progress in this issue? I have the same

Subject: Missing Dependencies?

I had a similar error and the solution was just to add the needed dependencies (in your case: websvc.jar) from the maven repository.