[
http://issues.apache.org/jira/browse/AXIS-1297?page=comments#action_12360359 ]
Scott Z commented on AXIS-1297:
-------------------------------
I ran into a similar issue when using Axis 1.1 in Websphere 6.0. Here is the
stack:
00000036 WebApp E SRVE0026E: [Servlet Error]-[/jsp/index.jsp]:
java.lang.LinkageError: Class javax/xml/transform/Source violates loader
constraints: definition mismatch between parent and child loaders
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:1747)
at java.lang.Class.getConstructor1(Class.java:2063)
at java.lang.Class.newInstance3(Class.java(Compiled Code))
at java.lang.Class.newInstance(Class.java(Compiled Code))
at javax.xml.transform.FactoryFinder.newInstance(Unknown Source)
at javax.xml.transform.FactoryFinder.find(Unknown Source)
at javax.xml.transform.TransformerFactory.newInstance(Unknown Source)
I tried Axis 1.3 (when the javax.xml.transform.Source is not packaged in
jaxrpc.jar) and that worked. So I understand this is a resolved issue now, but
without upgrading Axis, is there a way to solve this issue? We use Axis also in
other parts of the product and the impact of testing the upgrade is not
trivial. I'd appreciate if you have any suggestions on this.
> Axis's jaxrpc.jar includes some interfaces from JAXP, causing class cast
> exceptions in JBoss, possibly Tomcat
> -------------------------------------------------------------------------------------------------------------
>
> Key: AXIS-1297
> URL: http://issues.apache.org/jira/browse/AXIS-1297
> Project: Apache Axis
> Type: Bug
> Versions: 1.1
> Environment: Axis 1.1; JBoss 3.2.3, possibly Tomcat 4.x. Have seen on
> Windows XP and Linux.
> Reporter: John G. Norman
>
> The jaxrpc.jar shipped with Axis 1.1 includes interfaces that belong to JAXP.
> They are:
> javax/xml/transform/dom/DOMSource.class
> javax/xml/transform/sax/SAXSource.class
> javax/xml/transform/Source.class
> javax/xml/transform/stream/StreamSource.class
> Because on some servers, namely JBoss, JAXP is loaded by a different
> classloader, class cast exceptions are produced when other Axis classes
> expect these classes to be loaded by the same classloader.
> (Note that it can be tricky on JBoss to alter the classloading mechanism for
> a particular .ear or .war, and impossible in some cases without access to the
> server setup.)
> This is a blocker for many applications on JBoss, especially ones that need
> to use a particular version of XML and also Axis. The presence of these JAXP
> interfaces in Axis's jaxrpc.jar creates a conflict.
> It seems very weird that the Axis jaxrpc.jar would include these interfaces,
> anyway: They don't belong there. A developer should be able to put in place
> his favored XML parser implementation.
> For what it's worth, I made my own version of Axis's jaxrpc.jar that simply
> omits these items, so that Axis just uses the JAXP items that are available
> as part of normal JBoss startup. It seems to eliminate the typical class cast
> exceptions.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira