How to force jboss to load classes from jars in webapp's lib
13:06 09 Feb 2011

I am trying to deploy my web application on jboss-6.0.0Final, which is currently deployed on apache tomcat. I have two jars one that contains same package which is org.apache.axis. I am putting one jar in /server/default/lib & another jar in WEB-INF/lib.

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. & It is giving me following error

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)

I think it is due to conflict of same classes in two different jars.

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.

How can I do that?

deployment jboss classloading