java.lang.ClassNotFoundException:org.jboss.logging.Logger [英] java.lang.ClassNotFoundException: org.jboss.logging.Logger

查看:178
本文介绍了java.lang.ClassNotFoundException:org.jboss.logging.Logger的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个奇怪的问题.我有一个 JMS 客户端应用程序&在JBoss jboss-5.1.0.GA 中配置的 MDB >.之前,我通过配置构建路径"→添加外部JAR"添加了JAR,一切运行正常.

现在,我将所有JAR移至项目下的lib文件夹中,并使用配置构建路径"→添加JAR".

现在,我在执行客户端程序时遇到以下异常:(

 线程主"中的异常java.lang.NoClassDefFoundError:org/jboss/logging/Logger在org.jnp.interfaces.NamingContext.< clinit>(NamingContext.java:160)在org.jnp.interfaces.NamingContextFactory.getInitialContext(NamingContextFactory.java:56)在javax.naming.spi.NamingManager.getInitialContext(未知来源)在javax.naming.InitialContext.getDefaultInitCtx(未知来源)在javax.naming.InitialContext.init中(未知源)在javax.naming.InitialContext上.< init>(未知来源)在com.dcat2.messaging.sendreceive.MessageReceiver_test.sendMessage(MessageReceiver_test.java:68)在com.dcat2.messaging.sendreceive.MessageReceiver_test.main(MessageReceiver_test.java:57)`产生者:java.lang.ClassNotFoundException:org.jboss.logging.Logger在java.net.URLClassLoader $ 1.run(未知源)在java.security.AccessController.doPrivileged(本机方法)在java.net.URLClassLoader.findClass(未知来源)在java.lang.ClassLoader.loadClass(未知来源)在sun.misc.Launcher $ AppClassLoader.loadClass(未知来源)在java.lang.ClassLoader.loadClass(未知来源)...另外8个 

我在类路径中有 jndi.properties 和以下JAR:

  jbossall-client.jarcommons-logging.jar并发.jarjavax.ejb.jarjms.jarjnp-client-4.2.2.GA.jarlog4j-1.2.16.jarsqljdbc4.jar 

任何人都可以帮忙吗?

解决方案

您需要 jboss-logging-3.1.0.GA ,它与Hibernate发行版一起提供,或者可以单独下载.>

I have a strange problem. I have a JMS client application & an MDB configured in JBoss jboss-5.1.0.GA. Earlier, I added the JAR by "Configure Build Path" → "Add External JARs" and everything was working fine.

Now, I moved all the JARs to a lib folder under my project and used "Configure Build Path" → "Add JARs".

Now, I get the following exception while executing the client program :(

Exception in thread "main" java.lang.NoClassDefFoundError: org/jboss/logging/Logger
at org.jnp.interfaces.NamingContext.<clinit>(NamingContext.java:160)
at org.jnp.interfaces.NamingContextFactory.getInitialContext(NamingContextFactory.java:56)
at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
at javax.naming.InitialContext.init(Unknown Source)
at javax.naming.InitialContext.<init>(Unknown Source)
at com.dcat2.messaging.sendreceive.MessageReceiver_test.sendMessage(MessageReceiver_test.java:68)
at com.dcat2.messaging.sendreceive.MessageReceiver_test.main(MessageReceiver_test.java:57)
`Caused by: java.lang.ClassNotFoundException: org.jboss.logging.Logger
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 8 more

I have jndi.properties in the classpath and the following JARs:

jbossall-client.jar
commons-logging.jar
concurrent.jar
javax.ejb.jar
jms.jar
jnp-client-4.2.2.GA.jar
log4j-1.2.16.jar
sqljdbc4.jar

Can anyone help please?

解决方案

You need jboss-logging-3.1.0.GA, which comes with the Hibernate distribution or can be downloaded separately.

这篇关于java.lang.ClassNotFoundException:org.jboss.logging.Logger的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