Ah you load routes from an xml file, then you cannot define spring beans etc.
You can use the class component http://camel.apache.org/class And instead of <process> then use <to> where the uri is using the class component And then remove the <bean> On Thu, Jul 24, 2014 at 2:37 PM, nettome <gsharm...@gmail.com> wrote: > Hi Claus, > I tried that as below - > > <bean id= "jsonProcessor" > class="com.ericsson.pmed.validator.parser.JsonParser" /> > <routes xmlns="http://camel.apache.org/schema/spring"> > <route id="fromFile"> > <from uri="file:/data/inbox"/> > <process ref="jsonProcessor" /> > <to uri="cache:default"/> > </route> > > </routes> > > but then I'm getting the following error - > > unexpected element (uri:"", local:"bean"). Expected elements are > <{http://camel.apache.org/schema/spring}aggregate>, > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Not-able-to-define-processor-in-Camel-tp5754376p5754380.html > Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen ----------------- Red Hat, Inc. Email: cib...@redhat.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen hawtio: http://hawt.io/ fabric8: http://fabric8.io/