java 板


LINE

如題,因為製作專題的關係,需要使用到代理人 因此選定jade來做為代理人來運作 但我在運行jade官網所提供的範例時 一直無法運行成功 所以請各位大大幫忙看一下哪邊設置有問題,或者是錯誤 參考文章:http://0rz.tw/FPorE 基本上都是按照參考文章的方式設定,只是不知道為什麼會出現 以下是關於運行的相關資料和程式碼、錯誤訊息 運行環境為 jdk1.7.0_01 + eclipse indigo + jade 3.4.1 環境變數: .;C:\jade\lib\jade.jar; C:\jade\lib\jadeTools.jar; C:\jade\lib\http.jar; C:\jade\lib\iiop.jar; C:\jade\lib\commons-codec\commons-codec-1.3.jar 運行的範例程式碼: package examples.hallo; import jade.core.Agent; /** This example show a minimal agent that just prints "Hallo World!" and then terminates. @author Giovanni Caire - TILAB */ public class HalloWorldAgent extends Agent { protected void setup() { System.out.println("Hallo World! My name is "+getLocalName()); // Make this agent terminate doDelete(); } } 錯誤訊息有兩個(有點長....): 1.第一次執行會出現 三月 17, 2012 5:07:04 下午 jade.core.Runtime beginContainer 資訊: ---------------------------------- This is JADE 3.4.1 - revision 5912 of 2006/11/16 13:09:18 downloaded in Open Source, under LGPL restrictions, at http://jade.tilab.com/ ---------------------------------------- 三月 17, 2012 5:07:06 下午 jade.core.BaseService init 資訊: Service jade.core.management.AgentManagement initialized 三月 17, 2012 5:07:06 下午 jade.core.BaseService init 資訊: Service jade.core.messaging.Messaging initialized 三月 17, 2012 5:07:06 下午 jade.core.BaseService init 資訊: Service jade.core.mobility.AgentMobility initialized 三月 17, 2012 5:07:06 下午 jade.core.BaseService init 資訊: Service jade.core.event.Notification initialized 三月 17, 2012 5:07:06 下午 jade.mtp.http.HTTPServer <init> 資訊: HTTP-MTP Using XML parser com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser 三月 17, 2012 5:07:06 下午 jade.core.messaging.MessagingService boot 資訊: MTP addresses: http://E801Lab-PC:7778/acc 三月 17, 2012 5:07:06 下午 jade.core.AgentContainerImpl startBootstrapAgents 嚴重: Cannot create agent Hallo: Class examples.hallo.HalloWorldAgent for agent ( agent-identifier :name Hallo@E801Lab-PC:1099/JADE ) not found [nested java.lang.ClassNotFoundException: examples.hallo.HalloWorldAgent] 三月 17, 2012 5:07:06 下午 jade.core.AgentContainerImpl joinPlatform 資訊: -------------------------------------- Agent container Main-Container@JADE-IMTP://E801Lab-PC is ready. -------------------------------------------- 會出現一個嚴重:Cannot create agent Hallo: Class examples.hallo.HalloWorldAgent for agent ( agent-identifier :name Hallo@E801Lab-PC:1099/JADE ) not found [nested java.lang.ClassNotFoundException: examples.hallo.HalloWorldAgent] 想請問這要如何解決??? 2.再來是有時候也會出現下面這個情況,想請問要如何解決??? 三月 17, 2012 4:43:26 下午 jade.core.AgentContainerImpl joinPlatform 嚴重: Some problem occurred while joining agent platform. 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(Unknown Source) at jade.core.ProfileImpl.getPlatformManager(Unknown Source) at jade.core.ProfileImpl.getServiceManager(Unknown Source) at jade.core.AgentContainerImpl.init(Unknown Source) at jade.core.AgentContainerImpl.joinPlatform(Unknown Source) at jade.core.Runtime.createMainContainer(Unknown Source) at jade.Boot.<init>(Unknown Source) at jade.Boot.main(Unknown Source) Nested Exception: jade.core.IMTPException: The Service Manager was already bound in the RMI Registry [nested java.rmi.AlreadyBoundException: ServiceManager] at jade.imtp.rmi.RMIIMTPManager.exportPlatformManager(Unknown Source) at jade.core.ProfileImpl.createPlatformManager(Unknown Source) at jade.core.ProfileImpl.getPlatformManager(Unknown Source) at jade.core.ProfileImpl.getServiceManager(Unknown Source) at jade.core.AgentContainerImpl.init(Unknown Source) at jade.core.AgentContainerImpl.joinPlatform(Unknown Source) at jade.core.Runtime.createMainContainer(Unknown Source) at jade.Boot.<init>(Unknown Source) at jade.Boot.main(Unknown Source) Nested Exception: java.rmi.AlreadyBoundException: ServiceManager at sun.rmi.registry.RegistryImpl.bind(RegistryImpl.java:153) at sun.rmi.registry.RegistryImpl_Skel.dispatch(Unknown Source) at sun.rmi.server.UnicastServerRef.oldDispatch(UnicastServerRef.java:409) at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:267) at sun.rmi.transport.Transport$1.run(Transport.java:177) at sun.rmi.transport.Transport$1.run(Transport.java:174) at java.security.AccessController.doPrivileged(Native Method) at sun.rmi.transport.Transport.serviceCall(Transport.java:173) at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:553) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:808) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:667) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) at java.lang.Thread.run(Thread.java:722) at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(Unknown 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(Unknown Source) at jade.core.ProfileImpl.createPlatformManager(Unknown Source) at jade.core.ProfileImpl.getPlatformManager(Unknown Source) at jade.core.ProfileImpl.getServiceManager(Unknown Source) at jade.core.AgentContainerImpl.init(Unknown Source) at jade.core.AgentContainerImpl.joinPlatform(Unknown Source) at jade.core.Runtime.createMainContainer(Unknown Source) at jade.Boot.<init>(Unknown Source) at jade.Boot.main(Unknown Source) 三月 17, 2012 4:43:26 下午 jade.core.Runtime$1 run 資訊: JADE is closing down now. 麻煩大大解答了,謝謝 --



