Subject: RE: [jade-develop] ParserException
From: Caire Giovanni (Giovanni.Caire@TILAB.COM)
Date: Tue Aug 20 2002 - 09:52:26 MET DST
Hi,
The objects that you pass as arguments must be instances of classes that represent elements in the JADEManagementOntology. It is not sufficient for them to be serializable.
Bye
Giovanni
> ----------
> From: pellierd@ufrima.imag.fr[SMTP:pellierd@ufrima.imag.fr]
> Sent: marted́ 13 agosto 2002 11.36
> 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:52:32 MET DST