Java NoClassDefFound Error

2019-02-06 15:11发布

I am trying to run a basic Hibernate program. When I run it, I am getting the below error

java.lang.NoClassDefFoundError: org/jboss/logging/BasicLogger

I tried google'ing for it and did include the following jar files in my classpath :-

  • jboss-common-3.2.3.jar
  • jboss-common-client-3.2.3.jar

Am I missing some more jar file ?

Thanks


EDIT :

I did include the following jar file inside classpath :-

  • jboss-logging-3.1.0.CR1.jar

But, Facing the error:

java.lang.NoSuchMethodError: org.jboss.logging.Logger.getMessageLogger(Ljava/lang/Class;Ljava/lang/String;)Lj‌​ava/lang/Object

4条回答
一纸荒年 Trace。
2楼-- · 2019-02-06 15:21

To solve

 java.lang.NoSuchMethodError: org.jboss.logging.Logger.getMessageLogger(Ljava/lang/Class;Ljava/lang/String;)Lj‌​ava/lang/Object

use the JAR file (jboss-client-7.1.0.Final.jar) this will help you to solve solve your error

查看更多
狗以群分
3楼-- · 2019-02-06 15:34

If those files already exist, try adding them to your Java Build Path. You can use this as reference: Java Build Path

查看更多
ら.Afraid
4楼-- · 2019-02-06 15:45

Yes jboss-logging.jar org/jboss/logging/BasicLogger is inside jboss-logging.jar

You can find list of dependent jar for this jar in used by section in this link.

This version should contain the method.

查看更多
对你真心纯属浪费
5楼-- · 2019-02-06 15:46

You need jboss-logging.jar

You can get it from here

查看更多
登录 后发表回答