Skip to main content
Inspiring
Jun 10, 2008 8:09 PM UTC
Answered

ClassCastException

I can't seem to determine the cause of the ClassCastException message I am getting from a web service I am calling with CF8. The message is returned from an internal WebLogic web service.

For the most part it works fine but when I request something that the web service can't handle I get the ClassCastException message. I turned on SOAP logging to get the real cause of the problem but the CCE is messing up my exception handling.

Any ideas what is causing this? Would upgrading to axis 1.4 help?

Any help would be appreciated.

Here's a portion of the stack trace:

java.lang.ClassCastException: org.apache.axis.message.Text cannot be cast to org.apache.axis.message.MessageElement at org.apache.axis.message.SOAPFaultBuilder.onEndChild(SOAPFaultBuilder.java:299) at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1090) at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source) at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at javax.xml.parsers.SAXParser.parse(SAXParser.java:395) 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:424) at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62) at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206) at org.apache.axis.client.Call.invokeEngine(Call.java:2765) at org.apache.axis.client.Call.invoke(Call.java:2748) at org.apache.axis.client.Call.invoke(Call.java:2424) at org.apache.axis.client.Call.invoke(Call.java:2347) at...
This topic is closed to new replies. Start a new post to keep the conversation going.
pwp69Correct answer
Inspiring
Jun 11, 2008 8:27 PM UTC
The fix I found was to upgrade CF8's Axis from 1.2.1 to 1.4.

I downloaded Axis 1.4 binaries, stopped CF, copied axis.jar, wsdl4j-1.5.1.jar,saaj.jar and jaxrpc.jar to Coldfusion's lib folder and restarted CF.

The ClassCastException didn't arise when testing. One caveat: Applying Coldfusion 8 updaters will revert Axis back to 1.2.1.

I found this at:
http://tjordahl.blogspot.com/2005/09/upgrading-coldfusion-mx-7-to-axis-13.html




2 replies

pwp69AuthorCorrect answer
Inspiring
Jun 11, 2008 8:27 PM UTC
The fix I found was to upgrade CF8's Axis from 1.2.1 to 1.4.

I downloaded Axis 1.4 binaries, stopped CF, copied axis.jar, wsdl4j-1.5.1.jar,saaj.jar and jaxrpc.jar to Coldfusion's lib folder and restarted CF.

The ClassCastException didn't arise when testing. One caveat: Applying Coldfusion 8 updaters will revert Axis back to 1.2.1.

I found this at:
http://tjordahl.blogspot.com/2005/09/upgrading-coldfusion-mx-7-to-axis-13.html




Translate
Mar 10, 2016 6:06 AM UTC

Hi

Can you please update us on the version of saaj jar compatible with axis-1.4

Translate