Please refer to the following discussion for a detailed description of the problem:
http://www.jboss.org/index.html?module=bb&op=viewtopic&t=158645
The problem is caused by the fact that at the time of xerces parser initialization, the
context classloader is set to the war classloader while the current classloader is the
deployer classloader. This leads to a ClassCastException because the various xerces
classes are loaded by the 2 different classloaders mentioned.
The solution is for JBossXB to set the context classloader to the current classloader
before initializing xerces and then to restore the context classloader to its old value
after the initialization is completed.
I've seen numerous posts about this issue in the forums and none of the workarounds
offered resolve the underlying problem. The solution must allow a war to bundle and use
it's own version of the xerces jars without causing the app server to throw
ClassCastExceptions.
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4249957#...
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&a...