[ 
https://issues.apache.org/jira/browse/CAMEL-12230?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16362121#comment-16362121
 ] 

Andrea Cosentino commented on CAMEL-12230:
------------------------------------------

Do we need to remove the feature [~davsclaus] ?

> Camel-Ribbon: add a Karaf feature
> ---------------------------------
>
>                 Key: CAMEL-12230
>                 URL: https://issues.apache.org/jira/browse/CAMEL-12230
>             Project: Camel
>          Issue Type: Task
>          Components: camel-ribbon
>    Affects Versions: 2.20.2
>         Environment: Karaf 4.1.4
> Camel 2.20.2
> Win 10
> Oracle Java 1.8.0_161
>            Reporter: Vadim R
>            Assignee: Andrea Cosentino
>            Priority: Minor
>             Fix For: 2.21.0
>
>
> I'm trying to use ribbon load balancer in *Karaf* like this:
> {code:java}
>         from("timer:consumerTimer?fixedRate=true&delay=0&period=10000")
>                 .routeId("consumeService")
>                 .setBody(simple("Hello, Producer! This is message from 
> consumer on ${camelId}/${routeId}"))
>                 .serviceCall()
>                     .name("producer")
>                     .component("netty4:tcp")
>                     .ribbonLoadBalancer()
>                     .consulServiceDiscovery()
>                     .endParent()
>                 .convertBodyTo(String.class)
>                 .log("Producer response: ${body}");
> {code}
> But after start my bundle, following error appear in log (log:display):
> {code:java}
> 2018-02-06 10:53:24,289 | ERROR | nt Dispatcher: 1 | BlueprintCamelContext    
>         | 36 - org.apache.camel.camel-blueprint - 2.20.2 | Error occurred 
> during starting Camel Context  consumer-context
> org.apache.camel.FailedToCreateRouteException: Failed to create route 
> consumeService at: >>> ServiceCall[producer] <<< in route: 
> Route(consumeService)[[From[timer:consumerTimer?fixedRate=tr... because of 
> Could not find factory class for resource: 
> META-INF/services/org/apache/camel/cloud/ribbon-service-load-balancer
>         at 
> org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:1298) 
> [39:org.apache.camel.camel-core:2.20.2]
>         at 
> org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:204) 
> [39:org.apache.camel.camel-core:2.20.2]
>         at 
> org.apache.camel.impl.DefaultCamelContext.startRoute(DefaultCamelContext.java:1148)
>  [39:org.apache.camel.camel-core:2.20.2]
>         at 
> org.apache.camel.impl.DefaultCamelContext.startRouteDefinitions(DefaultCamelContext.java:3727)
>  [39:org.apache.camel.camel-core:2.20.2]
>         at 
> org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:3441)
>  [39:org.apache.camel.camel-core:2.20.2]
>         at 
> org.apache.camel.impl.DefaultCamelContext.access$000(DefaultCamelContext.java:208)
>  [39:org.apache.camel.camel-core:2.20.2]
>         at 
> org.apache.camel.impl.DefaultCamelContext$2.call(DefaultCamelContext.java:3249)
>  [39:org.apache.camel.camel-core:2.20.2]
>         at 
> org.apache.camel.impl.DefaultCamelContext$2.call(DefaultCamelContext.java:3245)
>  [39:org.apache.camel.camel-core:2.20.2]
>         at 
> org.apache.camel.impl.DefaultCamelContext.doWithDefinedClassLoader(DefaultCamelContext.java:3268)
>  [39:org.apache.camel.camel-core:2.20.2]
>         at 
> org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:3245)
>  [39:org.apache.camel.camel-core:2.20.2]
>         at 
> org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61) 
> [39:org.apache.camel.camel-core:2.20.2]
>         at 
> org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:3168)
>  [39:org.apache.camel.camel-core:2.20.2]
>         at 
> org.apache.camel.blueprint.BlueprintCamelContext.start(BlueprintCamelContext.java:244)
>  [36:org.apache.camel.camel-blueprint:2.20.2]
>         at 
> org.apache.camel.blueprint.BlueprintCamelContext.maybeStart(BlueprintCamelContext.java:284)
>  [36:org.apache.camel.camel-blueprint:2.20.2]
>         at 
> org.apache.camel.blueprint.BlueprintCamelContext.blueprintEvent(BlueprintCamelContext.java:177)
>  [36:org.apache.camel.camel-blueprint:2.20.2]
>         at 
> org.apache.aries.blueprint.container.BlueprintEventDispatcher$4.call(BlueprintEventDispatcher.java:201)
>  [28:org.apache.aries.blueprint.core:1.8.3]
>         at 
> org.apache.aries.blueprint.container.BlueprintEventDispatcher$4.call(BlueprintEventDispatcher.java:199)
>  [28:org.apache.aries.blueprint.core:1.8.3]
>         at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]
>         at 
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:?]
>         at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]
>         at 
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:?]
>         at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]
>         at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
>  [?:?]
>         at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
>  [?:?]
>         at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
>  [?:?]
>         at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>  [?:?]
>         at java.lang.Thread.run(Thread.java:748) [?:?]
> Caused by: org.apache.camel.NoFactoryAvailableException: Could not find 
> factory class for resource: 
> META-INF/services/org/apache/camel/cloud/ribbon-service-load-balancer
>         at 
> org.apache.camel.model.cloud.ServiceCallServiceLoadBalancerConfiguration.newInstance(ServiceCallServiceLoadBalancerConfiguration.java:149)
>  ~[?:?]
>         at 
> org.apache.camel.model.cloud.ServiceCallDefinition.lambda$retrieveLoadBalancer$22(ServiceCallDefinition.java:1036)
>  ~[?:?]
>         at 
> org.apache.camel.util.function.Suppliers.firstNotNull(Suppliers.java:72) 
> ~[?:?]
>         at 
> org.apache.camel.model.cloud.ServiceCallDefinition.retrieveLoadBalancer(ServiceCallDefinition.java:1035)
>  ~[?:?]
>         at 
> org.apache.camel.model.cloud.ServiceCallDefinition.createProcessor(ServiceCallDefinition.java:759)
>  ~[?:?]
>         at 
> org.apache.camel.model.ProcessorDefinition.makeProcessorImpl(ProcessorDefinition.java:549)
>  ~[?:?]
>         at 
> org.apache.camel.model.ProcessorDefinition.makeProcessor(ProcessorDefinition.java:510)
>  ~[?:?]
>         at 
> org.apache.camel.model.ProcessorDefinition.addRoutes(ProcessorDefinition.java:226)
>  ~[?:?]
>         at 
> org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:1295) 
> ~[?:?]
>         ... 26 more
> Caused by: org.apache.camel.NoFactoryAvailableException: Could not find 
> factory class for resource: nullribbon-service-load-balancer
>         at 
> org.apache.camel.core.osgi.OsgiFactoryFinder.lambda$findClass$0(OsgiFactoryFinder.java:72)
>  ~[?:?]
>         at 
> org.apache.camel.impl.DefaultFactoryFinder.lambda$addToClassMap$1(DefaultFactoryFinder.java:165)
>  ~[?:?]
>         at 
> java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1660)
>  ~[?:?]
>         at 
> org.apache.camel.impl.DefaultFactoryFinder.addToClassMap(DefaultFactoryFinder.java:163)
>  ~[?:?]
>         at 
> org.apache.camel.core.osgi.OsgiFactoryFinder.findClass(OsgiFactoryFinder.java:51)
>  ~[?:?]
>         at 
> org.apache.camel.core.osgi.OsgiFactoryFinder.findClass(OsgiFactoryFinder.java:79)
>  ~[?:?]
>         at 
> org.apache.camel.impl.DefaultFactoryFinder.findClass(DefaultFactoryFinder.java:74)
>  ~[?:?]
>         at 
> org.apache.camel.model.cloud.ServiceCallServiceLoadBalancerConfiguration.newInstance(ServiceCallServiceLoadBalancerConfiguration.java:147)
>  ~[?:?]
>         at 
> org.apache.camel.model.cloud.ServiceCallDefinition.lambda$retrieveLoadBalancer$22(ServiceCallDefinition.java:1036)
>  ~[?:?]
>         at 
> org.apache.camel.util.function.Suppliers.firstNotNull(Suppliers.java:72) 
> ~[?:?]
>         at 
> org.apache.camel.model.cloud.ServiceCallDefinition.retrieveLoadBalancer(ServiceCallDefinition.java:1035)
>  ~[?:?]
>         at 
> org.apache.camel.model.cloud.ServiceCallDefinition.createProcessor(ServiceCallDefinition.java:759)
>  ~[?:?]
>         at 
> org.apache.camel.model.ProcessorDefinition.makeProcessorImpl(ProcessorDefinition.java:549)
>  ~[?:?]
>         at 
> org.apache.camel.model.ProcessorDefinition.makeProcessor(ProcessorDefinition.java:510)
>  ~[?:?]
>         at 
> org.apache.camel.model.ProcessorDefinition.addRoutes(ProcessorDefinition.java:226)
>  ~[?:?]
>         at 
> org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:1295) 
> ~[?:?]
>         ... 26 more
> {code}
> And there is no feature named camel-ribbon in camel feature repository:
> {code}
> karaf@root()> feature:repo-list | grep camel
> camel-2.20.2                      | 
> mvn:org.apache.camel.karaf/apache-camel/2.20.2/xml/features
> karaf@root()> feature:install camel-ribbon
> Error executing command: No matching features for camel-ribbon/0.0.0
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to