Here is my code where manager class(non jade program) creates an agent successfully in an already running JADE platform but doesn't migrate that created agent to another platform.
Manager.java
public class Manager
{
public static void main(String args[])
{
Runtime myRuntime = Runtime.instance();
myRuntime.setCloseVM(true);
Profile myProfile = new ProfileImpl();
myProfile.setParameter(Profile.MAIN_HOST, "192.168.2.9");
myProfile.setParameter(Profile.MAIN_PORT, "1099");
ContainerController myContainer = myRuntime.createAgentContainer(myProfile);
try
{
myContainer.createNewAgent("agent_007", agent_hun_main.class.getName(), null);
} catch (StaleProxyException e) {
e.printStackTrace();
}
try
{
myContainer.getAgent("agent_007").start();
} catch (StaleProxyException e) {
e.printStackTrace();
} catch (ControllerException e) {
e.printStackTrace();
}
}
}
agent.java
public class agent extends Agent
{
public void setup()
{
System.out.println("hie i am an agent");
System.out.println(this);
AID remoteAMS = new AID("ams@localhost:12341/JADE", AID.ISGUID);
remoteAMS.addAddresses("http://192.168.2.9:7778/acc");
PlatformID destination = new PlatformID(remoteAMS);
this.doMove(destination);
}
}
This is the error that i get while executing my project:-
Mar 03, 2015 5:25:21 PM jade.core.mobility.AgentMobilityService$CommandSourceSink handleInformMoved
SEVERE: Destination localhost:1099/JADE does not exist or does not support mobility
Please help in sorting out this problem . Thanks in advance!