Re: [jade-develop] jade.wrapper.StaleProxyException


Subject: Re: [jade-develop] jade.wrapper.StaleProxyException
From: Sonia Pérez (jibpefus@si.ehu.es)
Date: Mon Aug 05 2002 - 16:47:30 MET DST


PresentarFicheroLlamadaSistema7 is the name of the servlet class,
whithin that class there is
another class which extends runnable and which is the class that creates
the agent container and
the agent. The code of this class is the code that I put in the first
message.

I follow the Inprocess and ThanksAgent examples to construct my code,
but I don't
understand why the agent container is created but not the agent, and why
I got that error.

Plese could you tell me what I am doing wrong????

Thanks in advanced,

Sonia.

Bellifemine Fabio wrote:

>your code is throwing the following exception:
>
>PresentarFicheroLlamadaSistema7$CrearContextoAgente.run(PresentarFicheroLlamadaSistema7.java: 388)
>
>that is then catched by the AgentContainer and rethrown as it was a StaleProxyException.
>Check the constructor of your agent.
>
>-----Original Message-----
>From: Sonia Pérez [mailto:jibpefus@si.ehu.es]
>Sent: 02 August 2002 20:18
>To: jade-develop@sharon.cselt.it
>Subject: [jade-develop] jade.wrapper.StaleProxyException
>
>
>hi,
>
>I have a problem when I try to create an agent from a servlet.
>I have a JADE platform running (launched from command line) and I want
>to create a container and an agent
>inside that platform from a servlet. I can create the container but when
>I try
>to create the agent I got the following error:
>
>Starting service Tomcat-Standalone
>Apache Tomcat/4.0.3
>Starting service Tomcat-Standalone
>Apache Tomcat/4.0.3
>Launching the agent container ... (Profile main=true
>main-host=siul04.si.ehu.es main-port=1099
>main-proto=rmi mtps=jade.util.leap.ArrayList@17e4ca
>platform-id=siul04.si.ehu.es:1099/JADE)
>This is JADE 2.6 - 2002/07/19 09:32:33
>downloaded in Open Source, under LGPL restrictions,
>at http://jade.cselt.it/
>
>IOR: 0000 .....
>Agent container Container-1@JADE.IMTP://siul04.si.ehu.es is ready.
>Launching the ThanksAgent agent on the main container ...
>jade.wrapper.StaleProxyException: examples.thanksAgent.ThanksAgent
>at jade.wrapper.AgentContainer.createNewAgent (AgentContainer.java:185)
>at
>PresentarFicheroLlamadaSistema7$CrearContextoAgente.run(PresentarFicheroLlamadaSistema7.java:
>388)
>at java.lang.Thread.run (Thread.java: 484)
>
>
>
>The code of the servlet that creates the agent:
>
>
>try {
>Runtime rt = Runtime.instance ();
>
>ProfileImpl pConatiner = new ProfileImpl ();
>
>System.out.println ("Launching the agent conatiner ..." + pContainer);
>jade.wrapper.AgentConatiner cont = rt.createAgentConatiner (pConatiner);
>
>System.out.println ("Launching the ThanksAgent agent on the main
>container ...");
>AgentController miAgente = cont.createNewAgent ("miThanksAgent",
>"examples.thanksAgent.ThanksAgent", null);
>miAgente.start ();
>}
>
>catch (Exception e) {
>e.printStackTrace ();
>}
>
>
>My configuration is:
>
>jdk1.3
>JADE 2.6
>Tomcat 4.0.3
>Linux Debian distribution
>
>
>Thanks in advanced,
>
>Sonia.
>
>
>
>

-- 
------------------------------------------
Sonia P?rez Fuente
Informatika Fakultatea
Euskal Herriko Unibertsitatea
Tel: 943 01 80 60
e-mail: jibpefus@si.ehu.es
------------------------------------------



This archive was generated by hypermail 2a22 : Mon Aug 05 2002 - 16:45:43 MET DST