繁体   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