ClassCastException is thrown when the message Content is set to a StringSource
object
-------------------------------------------------------------------------------------
Key: SMX4-132
URL: https://issues.apache.org/activemq/browse/SMX4-132
Project: ServiceMix 4
Issue Type: Bug
Affects Versions: 4.0-m2
Reporter: Edell Nolan
Priority: Minor
In my demo I have two services the second is using the camel content based
router.
The first service sets the content to a StringSource object - when the client
invokes the request a ClassCastException is thrown.
If I convert the StringSource to a DOMSource - I no longer get the
ClassCastException and it works fine.
msg.setContent(sourceTransformer.toDOMSourceFromStream(src);
The user shouldn't have to worry about the source type that is sent ?
java.lang.ClassCastException: org.apache.servicemix.jbi.jaxp.StringSource
at
com.sun.org.apache.xpath.internal.jaxp.XPathExpressionImpl.eval(XPathExpressionImpl.java:115)
at
com.sun.org.apache.xpath.internal.jaxp.XPathExpressionImpl.eval(XPathExpressionImpl.java:97)
at
com.sun.org.apache.xpath.internal.jaxp.XPathExpressionImpl.evaluate(XPathExpressionImpl.java:178)
at
org.apache.camel.builder.xml.XPathBuilder.evaluateAs(XPathBuilder.java:429)
at
org.apache.camel.builder.xml.XPathBuilder.matches(XPathBuilder.java:98)
at
org.apache.camel.builder.xml.XPathBuilder.matches(XPathBuilder.java:63)
at
org.apache.camel.processor.ChoiceProcessor.process(ChoiceProcessor.java:47)
at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:69)
at
org.apache.camel.processor.DeadLetterChannel.process(DeadLetterChannel.java:174)
at
org.apache.camel.processor.DeadLetterChannel.process(DeadLetterChannel.java:96)
at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:57)
at
org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:39)
at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:41)
at
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:66)
at
org.apache.servicemix.camel.CamelProviderEndpoint.handleActiveProviderExchange(CamelProviderEndpoint.java:114)
at
org.apache.servicemix.camel.CamelProviderEndpoint.process(CamelProviderEndpoint.java:73)
at
org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:596)
at
org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:550)
at
org.apache.servicemix.common.AsyncBaseLifeCycle.processExchangeInTx(AsyncBaseLifeCycle.java:452)
at
org.apache.servicemix.common.AsyncBaseLifeCycle$2.run(AsyncBaseLifeCycle.java:338)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
at java.lang.Thread.run(Thread.java:595)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.