[jboss-user] [Installation, Configuration & Deployment] - EAR isolation problem

armorris007 do-not-reply at jboss.com
Wed Oct 25 12:39:39 EDT 2006


I'm running JBoss 4.0.4 GA on JDK 1.5.

Having repackaged my application to work with an isolated EAR classloader, I have specified the following in my jboss-app.xml:


  | <jboss-app>
  |   <loader-repository>
  |        myapp:loader=myapp.ear
  |        <loader-repository-config>
  |          java2ParentDelegation=false
  |        </loader-repository-config>
  |   </loader-repository>
  | </jboss-app>

I also have ensured the following default values are used for the Tomcat classloading:


  |  <attribute name="Java2ClassLoadingCompliance">false</attribute>
  |  <attribute name="UseJBossWebLoader">false</attribute>

Despite this, I am finding that I am getting a classloader conflict relating to commons-http-cilent.jar.  This JAR is packaged as part of my EAR application (loaded by the application's EAR classloader), however, it is also a server/lib library which is shipped as part of JBoss 4.0.4. 

Contrary to what the documentation states here:

http://wiki.jboss.org/wiki/Wiki.jsp?page=ClassLoadingConfiguration

anonymous wrote :  Isolation with Overriding Server Classes
  | 
  | Use the following constructs to enabled scoped class loading with the deployment classes overriding the server classes.
  | 
  | For jboss-app.xml:
  | 
  |  
  |   | <jboss-app>
  |   |   <loader-repository> 
  |   |   com.example:loader=unique-archive-name 
  |   |      <loader-repository-config> 
  |   |      java2ParentDelegation=false 
  |   |      </loader-repository-config> 
  |   |   </loader-repository>
  |   | </jboss-app>
  |   | 
  | 

I am basically finding that the older commons-httpclient.jar as shipped with  JBoss - is being used INSTEAD of the jar file I've shipped as part of my EAR.

The only way I've found to resolve this issue is by following the documentation for JBoss 3.2.3 - as specified on this page: 
http://wiki.jboss.org/wiki/Wiki.jsp?page=ClassLoadingConfiguration

which states that a change to the "Isolation" attribute in the ear-deployer.xml file is needed.

I don't see why I need to make a system wide change - by changing this value IN ADDITION to specifying that I want an isolated EAR classloader by means of the instructions defined in jboss-app.xml.

As far as my application is concerned - I want an isolated classloader for my EAR - I do not want to affect the inter-operability of other EAR applications deployed within the server by having to change the system wide property defined in ear-deployer.xml.

Can anyone confirm that I have indeed found a bug? Or is this oddly by design?

Andy

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3980764#3980764

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3980764



More information about the jboss-user mailing list