On Thu, Dec 10, 2009 at 12:10 AM, Pete Mueller <[email protected]> wrote: > > 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?
And you got the camel-osgi.jar on the classpath, errrhhhh installed as a bundle? And the order its installed may also matter, e.g. install it as once of the first camel bundles. > -- > 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. > > -- Claus Ibsen Apache Camel Committer Author of Camel in Action: http://www.manning.com/ibsen/ Open Source Integration: http://fusesource.com Blog: http://davsclaus.blogspot.com/ Twitter: http://twitter.com/davsclaus
