Read about (scoped) classloading in jboss wiki.
Try this as WEB-INF/jboss-web.xml, replacing @WEB_APP_NAME@ with your names:
<!DOCTYPE jboss-web PUBLIC "-//JBoss//DTD Web Application 2.4//EN" "http://www.jboss.org/j2ee/dtd/jboss-web_4_0.dtd"> <jboss-web> <class-loading java2ClassLoadingCompliance='false'> <loader-repository> mbisoftware.biz:loader=@WEB_APP_NAME@.war <loader-repository-config>java2ParentDelegation=false</loader-repository-config> </loader-repository> </class-loading> </jboss-web>
Thanks for the help, but I still can't get this to work.
First of all I had to construct a jboss-web.xml, I didn't have any from the beginning. First I had some problem with that the server stoped reding my web.xml when I added the jboss-web.xml but I think I sorted that out.
Anyway it still doesn't work, I'm getting load exceptions when I start the server. Is it something more I have to do, add anything else to the jboss-web.xml file?
I tried some other examples of jboss-web.xml configurations, found when I read about scoped class loading, but I get the same result.
I'm running jboss ver. 3.2.5, shall I upgrade?
I am also getting this problem - orginally I have a clash between my instance of JBoss (be it 3.0.4 or 3.0.8 or 3.2.7) and my applications commons-collections libraries.
Putting the jboss-web.xml patch into place does nothing for 3.0.x - looks like it might have to be upgrade time then. But when I put the patch on my 3.2.7 version, it started throwing these sorts of exceptions instead;
org.jboss.deployment.DeploymentException: Error during deploy; - nested throwable: (ReflectionException: Cannot find setter method setDocBase null Cause: java.lang.NoSuchMethodException: org.apache.commons.modeler.BaseModelMBean.setDocBase(java.lang.String))
I have tried to find other solutions to this problem, but no matter where I investiagte, it always seems to recommend using the xml above - esp. here : http://www.jboss.org/wiki/Wiki.jsp?page=ClassLoadingConfiguration (section : Isolation with Overriding)
But this xml just give me the MBean exceptions... can anyone offer any further information ? Thanks.