[jboss-user] [Installation, Configuration & DEPLOYMENT] - Re: ClassCastException due to Xerces conflict during app dep

rodos77 do-not-reply at jboss.com
Tue Jul 28 10:21:38 EDT 2009


"jaikiran" wrote : 
  | I tried to reproduce this issue. The error only affects the application which ships the xercesImpl.jar (or other xerces/xml related jars).
  | 

Yes, I know.  That's what I'm complaining about.

"jaikiran" wrote : 
  | Although the 3 log lines that you posted might give an impression that its affects other (default) apps too, but in reality it just fails to deploy only your application.
  | 

I never complained about any default apps.  I'm complaining about my app.

"jaikiran" wrote : 
  | The fix is to isolate your deployments with classloader isolation configuration http://www.jboss.org/community/wiki/ClassLoadingConfiguration
  | 

This is not the preferred way to configure classloader isolation for JBoss 5.

"jaikiran" wrote : 
  | Also see this http://www.jboss.org/index.html?module=bb&op=viewtopic&t=154592#4233045
  | 
  | If none of it works, feel free to post more details (including what those changes lead to).
  | 

As I've stated in my post, I tried using classloader isolation but the only way it works is if I use it like so:


  | <classloading xmlns="urn:jboss:classloading:1.0"
  |               name="MyWar.war"
  |               domain="MyWar_Domain"
  |               export-all="NON_EMPTY"
  |               import-all="false"
  |               parent-first="true">
  | </classloading>
  | 

However, this changes the servlet spec classloading behaviour as well as causes other Exceptions in my application (which I am not posting here since they are app specific) because my app is now using the JBoss xerces and not my own.  Therefore, this is not an acceptable solution.

If I configure classloading isolation like so (notice the different value for parent-first), I get the same Exceptions as posted above.


  | <classloading xmlns="urn:jboss:classloading:1.0"
  |               name="MyWar.war"
  |               domain="MyWar_Domain"
  |               export-all="NON_EMPTY"
  |               import-all="false"
  |               parent-first="false">
  | </classloading>
  | 

I've already explained all this in my post.  The problem is that JBoss is using my web application's classloader during deployment instead of its own.

Can you just answer this one question:  If you look at the Exception stacktrace, there is no sign of application specific classes there, so how come it is the xerces bundled with the application that gets used to parse the xml files?

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

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



More information about the jboss-user mailing list