axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thilo Frotscher (JIRA)" <>
Subject [jira] Commented: (AXIS-2121) CLONE -IncompatibleClassChangeError when deploying Axis 1.2-RC3 on WebSphere 5.1 with PARENT_FIRST classloading
Date Thu, 14 Jul 2005 13:49:11 GMT
    [ ] 

Thilo Frotscher commented on AXIS-2121:

This was issue 1903 and reported to be fixed for Axis 1.2.1. However, using Axis 1.2.1  I
get the following ClassCastException which I believe is caused by the patch:

faultCode: {}Server.userException
 faultString: java.lang.ClassCastException: org.apache.axis.message.Text
	{}stackTrace:java.lang.ClassCastException: org.apache.axis.message.Text
	at org.apache.axis.message.SOAPFaultBuilder.onEndChild(Ljava.lang.String;Ljava.lang.String;Lorg.apache.axis.encoding.DeserializationContext;)V(
	at org.apache.axis.encoding.DeserializationContext.endElement(Ljava.lang.String;Ljava.lang.String;Ljava.lang.String;)V(
	at weblogic.apache.xerces.parsers.AbstractSAXParser.endElement(Lweblogic.apache.xerces.xni.QName;Lweblogic.apache.xerces.xni.Augmentations;)V(
	at weblogic.apache.xerces.impl.XMLNamespaceBinder.handleEndElement(Lweblogic.apache.xerces.xni.QName;Lweblogic.apache.xerces.xni.Augmentations;Z)V(
	at weblogic.apache.xerces.impl.XMLNamespaceBinder.endElement(Lweblogic.apache.xerces.xni.QName;Lweblogic.apache.xerces.xni.Augmentations;)V(
	at weblogic.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement()I(
	at weblogic.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Z)Z(
	at weblogic.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Z)Z(
	at weblogic.apache.xerces.parsers.DTDConfiguration.parse(Z)Z(
	at weblogic.apache.xerces.parsers.DTDConfiguration.parse(Lweblogic.apache.xerces.xni.parser.XMLInputSource;)V(
	at weblogic.apache.xerces.parsers.XMLParser.parse(Lweblogic.apache.xerces.xni.parser.XMLInputSource;)V(
	at weblogic.apache.xerces.parsers.AbstractSAXParser.parse(Lorg.xml.sax.InputSource;)V(
	at weblogic.xml.jaxp.WebLogicXMLReader.parse(Lorg.xml.sax.InputSource;)V(
	at weblogic.xml.jaxp.RegistryXMLReader.parse(Lorg.xml.sax.InputSource;)V(
	at javax.xml.parsers.SAXParser.parse(Lorg.xml.sax.InputSource;Lorg.xml.sax.helpers.DefaultHandler;)V(
	at org.apache.axis.encoding.DeserializationContext.parse()V(
	at org.apache.axis.SOAPPart.getAsSOAPEnvelope()Lorg.apache.axis.message.SOAPEnvelope;(
	at org.apache.axis.Message.getSOAPEnvelope()Lorg.apache.axis.message.SOAPEnvelope;(
	at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(Lorg.apache.axis.MessageContext;)V(
	at org.apache.axis.client.AxisClient.invoke(Lorg.apache.axis.MessageContext;)V(
	at org.apache.axis.client.Call.invokeEngine(Lorg.apache.axis.MessageContext;)V(
	at org.apache.axis.client.Call.invoke()V(
	at org.apache.axis.client.Call.invoke(Lorg.apache.axis.message.SOAPEnvelope;)Lorg.apache.axis.message.SOAPEnvelope;(

The AxisFault you can see above is created at the end of method invoke in class AxisClient.
There, a SAXException is caught and converted into an AxisFault.
The actual probem occurs in class DeserializationContext, in method parse():

                parser.parse(inputSource, this);

When this line is invoked. the SAXException is thrown, with the exception message: 

               java.lang.ClassCastException: org.apache.axis.message.Text

This issue does not exist with Axis 1.2. It only exists in Axis 1.2.1. Since the above code
change was made between 1.2 and 1.2.1, 
and since variable "text" (see Description above) is now assigned an instance of  org.apache.axis.message.Text(s),
this patch 
seems to be the reason for the ClassCastException. 

> CLONE -IncompatibleClassChangeError when deploying Axis 1.2-RC3 on WebSphere 5.1 with
PARENT_FIRST classloading
> ---------------------------------------------------------------------------------------------------------------
>          Key: AXIS-2121
>          URL:
>      Project: Apache Axis
>         Type: Bug
>   Components: SAAJ
>     Versions: 1.2RC3
>  Environment: WebSphere 5.1.x on Linux (2.4.x kernel).
>     Reporter: Thilo Frotscher
>     Priority: Blocker

> I am deploying Axis 1.2RC3 in a war that resides within an ear. The axis jars are in
the war/WEB-INF/lib dir. For various reasons related to the other contents of my ear, I must
use PARENT_FIRST classloading. As many have reported, if you have PARENT_FIRST classloading
on WebSphere 5.1 with Axis 1.2RC3, then there is a conflict between the version of saaj (1.1)
that ships with WebSphere, and the version of saaj (1.2) that Axis 1.2RC3 expects, and you
get the following exception:
> java.lang.IncompatibleClassChangeError: class org.apache.axis.SOAPPart does not implement
interface org.w3c.dom.Document
> This issue can be resolved with PARENT_LAST classloading and a manifest which specifies
the classpath...but for those of use who can't use PARENT_LAST classloading, there is another
> It appears that a single source code change to Axis will eliminate the issue altogether.
The offending code is in org.apache.axis.message.MessageElement.addTextNode(), and can be
patched as follows:
> public SOAPElement addTextNode(String s) throws SOAPException {
>     try {
>             Text text = getOwnerDocument().createTextNode(s);
>             ((org.apache.axis.message.Text)text).setParentElement(this);
>             return this;
>         } catch (ClassCastException e) {
>             throw new SOAPException(e);
>         }
> }
> public SOAPElement addTextNode(String s) throws SOAPException {
>     try {
>             Text text = new org.apache.axis.message.Text(s);
>             this.appendChild(text);
>             return this;
>         } catch (ClassCastException e) {
>             throw new SOAPException(e);
> }
> After making this change, Axis 1.2RC3 will run on WebSphere 5.1 with PARENT_FIRST classloading,
and no exceptions will be thrown.
> -DT
> ---------------------------------
> David Tompkins
> Sr. Computer Scientist
> Adobe Systems, Inc.
> tompkins _AT_ adobe _DOT_ com

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:

View raw message