1
resposta

Tomcat junto com arquivo WebServices não compila


Exception in thread "main" org.apache.camel.FailedToCreateRouteException: Failed to create route route1 at: >>> Split[xpath{/pedidos/itens/item} -> [Filter[xpath{/item/formato[text()='EBOOK']} -> [Marshal[org.apache.camel.model.dataformat.XmlJsonDataFormat@503f91c3], Log[${id} - ${body}], SetHeader[CamelHttpMethod, {GET}], SetHeader[CamelHttpQuery, simple{Simple: ebookId=${property.ebookId}&pedidoId=${property.pedidoId}&clienteId=${property.clienteId}}], To[http://localhost:8080/webservices/ebook/item]]]]] <<< in route: Route(route1)[[From[file:pedidos?delay=5s&noop=thue]] -> [Se... because of Failed to resolve endpoint: http://localhost:8080/webservices/ebook/item due to: No component found with scheme: http
    at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:1072)
    at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:196)
    at org.apache.camel.impl.DefaultCamelContext.startRoute(DefaultCamelContext.java:944)
    at org.apache.camel.impl.DefaultCamelContext.startRouteDefinitions(DefaultCamelContext.java:3245)
    at org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:2968)
    at org.apache.camel.impl.DefaultCamelContext.access$000(DefaultCamelContext.java:172)
    at org.apache.camel.impl.DefaultCamelContext$2.call(DefaultCamelContext.java:2799)
    at org.apache.camel.impl.DefaultCamelContext$2.call(DefaultCamelContext.java:2795)
    at org.apache.camel.impl.DefaultCamelContext.doWithDefinedClassLoader(DefaultCamelContext.java:2818)
    at org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:2795)
    at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)
    at org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:2764)
    at br.com.caelum.camel.RotaPedidos.main(RotaPedidos.java:41)
Caused by: org.apache.camel.ResolveEndpointFailedException: Failed to resolve endpoint: http://localhost:8080/webservices/ebook/item due to: No component found with scheme: http
    at org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:593)
    at org.apache.camel.util.CamelContextHelper.getMandatoryEndpoint(CamelContextHelper.java:79)
    at org.apache.camel.model.RouteDefinition.resolveEndpoint(RouteDefinition.java:211)
    at org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:107)
    at org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:113)
    at org.apache.camel.model.SendDefinition.resolveEndpoint(SendDefinition.java:62)
    at org.apache.camel.model.SendDefinition.createProcessor(SendDefinition.java:56)
    at org.apache.camel.model.ProcessorDefinition.createProcessor(ProcessorDefinition.java:483)
    at org.apache.camel.model.ProcessorDefinition.createOutputsProcessorImpl(ProcessorDefinition.java:446)
    at org.apache.camel.model.ProcessorDefinition.createOutputsProcessor(ProcessorDefinition.java:413)
    at org.apache.camel.model.ProcessorDefinition.createOutputsProcessor(ProcessorDefinition.java:165)
    at org.apache.camel.model.ProcessorDefinition.createChildProcessor(ProcessorDefinition.java:184)
    at org.apache.camel.model.FilterDefinition.createFilterProcessor(FilterDefinition.java:70)
    at org.apache.camel.model.FilterDefinition.createProcessor(FilterDefinition.java:64)
    at org.apache.camel.model.FilterDefinition.createProcessor(FilterDefinition.java:36)
    at org.apache.camel.model.ProcessorDefinition.createProcessor(ProcessorDefinition.java:483)
    at org.apache.camel.model.ProcessorDefinition.createOutputsProcessorImpl(ProcessorDefinition.java:446)
    at org.apache.camel.model.ProcessorDefinition.createOutputsProcessor(ProcessorDefinition.java:413)
    at org.apache.camel.model.ProcessorDefinition.createOutputsProcessor(ProcessorDefinition.java:165)
    at org.apache.camel.model.ProcessorDefinition.createChildProcessor(ProcessorDefinition.java:184)
    at org.apache.camel.model.SplitDefinition.createProcessor(SplitDefinition.java:99)
    at org.apache.camel.model.ProcessorDefinition.makeProcessorImpl(ProcessorDefinition.java:534)
    at org.apache.camel.model.ProcessorDefinition.makeProcessor(ProcessorDefinition.java:495)
    at org.apache.camel.model.ProcessorDefinition.addRoutes(ProcessorDefinition.java:219)
    at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:1069)
    ... 12 more
1 resposta

Oi Thiago

Você vai precisar adicionar a biblioteca do camel-http, exemplo:

<dependency>
     <groupId>org.apache.camel</groupId>
     <artifactId>camel-http</artifactId>
     <version>x.x.x</version>
     <!-- use the same version as your Camel core version -->
 </dependency>

Obs.: trocar x.x.x pela versão usada