0 Replies Latest reply on Sep 25, 2013 3:45 AM by sm4

    Classloading issues when using Arquillian - Xerces

    sm4

      I have a lot of tests that work just fine, but one of the tests is using XMLUnit to compare XMLs. I use existing EAR that I enrich with Arq tests. It is deployed to JBoss 7.1.1. Final. I am not sure how Arqullian bundles JARs when deploying the EAR. I had to include the XMLUnit jar manually even though it's defined as test scope dependency - I think the first problem is already here. After I add it manually I am getting this exception:

       

      java.lang.IllegalAccessError: tried to access method org.apache.xerces.jaxp.DocumentBuilderImpl.<init>(Lorg/apache/xerces/jaxp/DocumentBuilderFactoryImpl;Ljava/util/Hashtable;Ljava/util/Hashtable;Z)V from class org.apache.xerces.jaxp.DocumentBuilderFactoryImpl
              at org.apache.xerces.jaxp.DocumentBuilderFactoryImpl.newDocumentBuilder(DocumentBuilderFactoryImpl.java:103)
              at org.custommonkey.xmlunit.XMLUnit.newControlParser(XMLUnit.java:147)
              at org.custommonkey.xmlunit.Diff.<init>(Diff.java:101)
              at org.custommonkey.xmlunit.Diff.<init>(Diff.java:93)
      ... 
      

       

      My application uses xerces which is defined as provided dependency, and the EAR defines module dependency on JBoss' Xerces. I believe this is class loading issue, when I have two Xerces jars on classpath.

       

      How can I find out where are these conflicts coming from? Is there a way how to get the full classpath (or module path) from the JBoss module class loader?