Problem when using elasticsearch5 component with camel-2.19.0

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Problem when using elasticsearch5 component with camel-2.19.0

Rachid KRAIEM
This post was updated on .
Hi everybody,

I've install camel-elasticsearch5 component with the newer apache-camel-2.19.0 into karaf-4.0.7 container

my camel route is as follow:

<route id="myESRoute">
			<from uri="file://{{config.my.directory}}" /> 
			<log message="elasticsearch body request : ${body}" loggingLevel="INFO" logName="com.company" />
			<to uri="elasticsearch5://cluster-SST?transportAddresses=localhost:9300&amp;operation=BULK&amp;indexName=my_first_index&amp;indexType=my_type_index"/>
			<log message="elasticsearch body result : ${body} " loggingLevel="INFO" logName="com.company" />
		</route> 

the problem is when trying to install my bundle, i have the following problem

2017-05-10 17:26:22,650 | INFO  | nt Dispatcher: 1 | ElasticsearchProducer            | 1300 - org.apache.camel.camel-elasticsearch5 - 2.19.0 | Connecting to the ElasticSearch cluster: cluster-SST
2017-05-10 17:26:22,690 | WARN  | pool-8-thread-1  | BlueprintEventDispatcher         | 12 - org.apache.aries.blueprint.core - 1.6.2 | Listener caused an exception, will be ignored
java.util.concurrent.ExecutionException: java.lang.NoClassDefFoundError: org/elasticsearch/transport/Netty3Plugin
	at java.util.concurrent.FutureTask.report(FutureTask.java:122)[:1.8.0_121]
	at java.util.concurrent.FutureTask.get(FutureTask.java:192)[:1.8.0_121]
	at java.util.concurrent.AbstractExecutorService.doInvokeAny(AbstractExecutorService.java:193)[:1.8.0_121]
	at java.util.concurrent.AbstractExecutorService.invokeAny(AbstractExecutorService.java:225)[:1.8.0_121]
	at org.apache.aries.blueprint.utils.threading.ScheduledExecutorServiceWrapper$4.call(ScheduledExecutorServiceWrapper.java:184)[12:org.apache.aries.blueprint.core:1.6.2]
	at org.apache.aries.blueprint.utils.threading.ScheduledExecutorServiceWrapper$15.call(ScheduledExecutorServiceWrapper.java:452)[12:org.apache.aries.blueprint.core:1.6.2]
	at org.apache.aries.blueprint.utils.threading.RWLock.runReadOperation(RWLock.java:35)[12:org.apache.aries.blueprint.core:1.6.2]
	at org.apache.aries.blueprint.utils.threading.ScheduledExecutorServiceWrapper.runUnlessShutdown(ScheduledExecutorServiceWrapper.java:447)[12:org.apache.aries.blueprint.core:1.6.2]
	at org.apache.aries.blueprint.utils.threading.ScheduledExecutorServiceWrapper.invokeAny(ScheduledExecutorServiceWrapper.java:178)[12:org.apache.aries.blueprint.core:1.6.2]
	at org.apache.aries.blueprint.container.BlueprintEventDispatcher.callListener(BlueprintEventDispatcher.java:199)[12:org.apache.aries.blueprint.core:1.6.2]
	at org.apache.aries.blueprint.container.BlueprintEventDispatcher.callListeners(BlueprintEventDispatcher.java:189)[12:org.apache.aries.blueprint.core:1.6.2]
	at org.apache.aries.blueprint.container.BlueprintEventDispatcher.blueprintEvent(BlueprintEventDispatcher.java:140)[12:org.apache.aries.blueprint.core:1.6.2]
	at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:424)[12:org.apache.aries.blueprint.core:1.6.2]
	at org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:276)[12:org.apache.aries.blueprint.core:1.6.2]
	at org.apache.aries.blueprint.container.BlueprintExtender.createContainer(BlueprintExtender.java:300)[12:org.apache.aries.blueprint.core:1.6.2]
	at org.apache.aries.blueprint.container.BlueprintExtender.createContainer(BlueprintExtender.java:269)[12:org.apache.aries.blueprint.core:1.6.2]
	at org.apache.aries.blueprint.container.BlueprintExtender.createContainer(BlueprintExtender.java:265)[12:org.apache.aries.blueprint.core:1.6.2]
	at org.apache.aries.blueprint.container.BlueprintExtender.modifiedBundle(BlueprintExtender.java:255)[12:org.apache.aries.blueprint.core:1.6.2]
	at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.customizerModified(BundleHookBundleTracker.java:500)[21:org.apache.aries.util:1.1.1]
	at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.customizerModified(BundleHookBundleTracker.java:433)[21:org.apache.aries.util:1.1.1]
	at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$AbstractTracked.track(BundleHookBundleTracker.java:725)[21:org.apache.aries.util:1.1.1]
	at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.bundleChanged(BundleHookBundleTracker.java:463)[21:org.apache.aries.util:1.1.1]
	at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$BundleEventHook.event(BundleHookBundleTracker.java:422)[21:org.apache.aries.util:1.1.1]
	at org.apache.felix.framework.util.SecureAction.invokeBundleEventHook(SecureAction.java:1179)[org.apache.felix.framework-5.4.0.jar:]
	at org.apache.felix.framework.util.EventDispatcher.createWhitelistFromHooks(EventDispatcher.java:731)[org.apache.felix.framework-5.4.0.jar:]
	at org.apache.felix.framework.util.EventDispatcher.fireBundleEvent(EventDispatcher.java:486)[org.apache.felix.framework-5.4.0.jar:]
	at org.apache.felix.framework.Felix.fireBundleEvent(Felix.java:4541)[org.apache.felix.framework-5.4.0.jar:]
	at org.apache.felix.framework.Felix.startBundle(Felix.java:2172)[org.apache.felix.framework-5.4.0.jar:]
	at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:998)[org.apache.felix.framework-5.4.0.jar:]
	at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:984)[org.apache.felix.framework-5.4.0.jar:]
	at org.apache.karaf.features.internal.service.FeaturesServiceImpl.startBundle(FeaturesServiceImpl.java:1286)[8:org.apache.karaf.features.core:4.0.7]
	at org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:846)[8:org.apache.karaf.features.core:4.0.7]
	at org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvision(FeaturesServiceImpl.java:1176)[8:org.apache.karaf.features.core:4.0.7]
	at org.apache.karaf.features.internal.service.FeaturesServiceImpl$1.call(FeaturesServiceImpl.java:1074)[8:org.apache.karaf.features.core:4.0.7]
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_121]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_121]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_121]
	at java.lang.Thread.run(Thread.java:745)[:1.8.0_121]
