簡體   English   中英

Jade Agents中的NoClassDefFoundError?

[英]NoClassDefFoundError in Jade Agents?

我創建了兩個代理,它運行良好。 但是當我添加本體類並注冊本體時,我無法創建代理...我遇到了以下錯誤。

Jun 1, 2012 8:56:55 AM jade.core.BaseService init
INFO: Service jade.core.management.AgentManagement initialized
Jun 1, 2012 8:56:55 AM jade.core.BaseService init
INFO: Service jade.core.messaging.Messaging initialized
Jun 1, 2012 8:56:55 AM jade.core.BaseService init
INFO: Service jade.core.mobility.AgentMobility initialized
Jun 1, 2012 8:56:55 AM jade.core.BaseService init
INFO: Service jade.core.event.Notification initialized
Jun 1, 2012 8:56:55 AM jade.core.messaging.MessagingService clearCachedSlice
INFO: Clearing cache
Jun 1, 2012 8:56:55 AM jade.mtp.http.HTTPServer <init>
INFO: HTTP-MTP Using XML parser com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser
Jun 1, 2012 8:56:55 AM jade.core.messaging.MessagingService boot
INFO: MTP addresses:
http://169.254.108.164:7778/acc
Jun 1, 2012 8:56:55 AM jade.core.AgentContainerImpl startBootstrapAgents
SEVERE: Cannot create agent STMAgent: An undeclared exception was thrown [nested   java.lang.ExceptionInInitializerError]
Jun 1, 2012 8:56:55 AM jade.core.AgentContainerImpl startBootstrapAgents
SEVERE: Cannot create agent REquestAgent: An undeclared exception was thrown [nested java.lang.NoClassDefFoundError: Could not initialize class FruitOntology.FruitOntology]
Jun 1, 2012 8:56:55 AM jade.core.AgentContainerImpl joinPlatform

類路徑正確。 本體類的路徑也是正確的。這是什么原因? 請幫助我.............我發現了錯誤..這是在我的本體論課上..謝謝..

關鍵錯誤消息似乎是:

SEVERE: Cannot create agent REquestAgent: An undeclared exception was thrown 
  [nested java.lang.NoClassDefFoundError: 
   Could not initialize class FruitOntology.FruitOntology]

您的代碼未在程序包FruitOntology找到類FruitOntology (這不是一個很好的程序包名稱-通常,程序包名稱以小寫字母開頭,並且通常遵循顛倒組織域名的約定)。

由於您沒有顯示任何代碼,因此我們只能猜測為什么會出現此錯誤。 您是否可能在某個地方的配置文件中拼錯了名稱? 在項目中執行grep,以查看FruitOntology.FruitOntology 它可能不在普通的Java代碼中,因為您會因缺少類而遇到編譯錯誤,除非出於某種原因使用Java Reflection。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM