RE: [jade-develop] ParserException


Subject: RE: [jade-develop] ParserException
From: Bellifemine Fabio (Fabio.Bellifemine@TILAB.COM)
Date: Tue Aug 20 2002 - 09:48:31 MET DST


It is a known bug of JADE. The message create-agent is encoded in SL and therefore is not able to represent all types of objects. For the time being, if you only pass Strings as arguments it should work.

-----Original Message-----
From: pellierd@ufrima.imag.fr [mailto:pellierd@ufrima.imag.fr]
Sent: 13 August 2002 11:37
To: jade-develop@sharon.cselt.it
Subject: [jade-develop] ParserException

Hi,

I have a problem with the creation of a agent. I use the methode following,
but on of my argument generates a parserException. Could you tell me why ? I
don't know if it is important but this object is serializable too.

Thank for your answer

private void newAgent(String agentName,
                String className,
                Object[] args,
                ContainerID containerID) {
        try {
                CreateAgent ca = new CreateAgent();
                   ca.setAgentName(agentName);
                    ca.setClassName(className);
                    ca.setContainer(containerID);
                        
                for(int j = 0; j < args.length ; j++) {
                            ca.addArguments((Object)args[j]);
                }
                    
                      Action a = new Action();
                      a.set_0(getAMS());
                      a.set_1(ca);
                      List l = new ArrayList(1);
                      l.add(a);
                
                      ACLMessage requestMsg = getRequest();
                      requestMsg.setOntology(JADEAgentManagementOntology.NAME);
                      fillMsgContent(requestMsg, l);
                      addBehaviour(new AMSClientBehaviour("CreateAgent", requestMsg));
                
            } catch(Exception e) {
                      e.printStackTrace();
            }
}
_______________________________________________
jade-develop mailing list
jade-develop@sharon.cselt.it
http://sharon.cselt.it/mailman/listinfo/jade-develop
UNSUBSCRIBE INSTRUCTIONS AT http://jade.cselt.it/mailing.htm#unsubscribe



This archive was generated by hypermail 2a22 : Tue Aug 20 2002 - 09:48:37 MET DST