Caused by: java.lang.NoClassDefFoundError: org/elasticsearch/transport/Netty3Plugin
	at org.elasticsearch.transport.client.PreBuiltTransportClient.<clinit>(PreBuiltTransportClient.java:84)
	at org.apache.camel.component.elasticsearch5.ElasticsearchProducer.doStart(ElasticsearchProducer.java:229)
	at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)
	at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:75)
	at org.apache.camel.impl.DeferServiceStartupListener.onCamelContextStarted(DeferServiceStartupListener.java:49)
	at org.apache.camel.impl.DefaultCamelContext.safelyStartRouteServices(DefaultCamelContext.java:3629)
	at org.apache.camel.impl.DefaultCamelContext.doStartOrResumeRoutes(DefaultCamelContext.java:3408)
	at org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:3262)
	at org.apache.camel.impl.DefaultCamelContext.access$000(DefaultCamelContext.java:201)
	at org.apache.camel.impl.DefaultCamelContext$2.call(DefaultCamelContext.java:3046)
	at org.apache.camel.impl.DefaultCamelContext$2.call(DefaultCamelContext.java:3042)
	at org.apache.camel.impl.DefaultCamelContext.doWithDefinedClassLoader(DefaultCamelContext.java:3065)
	at org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:3042)
	at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)
	at org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:2980)
	at org.apache.camel.blueprint.BlueprintCamelContext.start(BlueprintCamelContext.java:244)
	at org.apache.camel.blueprint.BlueprintCamelContext.maybeStart(BlueprintCamelContext.java:284)
	at org.apache.camel.blueprint.BlueprintCamelContext.blueprintEvent(BlueprintCamelContext.java:177)
	at org.apache.aries.blueprint.container.BlueprintEventDispatcher$4.call(BlueprintEventDispatcher.java:201)
	at org.apache.aries.blueprint.container.BlueprintEventDispatcher$4.call(BlueprintEventDispatcher.java:199)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_121]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)[:1.8.0_121]
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_121]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)[:1.8.0_121]
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_121]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)[:1.8.0_121]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)[:1.8.0_121]
	... 3 more
