2 Replies Latest reply on Jun 1, 2010 2:59 PM by peterj

    nested exception is java.lang.LinkageError

      When I deployed my application I got the following error:

       

      Invocation of init method failed; nested exception is java.lang.LinkageError: loader constraint violation in interface itable initialization: when resolving method "oracle.jdbc.xa.client.OracleXAConnection.getXAResource()Ljavax/transaction/xa/XAResource;" the class loader (instance of org/jboss/classloader/spi/base/BaseClassLoader) of the current class, oracle/jdbc/xa/client/OracleXAConnection, and the class loader (instance of <bootloader>) for interface javax/sql/XAConnection have different Class objects for the type javax/transaction/xa/XAResource used in the signature

       

      How can I know which are the jars in conflict?

       

      Thanks a lot

      andrew

        • 1. Re: nested exception is java.lang.LinkageError

          I activated the logging for classloader and I'm getting just the following output:

          [52126,UnifiedLoaderRepository3,main] UnifiedLoaderRepository removed(false) null

           

          Why?

           

          I tried to solve the problem using the following aproach:

          <jboss-web>
          <class-loading java2ClassLoadingCompliance="false">
          <loader-repository>
          com.example:archive=unique-archive-name
          <loader-repository-config>java2ParentDelegation=false</loader-repository-config>
          </loader-repository>
          </class-loading>

          but the problem still ocurring.

          Any idea?

          thanks a lot
          • 2. Re: nested exception is java.lang.LinkageError
            peterj

            >>How can I know which are the jars in conflict?

            Most likely you are including a JAR in your app that has the duplicate class (though there are lots of other possibilities). The best way to find the JARs that loaded javax/transaction/xa/XAResource is to add the -verbose:class option to JAVA_OPTS in the run script. That option causes the JVM to report the JAR file for every class loaded.