title: How to force jboss to load classes from jars in webapp's lib
body: <p>I am trying to deploy my web application on <code>jboss-6.0.0Final</code>, which is currently deployed on <code>apache tomcat</code>.
  I have two jars one that contains same package which is <code>org.apache.axis</code>. I am putting one jar in <code>&lt;Jboss-home&gt;/server/default/lib</code> &amp; another jar in <code>&lt;my-app-war&gt;WEB-INF/lib</code>.</p>
  
  <p>It is required to put both jars in the class path. No way to remove one of the jar. So I need to keep both jars. &amp; It is giving me following error</p>
  
  <pre><code>java.lang.ClassCastException: org.apache.axis.attachments.AttachmentsImpl cannot be cast to org.apache.axis.attachments.Attachments
      at org.apache.axis.AxisFault.makeFault(AxisFault.java:101)
      at org.apache.axis.client.Call.invoke(Call.java:1828)
  </code></pre>
  
  <p>I think it is due to conflict of same classes in two different jars.</p>
  
  <p>Now, I want to know the way by which I can force jboss to load classes of this particular package from axis.jar exist in /WEB-INF/lib.</p>
  
  <p>How can I do that? </p>