NT 2003
axis1.4 (java)
weblogic 8.1

I've recently upgraded from axis1.2 to axis1.4. Everything compiled and
built fine, however, on the first soap request I get a class cast exception . Here's a few lines from the stacktrace:

Caused by: java.lang.ClassCastException: java.lang.String
   at
org.apache.axis.message.MessageElement.addTextNode(MessageElement.java:1389)
   at org.apache.axis.message.SOAPHandler.addTextNode(SOAPHandler.java:148)

My first thought was that there was a jar incompatability between the
axis jars and others. By others, I mean jars that contain javax.xml.* classes, and perhaps xerces related classes for parsing. I've done alot of fooling around with jar combinations, but I haven't been successful So I decided to look at the source code (org.apache.axis.message.MessageElement) for clues and now I'm even more
puzzled because it's not obvious how a casting exception is even
possible. Here's the relevent piece of code :

   public SOAPElement addTextNode(String s) throws SOAPException {
       try {
           Text text = getOwnerDocument().createTextNode(s);
           ((org.apache.axis.message.Text)text).setParentElement(this);
           return this;

The ClassCastException occurs in the line casting 'text' which is strange because obviously a Text instance was obtained on the line above. This all smells like class version incompatabilites with the axis critical jars, but I can't be sure. I'm fairly new to the axis world so my inexperience is getting in the way. I would appreciate any clues or insights. Even if someone could confirm my suspicions about jar version mismatches would be a step forward at this point and if possible a clue about which classes are not compatable. I've included a full stackTrace below in case it's helpful.

thanks and sorry for the crosspost to axis-users (I think I may have posted to wrong group initially, so my apologies as I get oriented here)


Full stackTrace here:
---------------------

AxisFault

faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException

faultSubcode:

faultString: javax.xml.soap.SOAPException:
java.lang.ClassCastException: java.lang.String

faultActor:

faultNode:

faultDetail:


{http://xml.apache.org/axis/}stackTrace:javax.xml.soap.SOAPException:
java.lang.ClassCastException: java.lang.String

   at
org.apache.axis.message.MessageElement.addTextNode(MessageElement.java:1396)

   at org.apache.axis.message.SOAPHandler.addTextNode(SOAPHandler.java:148)

   at org.apache.axis.message.SOAPHandler.endElement(SOAPHandler.java:112)

   at
org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)

   at
org.apache.xerces.parsers.AbstractSAXParser.endElement(Lorg.apache.xerces.xni.QName;Lorg.apache.xerces.xni.Augmentations;)V(Unknown
Source)

   at
org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement()I(Unknown
Source)

   at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Z)Z(Unknown
Source)

   at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Z)Z(Unknown
Source)

   at org.apache.xerces.parsers.XML11Configuration.parse(Z)Z(Unknown
Source)

   at
org.apache.xerces.parsers.XML11Configuration.parse(Lorg.apache.xerces.xni.parser.XMLInputSource;)V(Unknown
Source)

   at
org.apache.xerces.parsers.XMLParser.parse(Lorg.apache.xerces.xni.parser.XMLInputSource;)V(Unknown
Source)

   at
org.apache.xerces.parsers.AbstractSAXParser.parse(Lorg.xml.sax.InputSource;)V(Unknown
Source)

   at
javax.xml.parsers.SAXParser.parse(Lorg.xml.sax.InputSource;Lorg.xml.sax.helpers.DefaultHandler;)V(Unknown
Source)

   at
org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)

   at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)

   at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)

   at
org.apache.axis.handlers.SimpleSessionHandler.doClient(SimpleSessionHandler.java:173)

   at
org.apache.axis.handlers.SimpleSessionHandler.invoke(SimpleSessionHandler.java:157)

   at
org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)

   at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)

   at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)

   at
org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)

   at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)

   at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)

   at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)

   at org.apache.axis.client.Call.invokeEngine(Call.java:2784)

   at org.apache.axis.client.Call.invoke(Call.java:2767)

   at org.apache.axis.client.Call.invoke(Call.java:2443)

   at org.apache.axis.client.Call.invoke(Call.java:2366)

   at org.apache.axis.client.Call.invoke(Call.java:1812)

   at
com.redgroup.analyzer.agent.AnalysisAgentClient.executeAgentOperation(AnalysisAgentClient.java:234)

   at
com.redgroup.analyzer.client.agent.RemoteAgentContext.getResponse(RemoteAgentContext.java:135)

Caused by: java.lang.ClassCastException: java.lang.String

   at
org.apache.axis.message.MessageElement.addTextNode(MessageElement.java:1389)

   at org.apache.axis.message.SOAPHandler.addTextNode(SOAPHandler.java:148)

   at org.apache.axis.message.SOAPHandler.endElement(SOAPHandler.java:112)

   at
org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)

   at
org.apache.xerces.parsers.AbstractSAXParser.endElement(Lorg.apache.xerces.xni.QName;Lorg.apache.xerces.xni.Augmentations;)V(Unknown
Source)

   at
org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement()I(Unknown
Source)

   at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Z)Z(Unknown
Source)

   at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Z)Z(Unknown
Source)

   at org.apache.xerces.parsers.XML11Configuration.parse(Z)Z(Unknown
Source)

   at
org.apache.xerces.parsers.XML11Configuration.parse(Lorg.apache.xerces.xni.parser.XMLInputSource;)V(Unknown
Source)

   at
org.apache.xerces.parsers.XMLParser.parse(Lorg.apache.xerces.xni.parser.XMLInputSource;)V(Unknown
Source)

   at
org.apache.xerces.parsers.AbstractSAXParser.parse(Lorg.xml.sax.InputSource;)V(Unknown
Source)

   at
javax.xml.parsers.SAXParser.parse(Lorg.xml.sax.InputSource;Lorg.xml.sax.helpers.DefaultHandler;)V(Unknown
Source)

   at
org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)

   at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)

   at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)

   at
org.apache.axis.handlers.SimpleSessionHandler.doClient(SimpleSessionHandler.java:173)

   at
org.apache.axis.handlers.SimpleSessionHandler.invoke(SimpleSessionHandler.java:157)

   at
org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)

   at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)

   at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)

   at
org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)

   at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)

   at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)

   at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)

   at org.apache.axis.client.Call.invokeEngine(Call.java:2784)

   at org.apache.axis.client.Call.invoke(Call.java:2767)

   at org.apache.axis.client.Call.invoke(Call.java:2443)

   at org.apache.axis.client.Call.invoke(Call.java:2366)

   at org.apache.axis.client.Call.invoke(Call.java:1812)

--
rp johns
software factotum



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to