1 Reply Latest reply on Apr 3, 2014 2:58 AM by To gli

    Hibernate 4 and JBoss 5 client libraries conflicts

    To gli Newbie

      Hey there,

      I´m facing such a problem: in my app (webapp on tomcat server, quite "straight forward", spring, maven) I use HIbernate 4 for DB stuff, and now I had to add JBoss 5 client libraires to be able to use JNDI and JMS stuff from external server JBoss EAP 5.1.2.

      The problem is, that Hibernat 4 uses jboss-logging 3 library, and it causes conflicts with just added, quite old, jboss client libs. Example:

       

       

      Caused by: java.lang.NoSuchMethodError: org.jboss.logging.Logger.getLoggerPlugin()Lorg/jboss/logging/LoggerPlugin;

        at org.jboss.aop.util.logging.AOPLogger.<init>(AOPLogger.java:63) ~[jboss-aop-client-jboss-eap-5.1.2.jar:2.1.6.GA_CP03]

        at org.jboss.aop.util.logging.AOPLogger.getLogger(AOPLogger.java:44) ~[jboss-aop-client-jboss-eap-5.1.2.jar:2.1.6.GA_CP03]

        at org.jboss.aop.AspectManager.<clinit>(AspectManager.java:109) ~[jboss-aop-client-jboss-eap-5.1.2.jar:2.1.6.GA_CP03]

        at org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate.<clinit>(ClientConnectionFactoryDelegate.java) ~[jboss-messaging-client-jboss-eap-5.1.2.jar:na]

        at java.io.ObjectInputStream.readObject(ObjectInputStream.java:369) ~[na:1.7.0_11]

      ....

        at java.rmi.MarshalledObject.get(MarshalledObject.java:159) ~[na:1.7.0_11]

        at org.jnp.interfaces.MarshalledValuePair.get(MarshalledValuePair.java:72) ~[jnp-client-jboss-eap-5.1.2.jar:@implementation.version@]

        at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:793) ~[jnp-client-jboss-eap-5.1.2.jar:@implementation.version@]

        at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:710) ~[jnp-client-jboss-eap-5.1.2.jar:@implementation.version@]

        at javax.naming.InitialContext.lookup(InitialContext.java:411) ~[na:1.7.0_11]

        at org.springframework.jndi.JndiTemplate$1.doInContext(JndiTemplate.java:154) ~[spring-context-3.2.3.RELEASE.jar:3.2.3.RELEASE]

        at org.springframework.jndi.JndiTemplate.execute(JndiTemplate.java:87) ~[spring-context-3.2.3.RELEASE.jar:3.2.3.RELEASE]

        at org.springframework.jndi.JndiTemplate.lookup(JndiTemplate.java:152) ~[spring-context-3.2.3.RELEASE.jar:3.2.3.RELEASE]

       

      Is there any way to solve this?

       

      From my point of view, Hibernate libs is more important than jboss libs (app is DB based, JMS connection to jboss is just one usecase), so most appreciated solution would rather have impact on jboss libs, not on hibernate.

       

      Please help...