camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pete Mueller <p...@routecloud.com>
Subject Cannot read from file - InvalidPayloadException
Date Wed, 09 Dec 2009 23:10:53 GMT

Hello all, I'm hoping someone has a quick answer for this:

Running Camel 2.0 inside Felix/Karaf

My Route is:
		<camel:route>
			<camel:from uri="file:///test/data/smpp?move=/test/done/${file:name}" />
			<!-- camel:convertBodyTo type="java.io.InputStream"/-->
			<camel:unmarshal ref="jsonMessage" />
			<camel:process ref="messageSaver" />
			<camel:to uri="activemq:queue:sms.in" />
		</camel:route>

When dropping a file into the incoming directory, I see the following in the
logs:

org.apache.camel.InvalidPayloadException: No body available of type:
java.io.InputStream but has value:
GenericFile[/test/data/smpp/sms-test1.msg] of type:
org.apache.camel.component.file.GenericFile on: GenericFileMessage with
file: GenericFile[/test/data/smpp/sms-test1.msg]. Caused by: No type
converter available to convert from type:
org.apache.camel.component.file.GenericFile to the required type:
java.io.InputStream with value GenericFile[/test/data/smpp/sms-test1.msg] on
the exchange: Exchange[GenericFileMessage with file:
GenericFile[/test/data/smpp/sms-test1.msg]]

I've tried to run it with or without the explicit convertBodyTo element,
same message either way. I've also ensured that org.apache.camel.converter
and org.apache.camel.converter.stream are explicitly imported into my bundle
with the camel-context.

Any ideas what is causing this?
-- 
View this message in context: http://old.nabble.com/Cannot-read-from-file---InvalidPayloadException-tp26719400p26719400.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Mime
View raw message