※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 163.13.138.233 ※ 編輯: ken12517 來自: 163.13.138.233 (03/17 17:05) ※ 編輯: ken12517 來自: 163.13.138.233 (03/17 17:09)
1F:→ xlk:examples/hello/HelloWorldAgent.java outdated article! 03/18 16:12







like.gif 您可能會有興趣的文章
icon.png[問題/行為] 貓晚上進房間會不會有憋尿問題
icon.pngRe: [閒聊] 選了錯誤的女孩成為魔法少女 XDDDDDDDDDD
icon.png[正妹] 瑞典 一張
icon.png[心得] EMS高領長版毛衣.墨小樓MC1002
icon.png[分享] 丹龍隔熱紙GE55+33+22
icon.png[問題] 清洗洗衣機
icon.png[尋物] 窗台下的空間
icon.png[閒聊] 双極の女神1 木魔爵
icon.png[售車] 新竹 1997 march 1297cc 白色 四門
icon.png[討論] 能從照片感受到攝影者心情嗎
icon.png[狂賀] 賀賀賀賀 賀!島村卯月!總選舉NO.1
icon.png[難過] 羨慕白皮膚的女生
icon.png閱讀文章
icon.png[黑特]
icon.png[問題] SBK S1安裝於安全帽位置
icon.png[分享] 舊woo100絕版開箱!!
icon.pngRe: [無言] 關於小包衛生紙
icon.png[開箱] E5-2683V3 RX480Strix 快睿C1 簡單測試
icon.png[心得] 蒼の海賊龍 地獄 執行者16PT
icon.png[售車] 1999年Virage iO 1.8EXi
icon.png[心得] 挑戰33 LV10 獅子座pt solo
icon.png[閒聊] 手把手教你不被桶之新手主購教學
icon.png[分享] Civic Type R 量產版官方照無預警流出
icon.png[售車] Golf 4 2.0 銀色 自排
icon.png[出售] Graco提籃汽座(有底座)2000元誠可議
icon.png[問題] 請問補牙材質掉了還能再補嗎?(台中半年內
icon.png[問題] 44th 單曲 生寫竟然都給重複的啊啊!
icon.png[心得] 華南紅卡/icash 核卡
icon.png[問題] 拔牙矯正這樣正常嗎
icon.png[贈送] 老莫高業 初業 102年版
icon.png[情報] 三大行動支付 本季掀戰火
icon.png[寶寶] 博客來Amos水蠟筆5/1特價五折
icon.pngRe: [心得] 新鮮人一些面試分享
icon.png[心得] 蒼の海賊龍 地獄 麒麟25PT
icon.pngRe: [閒聊] (君の名は。雷慎入) 君名二創漫畫翻譯
icon.pngRe: [閒聊] OGN中場影片:失蹤人口局 (英文字幕)
icon.png[問題] 台灣大哥大4G訊號差
icon.png[出售] [全國]全新千尋侘草LED燈, 水草

請輸入看板名稱,例如:Soft_Job站內搜尋

TOP