0

We're trying to upgrade our Hibernate to v4.2.3 while still running on Jboss 5.1. Unfortunately at deploy time we're running into this error:

Error creating bean with name 'sessionFactory' defined in class path resource [application-context-model.xml]: Invocation of init method failed; nested exception is java.lang.NoSuchMethodError: org.jboss.logging.Logger.getMessageLogger(Ljava/lang/Class;Ljava/lang/String;)Ljava/lang/Object;

As far as we can tell this is due to a conflict between jboss-logging-spi bundled with Jboss and jboss-logging-3.1.0.GA required by Hibernate 4.2.3.

We've seen this question, but the answer did not help in our case: Hibernate4 on JBoss EAP 5.1.2 logging error

We've tried a bunch of "tricks", but nothing seems to work. Any ideas?

Community
  • 1
  • 1
Zecrates
  • 2,952
  • 6
  • 33
  • 50
  • Had the same issue .. please refer this http://stackoverflow.com/questions/13886682/hibernate4-on-jboss-eap-5-1-2-logging-error – basav Feb 07 '14 at 11:16

1 Answers1

0

If this problem is caused by the two libraries being in conflict, and you can not remove one implementation, you may want to try to change the order of classloading. This can be accomplished by adding a jboss-classloading.xml descriptor in your deployment artifact.

Here is an example of how to configure a deployment classloading behavior in JBoss.

codethulhu
  • 3,976
  • 2
  • 21
  • 15