camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shekher awasthi <shekher.awas...@gmail.com>
Subject FailedToCreateRouteException While using xslt for formatting XML
Date Fri, 22 Jul 2011 10:21:20 GMT
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

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