英文:
when i try to run Hello Agent for second time this Error happen
问题
第一次运行它时,它正常工作,但第二次会显示"jade.core.Runtime"错误。如果我关闭Eclipse并重新打开它,它会再次正常运行。
在第二次出现这个错误之后,以下内容显示:
May 04, 2020 5:46:03 AM jade.Boot parseCmdLineArgs
WARNING: WARNING: ignoring command line argument , occurring after agents specification
May 04, 2020 5:46:03 AM jade.core.Runtime beginContainer
INFO: ----------------------------------
This is JADE 4.5.0 - revision 6825 of 23-05-2017 10:06:04
downloaded in Open Source, under LGPL restrictions,
at http://jade.tilab.com/
----------------------------------------
May 04, 2020 5:46:04 AM jade.imtp.leap.CommandDispatcher addICP
WARNING: Error adding ICP jade.imtp.leap.JICP.JICPPeer@65ae6ba4[Cannot bind server socket to localhost port 1099].
May 04, 2020 5:46:04 AM jade.core.AgentContainerImpl joinPlatform
SEVERE: Communication failure while joining agent platform: No ICP active
jade.core.IMTPException: No ICP active
at jade.imtp.leap.LEAPIMTPManager.initialize(LEAPIMTPManager.java:138)
at jade.core.AgentContainerImpl.init(AgentContainerImpl.java:321)
at jade.core.AgentContainerImpl.joinPlatform(AgentContainerImpl.java:499)
at jade.core.Runtime.createMainContainer(Runtime.java:159)
at jade.Boot.main(Boot.java:89)
May 04, 2020 5:46:04 AM jade.core.Runtime$1 run
INFO: JADE is closing down now.
如何修复这个问题?
英文:
First time that i run it, it works but second time it shows jade.core.Runtime.
if i close the eclipse and open it, it run okay but second time it happens again.
import jade.core.Agent;
public class Asadi extends Agent {
@Override
protected void setup() {
System.out.println("Hello world");
}
}
after second time this error shows.
May 04, 2020 5:46:03 AM jade.Boot parseCmdLineArgs
WARNING: WARNING: ignoring command line argument , occurring after agents specification
May 04, 2020 5:46:03 AM jade.core.Runtime beginContainer
INFO: ----------------------------------
This is JADE 4.5.0 - revision 6825 of 23-05-2017 10:06:04
downloaded in Open Source, under LGPL restrictions,
at http://jade.tilab.com/
----------------------------------------
May 04, 2020 5:46:04 AM jade.imtp.leap.CommandDispatcher addICP
WARNING: Error adding ICP jade.imtp.leap.JICP.JICPPeer@65ae6ba4[Cannot bind server socket to localhost port 1099].
May 04, 2020 5:46:04 AM jade.core.AgentContainerImpl joinPlatform
SEVERE: Communication failure while joining agent platform: No ICP active
jade.core.IMTPException: No ICP active
at jade.imtp.leap.LEAPIMTPManager.initialize(LEAPIMTPManager.java:138)
at jade.core.AgentContainerImpl.init(AgentContainerImpl.java:321)
at jade.core.AgentContainerImpl.joinPlatform(AgentContainerImpl.java:499)
at jade.core.Runtime.createMainContainer(Runtime.java:159)
at jade.Boot.main(Boot.java:89)
May 04, 2020 5:46:04 AM jade.core.Runtime$1 run
INFO: JADE is closing down now.
how can i fix this?
专注分享java语言的经验与见解,让所有开发者获益!
评论