camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shekher awasthi <shekher.awas...@gmail.com>
Subject Re: FailedToCreateRouteException While using xslt for formatting XML
Date Fri, 22 Jul 2011 16:11:45 GMT
Thanks Claus for the inputs, some how i detected myself just before your
reply :),but still a question why this has been made a depedency on Spring
whih means i have to put other spring jars in my classpath any specific
reason to use this approach?

On Fri, Jul 22, 2011 at 5:04 PM, Claus Ibsen <claus.ibsen@gmail.com> wrote:

> You need camel-spring on the classpath.
>
>
> On Fri, Jul 22, 2011 at 12:21 PM, shekher awasthi
> <shekher.awasthi@gmail.com> wrote:
> > Hi All,
> >
> > I am trying to use xslt to customize my generated XML as per the custom
> > structure
> >
> > here is the code snippet for the same
> >
> >
> > context.addRoutes(*new* RouteBuilder() {
> >
> > *public* *void* configure() {
> >
> > from("file:data/csv?noop=true").unmarshal().csv().bean(*new
> > *
> >
> > CSVConverterBean(),"processCSVInvoice").to("xslt:XMLConverter.xsl").to(
> > "file:data/csvoutput?fileName=test11.xml");
> >
> >  }
> >
> > });
> >
> > context.start();
> >
> > Thread.*sleep*(10000);
> >
> > context.stop();
> >
> > i am converting csv to raw XML and than trying to use xslt to convert the
> > raw XML to the customized structure.but when i am trying to use xslt it
> > giving me the following exception
> >
> > Exception in thread "main"
> *org.apache.camel.FailedToCreateRouteException*:
> > Failed to create route route1 at: >>> To[xslt:XMLConverter.xsl] <<<
in
> > route: Route[[From[file:data/csv?noop=true]] -> [Marshal[org.apache...
> > because of Failed to resolve endpoint: xslt://XMLConverter.xsl due to: No
> > component found with scheme: xslt
> >
> > at org.apache.camel.model.RouteDefinition.addRoutes(*
> > RouteDefinition.java:815*)
> >
> > at org.apache.camel.model.RouteDefinition.addRoutes(*
> > RouteDefinition.java:165*)
> >
> > at org.apache.camel.impl.DefaultCamelContext.startRoute(*
> > DefaultCamelContext.java:706*)
> >
> > at org.apache.camel.impl.DefaultCamelContext.startRouteDefinitions(*
> > DefaultCamelContext.java:1643*)
> >
> > at org.apache.camel.impl.DefaultCamelContext.doStartCamel(*
> > DefaultCamelContext.java:1432*)
> >
> > at org.apache.camel.impl.DefaultCamelContext.doStart(*
> > DefaultCamelContext.java:1336*)
> >
> > at org.apache.camel.impl.ServiceSupport.start(*ServiceSupport.java:67*)
> >
> > at org.apache.camel.impl.ServiceSupport.start(*ServiceSupport.java:54*)
> >
> > at org.apache.camel.impl.DefaultCamelContext.start(*
> > DefaultCamelContext.java:1314*)
> >
> > at poc.test.TestPOC.main(*TestPOC.java:24*)
> >
> > Caused by: *org.apache.camel.ResolveEndpointFailedException*: Failed to
> > resolve endpoint: xslt://XMLConverter.xsl due to: No component found with
> > scheme: xslt
> >
> > at org.apache.camel.impl.DefaultCamelContext.getEndpoint(*
> > DefaultCamelContext.java:457*)
> >
> > at org.apache.camel.util.CamelContextHelper.getMandatoryEndpoint(*
> > CamelContextHelper.java:47*)
> >
> > at org.apache.camel.model.RouteDefinition.resolveEndpoint(*
> > RouteDefinition.java:180*)
> >
> > at org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(*
> > DefaultRouteContext.java:110*)
> >
> > at org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(*
> > DefaultRouteContext.java:116*)
> >
> > at org.apache.camel.model.SendDefinition.resolveEndpoint(*
> > SendDefinition.java:61*)
> >
> > at org.apache.camel.model.SendDefinition.createProcessor(*
> > SendDefinition.java:55*)
> >
> > at org.apache.camel.model.ProcessorDefinition.makeProcessor(*
> > ProcessorDefinition.java:410*)
> >
> > at org.apache.camel.model.ProcessorDefinition.addRoutes(*
> > ProcessorDefinition.java:181*)
> >
> > at org.apache.camel.model.RouteDefinition.addRoutes(*
> > RouteDefinition.java:812*)
> >
> > ... 9 more
> >
> >
> >
> > i have following jars in the classpath
> >
> > camel-core
> >
> > camel-scsv
> >
> > common-management
> >
> > commons-csv
> >
> > xstream
> >
> > can any one point me what exactly going wrong here?
> >
> > thanks in advance
> >
>
>
>
> --
> Claus Ibsen
> -----------------
> FuseSource
> Email: cibsen@fusesource.com
> Web: http://fusesource.com
> Twitter: davsclaus, fusenews
> Blog: http://davsclaus.blogspot.com/
> Author of Camel in Action: http://www.manning.com/ibsen/
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message