Hi,
I ran into a classloading issue with embedded Tomcat. In the
helloworld-ws-reference test case, we use SCATestCaseRunner to run the
service with binding.ws in a new classloader (CL2) derived from the
client-side classloader (CL1). When the embedded tomcat is started, it
creates a WebAppClassLoader (CL3) and uses it as the Thread context
classloader. The WebAppClassLoader first tries to find a class in the system
classloader (which is CL1) before it delegates to its parent (which is set
to be CL2). As a result, the JAXBContextImpl is loaded by CL1 instead of CL2
and it causes a ClassCastException against the JAXBContext interface loaded
by CL2.
In our usage of embedded tomcat, the application is not really a web
application. We mostly use the tomcat as an HTTP server. I propose that we
replace the heavy WebAppLoader (which handles dynamic reloading too) with an
internal implementation which provides CL2 as the classloader. I have tested
the code locally. If there is no objection, I'll commit it.
Thanks,
Raymond
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]