Java Agent when runs on server makes server crash

Hi, I am running one Java agent (say x) through “runonserver” command which is being called by another java agent(y).As soon as the agent (x) runs on the server, it makes the Domino 6.0.1 server crash…The domino server is on Red Hat Linux - 8.I donot know what to do, your help will be of great help.

Also I would like to know as to what are the requirements for running a JavaAgent on server through runonserver…

Thanks in advance

Shivesh Verma

Subject: Java Agent when runs on server makes server crash

Hi!

Maybe i can help you if you post the source of the agent.

Greetings Ralf

Subject: RE: Java Agent when runs on server makes server crash

Thanks Ralf, I am sending you the source code for the two agents which are in action.

1.Code for the agent which is calling the other agent through “runonserver”


import lotus.domino.*;

public class JavaAgent extends AgentBase {

public void NotesMain() {



    try {

        Session session = getSession();

        AgentContext agentContext = session.getAgentContext();



        // (Your code goes here) 

        Database db = agentContext.getCurrentDatabase();

        // Create document containing data to be passed

        Document doc = db.createDocument();

        doc.appendItemValue("TriggerUserName", session.getUserName());

        doc.save(true, false);

        // Start agent and pass NoteID of document

        Agent agent = db.getAgent("Hello World Java Agent");

        if (agent.runOnServer(doc.getNoteID()) == 0)

            System.out.println("Agent ran");

        else

            System.out.println("Agent did not run");



    } catch(Exception e) {

        e.printStackTrace();

    }

}

}


2.Code for the agent which is running on the server-


import lotus.domino.*;

public class HelloWorld extends AgentBase {

public void NotesMain() {



	try {

		Session session = getSession();

		AgentContext agentContext = session.getAgentContext();



		System.out.println("Domino " +

    (String)session.getNotesVersion() + "\nRunning on " +

    (String)session.getPlatform());



	} catch(Exception e) {

		e.printStackTrace();

	}

}

}


Waiting for your response

Shivesh

Subject: RE: Java Agent when runs on server makes server crash

Hi Shivesh!

Your agent looks correct, but why do you pass an id of a document to the server agent. You do not use this id in the server agent. Please try to run the agent on the server by the scheduler and post the result. What kind of crash do you get?

Greetings Ralf

Subject: RE: Java Agent when runs on server makes server crash

Thanks Ralf, I am getting the following error in the server crash which I am pasting for you…------------------------------------------

stackpointer=0x48776a88

Stack base = 0x487b2bfc, Stack size = 246708 bytes

Fatal Error Signa = 0x0000000b PID/TID = 17543/172054

Running cleanup script

NSD is in progress …


In the meanwhile, I am trying to run the program as scheduled agent(tho’ the requirement is to run it through button)

Regards

Shivesh

Subject: RE: Java Agent when runs on server makes server crash

Hi , I scheduled the agent as suggested by you, but as soon as the agent triggered on the server, the server crsahed.In the meanwhile, I also started the task DIIOP on the server thro’ notes.ini file.After doing that a soon as I resttarted the server, it crashed…now, I am not able to up the server because each time I start the server, it is crashing (even after I have removed the DIIOP action from the notes.ini file).

Seems that the scheduled agent gets triggered each time the server starts ???

Problems increasing :wink:

Waiting for your response

Shivesh

Subject: RE: Java Agent when runs on server makes server crash

The additional problem which had occured which I stated just few hrs back has been resolved and I think I would like this to share with you.Actually, after scheduling the agent, the server crashed at the specified time (which I had reported earlier).Now, each time you start the server, the scheduled agent used to run , hence the server crash.I removed the nsf file from the server and then again started the server…its up :slight_smile:

This brings us back to the original problem which was, the server crashes as soon as the java agent is triggered on it.

Waiting for your response

Regards

Shivesh