Caused by: java.lang.ClassNotFoundException: org.elasticsearch.transport.Netty3Plugin not found by org.apache.servicemix.bundles.elasticsearch [1330]
	at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1574)[org.apache.felix.framework-5.4.0.jar:]
	at org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:79)[org.apache.felix.framework-5.4.0.jar:]
	at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:2018)[org.apache.felix.framework-5.4.0.jar:]
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)[:1.8.0_121]
	at org.apache.felix.framework.BundleWiringImpl.getClassByDelegation(BundleWiringImpl.java:1415)[org.apache.felix.framework-5.4.0.jar:]
	at org.apache.felix.framework.BundleWiringImpl.searchImports(BundleWiringImpl.java:1595)[org.apache.felix.framework-5.4.0.jar:]
	at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1525)[org.apache.felix.framework-5.4.0.jar:]
	at org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:79)[org.apache.felix.framework-5.4.0.jar:]
	at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:2018)[org.apache.felix.framework-5.4.0.jar:]
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)[:1.8.0_121]
	... 30 more


Can you help me ??
Regards,
Rachid KRAIEM
Reply | Threaded
Open this post in threaded view
|

Re: Problem when using elasticsearch5 component with camel-2.19.0

Andrea Cosentino
You can try to install the wrapped jar of transport-netty3-client

http://search.maven.org/#artifactdetails%7Corg.elasticsearch.plugin%7Ctransport-netty3-client%7C5.2.2%7Cjar


 
--
Andrea Cosentino
----------------------------------
Apache Camel PMC Member
Apache Karaf Committer
Apache Servicemix PMC Member
Email: [hidden email]
Twitter: @oscerd2
Github: oscerd


On Friday, May 12, 2017 11:11 AM, Rachid KRAIEM <[hidden email]> wrote:



Hi everybody,


I've install camel-elasticsearch5 component with the newer

apache-camel-2.19.0 into karaf-4.0.7 container


my camel route is as follow:




the problem is when trying to install my bundle, i have the following

problem





In order to find org.elasticsearch.transport.Netty3Plugin i've install the

bundle "transport-netty3-client" as follow



so i have another missing package




but this installed bundle <bundle

dependency='true'>wrap:mvn:org.elasticsearch.client/transport/5.2.2</bundle>

contain only one package and class at

"org.elasticsearch.transport.client.PreBuiltTransportClient.class"


Can you help me ??




-----

Regards,

Rachid KRAIEM

--

View this message in context: http://servicemix.396122.n5.nabble.com/Problem-when-using-elasticsearch5-component-with-camel-2-19-0-tp5724431.html

Sent from the ServiceMix - User mailing list archive at Nabble.com.
Reply | Threaded
Open this post in threaded view
|

Re: Problem when using elasticsearch5 component with camel-2.19.0

Rachid KRAIEM
This post has NOT been accepted by the mailing list yet.
Hi,

The same problem even with

<bundle>wrap:mvn:org.elasticsearch.plugin/transport-netty3-client/5.2.2</bundle>

the problem amounts to package "org.elasticsearch.transport" exposed by two bundles in same time "transport-netty3-client:5.2.2" and "org.apache.servicemix.bundles.elasticsearch:5.2.2_1".

Can you help me please ?
Regards,
Rachid KRAIEM
Reply | Threaded
Open this post in threaded view
|

Re: Problem when using elasticsearch5 component with camel-2.19.0

smanish
This post was updated on .
I am also facing exactly same issue. Without any action here, it looks this bundle(org.apache.servicemix.bundles/org.apache.servicemix.bundles.elasticsearch/5.2.2_1) is no more useful at least in OSGI environment.