Issue with Stream:file
reyasuresh Aug 25, 2014 9:06 AMHi,
I am new to camel and trying to read a json file from a stream.
Here is my Blueprint.xml. I have included my Camel-Stream in the pom.xml as well as added the features to my fabric profile
fabric:profile-edit --features camel-stream jboss-fuse-full
fabric:profile-edit --features camel-xmljson jboss-fuse-full
<?xml version="1.0" encoding="UTF-8"?>
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:camel="http://camel.apache.org/schema/blueprint"
xsi:schemaLocation="
http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd
http://camel.apache.org/schema/blueprint http://camel.apache.org/schema/blueprint/camel-blueprint.xsd">
<camelContext id="blueprintContext" trace="false" xmlns="http://camel.apache.org/schema/blueprint">
<route>
<from uri="stream:file?fileName=data/inbox/json.json"/>
<to uri="stream:out"/>
</route>
</camelContext>
</blueprint>
I am getting the following error, Can any one of you correct what is the issue here.
Error occurred during starting Camel: CamelContext(blueprintContext) due Invalid uri, valid form: 'stream:{in,file,url}'
java.lang.IllegalArgumentException: Invalid uri, valid form: 'stream:{in,file,url}'
at org.apache.camel.component.stream.StreamConsumer.resolveStreamFromFile(StreamConsumer.java:268)[org.apache.camel:camel-stream:2.12.0.redhat-610379]
at org.apache.camel.component.stream.StreamConsumer.initializeStream(StreamConsumer.java:112)[org.apache.camel:camel-stream:2.12.0.redhat-610379]
at org.apache.camel.component.stream.StreamConsumer.doStart(StreamConsumer.java:71)[org.apache.camel:camel-stream:2.12.0.redhat-610379]
at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)[org.apache.camel:camel-core:2.12.0.redhat-610379 com.googlecode.concurrentlinkedhashmap:concurrentlinkedhashmap-lru:1.4]
at org.apache.camel.impl.DefaultCamelContext.startService(DefaultCamelContext.java:1929)[org.apache.camel:camel-core:2.12.0.redhat-610379 com.googlecode.concurrentlinkedhashmap:concurrentlinkedhashmap-lru:1.4
regards
Suresh