Error "java.lang.NoSuchMethodError: org.jboss.logging.Logger.getMessageLogger"
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...
Solution 1:
I solved it by removing jboss-common-client-3.2.3.jar
.
Solution 2:
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