title: Jboss deployment error: class A cannot access its superclass B
body: <p>I'm pretty new to JBoss and I'm trying to deploy a .war file on JBoss version 7.0.6 GA.</p>
  
  <p>The .war file is created with the "export as .war file" option in Eclipse.</p>
  
  <p>If I deploy the same .war file on Tomcat, it works without any error. </p>
  
  <p>When I deploy on Jboss, I came across this strange error:</p>
  
  <pre><code>2017-10-20 17:29:26,803 ERROR [stderr] (ServerService Thread Pool -- 106) 
  Caused by: java.lang.IllegalAccessError: Failed to link 
  org/apache/log4j/xml/ExtXMLWatchdog (Module "deployment.
  [MY_WAR_NAME].war:main" from Service Module Loader): class 
  org.apache.log4j.xml.ExtXMLWatchdog cannot access its superclass 
  org.apache.log4j.xml.XMLWatchdog
  </code></pre>
  
  <p>I'm using the log4j-1.2.17.jar library inside my web app; also, I'm using another custom library named util-log4j.jar.</p>
  
  <p>Inside the log4j-1.2.17.jar is defined the class org.apache.log4j.xml.XMLWatchdog; inside the util-log4j.jar is defined the class 
  org.apache.log4j.xml.ExtXMLWatchdog.</p>
  
  <p>It seems that the ExtXMLWatchdog cannot see the XMLWatchdog defined in another .jar, but why? </p>
  
  <p>Thank you,
  cheers!</p>