13

I am trying to build 1 hybrid test project using spring + hibernate. After deploying... I am getting frustrated with this error.. and searched in google but still not getting it working...

Caused by: java.lang.NoSuchMethodError: org.jboss.logging.Logger.getMessageLogger(Ljava/lang/Class;Ljava/lang/String;)Ljava/lang/Object;
at org.hibernate.annotations.common.util.impl.LoggerFactory.make(LoggerFactory.java:34)
at org.hibernate.annotations.common.Version.<clinit>(Version.java:34)
at org.hibernate.annotations.common.reflection.java.JavaReflectionManager.<clinit>(JavaReflectionManager.java:73)
at org.hibernate.cfg.AnnotationConfiguration.reset(AnnotationConfiguration.java:311)
at org.hibernate.cfg.Configuration.<init>(Configuration.java:216)
at org.hibernate.cfg.Configuration.<init>(Configuration.java:220)
at org.hibernate.cfg.AnnotationConfiguration.<init>(AnnotationConfiguration.java:168)

Trying jboss-logger 3.1.0.CR2, as well as a variety of different jboss-logging, different versions.

How to resolve it?

Below is image attached to have a look if any version concurrencies are present or any dependencies are missing... Library structure for project

ROMANIA_engineer
  • 54,432
  • 29
  • 203
  • 199
Love Sharma
  • 1,981
  • 1
  • 18
  • 37
  • https://community.jboss.org/message/604269 – Kazekage Gaara Jun 01 '12 at 07:32
  • Thanks @KazekageGaara, but they are using maven shade and i dont wanna go and do setup for maven and even i am not gonna use maven, i went through this solution as well but... not useful.. if you can let me know any more idea that would be great... :) Thanks a lot – Love Sharma Jun 01 '12 at 07:42

5 Answers5

10

I solved it by removing jboss-common-client-3.2.3.jar.

Kalle Richter
  • 8,008
  • 26
  • 77
  • 177
RAS
  • 8,100
  • 16
  • 64
  • 86
  • 2
    had same problem with "jboss-common-core" "2.2.17.GA" added exclusion for "org.jboss.logging" "jboss-logging-spi" – javatestcase Apr 30 '14 at 17:56
6

Got the same problem with org.jboss.logging-3.1.0.GA needed by Springframework 4.1.3 Final.

The solution for me was to exclude org.jboss.logging coming from Hibernate and add org.jboss.logging-3.2.0.Final to my project in the pom.xml. As specify here org.jboss.logging-3.1.0.GA (and CR2) has a failure in LoggerProviders detection and it is fixed in 3.2.0 Final Voir le Github de Jboss Logging

JN Gerbaux
  • 151
  • 2
  • 6
3

Is it an incorrect version of JBoss Logging jar on your client classpath? If you have JBoss 7.1.0 Final version then remove all the JAR filesfrom your classpath and add only one client JAR file (jboss-client-7.1.0.Final.jar) which is located in AS7_HOME/bin/client.

For further reference, you can see this.

Kazekage Gaara
  • 14,972
  • 14
  • 61
  • 108
0

I faced the same problem. I removed glassfish libraries from buildpath, and problem resolved.

Yasin Okumuş
  • 2,299
  • 7
  • 31
  • 62
0

I had the same problem with jboss-4.2.3GA.

This happened because in the [JBOSS_HOME]\lib folder there is a jboss-common.jar library that also has an org.jboss.logging.Logger class and this is the one that takes into account.

My solution was to add the jboss-logging-3.3.0.Final.jar library to the [JBOSS_HOME]\lib\endorsed folder and take into account that when starting the server it has the option -Djava.endorsed.dirs = [JBOSS_HOME]\lib\endorsed.

After this, it started showing a warning from java.lang.NoSuchMethodError: org.jboss.logging.Logger.getLoggerPlugin()Lorg/jboss/logging/LoggerPlugin;

...but that is another matter.

shaedrich
  • 5,457
  • 3
  • 26
  • 42
Migueles
  • 26
  • 4