It looks like camel just remove the temp cached file when you want to send the message to the other processor.
You can setup the camel property to change the CamelCachedOutputStreamThreshold property[1] of camel context to a big value. [1]http://camel.apache.org/stream-caching.html -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem On April 28, 2015 at 12:37:22 PM, Scarpacci ([email protected]) wrote: > Hi All, > > I am using akka-camel to process files. My initial tests were working great, > however when I started passing in actual xml files it is puking with type > conversions. > > Here is my consumer (very simple, but puking at msg.bodyAs[String] > > class FileConsumer extends Consumer { > def endpointUri = "file:/data/input/actor" > > val processor = context.actorOf(Props[Processor], "processor") > > def receive = { > case msg: CamelMessage => { > println("Parent...received %s" format msg) > processor ! msg.bodyAs[String] > } > } > } > > *[ERROR*] [04/27/2015 12:10:48.617] > [ArdisSystem-akka.actor.default-dispatcher-5] [akka://ArdisSystem/user/$a] > Error during type conversion from type: > org.apache.camel.converter.stream.FileInputStreamCache to the required type: > java.lang.String with value > org.apache.camel.converter.stream.FileInputStreamCache@4611b35a due > java.io.FileNotFoundException: > /var/folders/dh/zfqvn9gn7cl6h63d3400y4zxp3xtzf/T/camel-tmp-807558/cos2920459202139947606.tmp > > (No such file or directory) > org.apache.camel.TypeConversionException: Error during type conversion from > type: org.apache.camel.converter.stream.FileInputStreamCache to the required > type: java.lang.String with value > org.apache.camel.converter.stream.FileInputStreamCache@4611b35a due > java.io.FileNotFoundException: > /var/folders/dh/zfqvn9gn7cl6h63d3400y4zxp3xtzf/T/camel-tmp-807558/cos2920459202139947606.tmp > > (No such file or directory) > > > I am wondering if it has something to do with the actual contents of the > xml. They are not big at all (roughly 70kb). I doubt I will be able to > provide an actual example of the XML itself. Just baffled as to why > something so small and being converted to a string is having issues. Other > dummy example xml files have worked fine. > > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/TypeConversion-Error-tp5766411.html > Sent from the Camel - Users mailing list archive at Nabble.com. >
