InvalidPayloadException Camel running in ServiceMix
jcrean Jan 31, 2008 4:59 AMHi Folks,
I am testing a simple camel component in fuse 3306 and am getting an InvalidPayloadException as follows:
[Fatal Error] test.txt:1:1: Content is not allowed in prolog. INFO: found exchange JbiMessage: org.apache.servicemix.jbi.messaging.NormalizedMessageImpl@68f812{properties: {org.apache.servicemix.file.name=test.txt, org.apache.servicemix.file.path=/Users/jcrean/Development/camel-smx-test-case/temp/test.txt}} INFO: HELLO HELLO !!!!!!!!!!! WARN - ResolverUtil - Could not examine class 'org/apache/activemq/camel/component/ActiveMQComponent.class' due to a java.lang.NoClassDefFoundError with message: org/apache/camel/component/jms/JmsComponent WARN - ResolverUtil - Could not examine class 'org/apache/activemq/camel/component/ActiveMQConfiguration.class' due to a java.lang.NoClassDefFoundError with message: org/apache/camel/component/jms/JmsConfiguration WARN - ResolverUtil - Could not examine class 'org/apache/activemq/camel/component/JournalComponent.class' due to a java.lang.NoClassDefFoundError with message: org/apache/camel/impl/DefaultComponent WARN - ResolverUtil - Could not examine class 'org/apache/activemq/camel/component/JournalEndpoint$1.class' due to a java.lang.NoClassDefFoundError with message: org/apache/camel/impl/DefaultConsumer WARN - ResolverUtil - Could not examine class 'org/apache/activemq/camel/component/JournalEndpoint$3.class' due to a java.lang.NoClassDefFoundError with message: org/apache/camel/impl/DefaultProducer WARN - ResolverUtil - Could not examine class 'org/apache/activemq/camel/component/JournalEndpoint.class' due to a java.lang.NoClassDefFoundError with message: org/apache/camel/impl/DefaultEndpoint ERROR - DeadLetterChannel - On delivery attempt: 0 caught: org.apache.camel.InvalidPayloadException: No in body available of type: java.io.InputStream but has value: javax.xml.transform.stream.StreamSource@738f23 of type: javax.xml.transform.stream.StreamSource on the exchange: Exchange[FileMessage: /Users/jcrean/Development/camel-smx-test-case/message_output] org.apache.camel.InvalidPayloadException: No in body available of type: java.io.InputStream but has value: javax.xml.transform.stream.StreamSource@738f23 of type: javax.xml.transform.stream.StreamSource on the exchange: Exchange[FileMessage: /Users/jcrean/Development/camel-smx-test-case/message_output] at org.apache.camel.util.ExchangeHelper.getMandatoryInBody(ExchangeHelper.java:100)
The very first line of this is interesting - i searched thru the code base to see where this was coming from but couldnt find it. I dont quite know what is wrong here - the file is a simple text file with contents like
this is my test file!!
my route is pretty simple : I am routing from a file poller to a targetService called RouterFeederService which is defined in the from part of the camel route.
from("jbi:service:http://com.iona.ps/RouterFeederService").process(new Processor() { public void process(Exchange e) { System.out.println("INFO: found exchange "+e.getIn()); System.out.println("INFO: HELLO HELLO !!!!!!!!!!!"); } } ).to("file:///Users/jcrean/Development/camel-smx-test-case/message_output");
Any ideas?
thanks
Joe