Attempt to retrieve Java agent attachments failed

i got problem to schedule the java agent. i created an agent in a blank database for testing:

import lotus.domino.*;

public class JavaAgent extends AgentBase {

public void NotesMain() {



	try {

		Session session = getSession();

		AgentContext agentContext = session.getAgentContext();



		int temp = 1;



	} catch(Exception e) {

		e.printStackTrace();

	}

}

}

i scheduled it to run on server. when the schedule run the log show error:

Started running agent ‘Test1’ on 02/14/2008 09:00:06 AM

Running on all documents in database: 0 total

Found 0 document(s) that match search criteria

ERROR: JVM: Attempt to retrieve Java agent attachments failed.

Ran Java Agent Class

Done running agent ‘Test1’ on 02/14/2008 09:00:07 AM

however it is ok if i manually run it:

Started running agent ‘Test1’ on 2008-02-14 09:07:18 AM

Running on all documents in database: 0 total

Found 0 document(s) that match search criteria

Ran Java Agent Class

Done running agent ‘Test1’ on 2008-02-14 09:07:19 AM

How do i troubleshoot this problem? please advise.

thank you.