Subject: Problem with restarting platform
From: Michael Mueller (muellerix@gmx.de)
Date: Sun Jul 21 2002 - 12:12:20 MET DST
Dear Jaders,
I have some problems with the following code:
From within my program I start the Platform with the following code:
---
try{
ProfileImpl profile = new ProfileImpl();
agentContainer = Runtime.instance().createMainContainer(profile);
agentContainer.installMTP(null,"jamr.jademtp.http.MessageTransportProtocol");
}
---
That far it works just fine...
At some point I'm shutting down the platform with the following code:
---
agentContainer.kill();
agentContainer=null;
--
The platform even seems to shut down correctly...
However, when I'm trying to restart the platform I get an exception:
Communication failure while contacting agent platform: Problem starting
JADE Runtime System. [nested message is: JADE]
jade.core.IMTPException: Problem starting JADE Runtime System. [nested
message is: JADE]
at jade.imtp.rmi.RMIIMTPManager.remotize(RMIIMTPManager.java:220)
at jade.core.MainContainerImpl.register(MainContainerImpl.java:204)
at jade.core.AgentContainerImpl.joinPlatform(AgentContainerImpl.java:525)
at jade.core.Runtime.createMainContainer(Runtime.java:95)
at bsRegelAgent.AgentTab$9.construct(AgentTab.java:299)
at bsRegelAgent.SwingWorker$2.run(SwingWorker.java:109)
at java.lang.Thread.run(Thread.java:536)
Nested Exception is:
java.rmi.AlreadyBoundException: JADE
at sun.rmi.registry.RegistryImpl.bind(RegistryImpl.java:123)
at sun.rmi.registry.RegistryImpl_Skel.dispatch(Unknown Source)
at sun.rmi.server.UnicastServerRef.oldDispatch(UnicastServerRef.java:342)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:207)
at sun.rmi.transport.Transport$1.run(Transport.java:148)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
at
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
at java.lang.Thread.run(Thread.java:536)
at
sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:247)
at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:350)
at sun.rmi.registry.RegistryImpl_Stub.bind(Unknown Source)
at java.rmi.Naming.bind(Naming.java:110)
at jade.imtp.rmi.RMIIMTPManager.remotize(RMIIMTPManager.java:202)
at jade.core.MainContainerImpl.register(MainContainerImpl.java:204)
at jade.core.AgentContainerImpl.joinPlatform(AgentContainerImpl.java:525)
at jade.core.Runtime.createMainContainer(Runtime.java:95)
at bsRegelAgent.AgentTab$9.construct(AgentTab.java:299)
at bsRegelAgent.SwingWorker$2.run(SwingWorker.java:109)
at java.lang.Thread.run(Thread.java:536)
----
I guess I'm not shutting down the platform correctly. Does anyone have any
hints?
Kind regards,
Michael
This archive was generated by hypermail 2a22 : Sun Jul 21 2002 - 12:11:37 MET DST