jade提示Can't get a proxy to the Platform Manager

操作情形:
在bookTrading例子中,开两个cmd,分别运行Seller和Buyer两个代理
>java jade.Boot -gui a1:examples.bookTrading.BookSellerAgent
>java jade.Boot -gui a2:examples.bookTrading.BookBuyerAgent("book2")
具体出错:
[jade-develop] jade.core.ProfileException: Can't get a proxy to the Platform Manager [nested jade.core.IMTPException: The Service Manager was already bound in the RMI Registry [nested java.rmi.AlreadyBoundException: ServiceManager]]
at jade.core.ProfileImpl.createPlatformManager(ProfileImpl.java:574)
at jade.core.ProfileImpl.getPlatformManager(ProfileImpl.java:487)
at jade.core.ProfileImpl.getServiceManager(ProfileImpl.java:501)
at jade.core.AgentContainerImpl.init(AgentContainerImpl.java:342)
at jade.core.AgentContainerImpl.joinPlatform(AgentContainerImpl.java:478
)
at jade.core.Runtime.createMainContainer(Runtime.java:148)
at jade.Boot.<init>(Boot.java:130)
at jade.Boot.main(Boot.java:70)
Nested Exception:
jade.core.IMTPException: The Service Manager was already bound in the RMI Regist
ry [nested java.rmi.AlreadyBoundException: ServiceManager]
at jade.imtp.rmi.RMIIMTPManager.exportPlatformManager(RMIIMTPManager.jav
a:276)
at jade.core.ProfileImpl.createPlatformManager(ProfileImpl.java:563)
at jade.core.ProfileImpl.getPlatformManager(ProfileImpl.java:487)
at jade.core.ProfileImpl.getServiceManager(ProfileImpl.java:501)
at jade.core.AgentContainerImpl.init(AgentContainerImpl.java:342)
at jade.core.AgentContainerImpl.joinPlatform(AgentContainerImpl.java:478
)
at jade.core.Runtime.createMainContainer(Runtime.java:148)
at jade.Boot.<init>(Boot.java:130)
at jade.Boot.main(Boot.java:70)
Nested Exception:
java.rmi.AlreadyBoundException: ServiceManager
at sun.rmi.registry.RegistryImpl.bind(Unknown Source)
at sun.rmi.registry.RegistryImpl_Skel.dispatch(Unknown Source)
at sun.rmi.server.UnicastServerRef.oldDispatch(Unknown Source)
at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)
at sun.rmi.transport.Transport$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(Unknown Sou
rce)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Sour
ce)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source
)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(Unknow
n Source)
at sun.rmi.transport.StreamRemoteCall.executeCall(Unknown Source)
at sun.rmi.server.UnicastRef.invoke(Unknown Source)
at sun.rmi.registry.RegistryImpl_Stub.bind(Unknown Source)
at java.rmi.Naming.bind(Unknown Source)
at jade.imtp.rmi.RMIIMTPManager.exportPlatformManager(RMIIMTPManager.jav
a:224)
at jade.core.ProfileImpl.createPlatformManager(ProfileImpl.java:563)
at jade.core.ProfileImpl.getPlatformManager(ProfileImpl.java:487)
at jade.core.ProfileImpl.getServiceManager(ProfileImpl.java:501)
at jade.core.AgentContainerImpl.init(AgentContainerImpl.java:342)
at jade.core.AgentContainerImpl.joinPlatform(AgentContainerImpl.java:478
)
at jade.core.Runtime.createMainContainer(Runtime.java:148)
at jade.Boot.<init>(Boot.java:130)
at jade.Boot.main(Boot.java:70)
2010-3-16 11:22:22 jade.core.Runtime$1 run
信息: JADE is closing down now.

出错原因:在同一台机子,同一个端口上启动两个Main Container ;或者同一个Container中有两个同名的Agent。
修正方法:一次同时运行两个agent
>java jade.Boot -gui a1:examples.bookTrading.BookSellerAgent a2:exam
ples.bookTrading.BookBuyerAgent("book2")
修正结果:成功
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值