You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Andrea Cosentino (Jira)" <ji...@apache.org> on 2021/11/10 09:28:00 UTC

[jira] [Resolved] (CAMEL-17183) ClassNotFoundException while indexing data into Elasticsearch org.elasticsearch.common.CheckedConsumer

     [ https://issues.apache.org/jira/browse/CAMEL-17183?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrea Cosentino resolved CAMEL-17183.
--------------------------------------
    Resolution: Information Provided

> ClassNotFoundException while indexing data into Elasticsearch org.elasticsearch.common.CheckedConsumer
> ------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-17183
>                 URL: https://issues.apache.org/jira/browse/CAMEL-17183
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-elasticsearch-rest
>    Affects Versions: 3.12.0
>            Reporter: Nikhil
>            Priority: Major
>         Attachments: Elasticsearch7.13.0.png, Elasticsearch7.15.0.png
>
>
> I am using below stack to index a data into Elasticsearch using Camel Elasticsearch component:
>  * *Elasticsearch 7.15.0*
>  * *Apache Camel 3.12.0*
>  * *Spring 5.3.12*
>  * *Spring Boot 2.5.6*
> While indexing the data into Elasticsearch 7.15.0, I am getting *ClassNotFoundException: org.elasticsearch.common.CheckedConsumer*
> please have a look on the detailed error below:
> {code:java}
> Caused by: java.lang.ClassNotFoundException: org.elasticsearch.common.CheckedConsumer
> at java.net.URLClassLoader.findClass(URLClassLoader.java:381) ~[?:1.8.0_92]
> at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[?:1.8.0_92]
> at org.springframework.boot.loader.LaunchedURLClassLoader.loadClass(LaunchedURLClassLoader.java:151) ~[indexer-IPM-12.0.4-CP4D-SNAPSHOT.jar:?]
> at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:1.8.0_92]
> at org.apache.camel.component.elasticsearch.ElasticsearchProducer$HighLevelClient.<init>(ElasticsearchProducer.java:347) ~[camel-elasticsearch-rest-3.12.0.jar:3.12.0]
> at org.apache.camel.component.elasticsearch.ElasticsearchProducer$HighLevelClient.<init>(ElasticsearchProducer.java:345) ~[camel-elasticsearch-rest-3.12.0.jar:3.12.0]
> at org.apache.camel.component.elasticsearch.ElasticsearchProducer.process(ElasticsearchProducer.java:124) ~[camel-elasticsearch-rest-3.12.0.jar:3.12.0]
> at org.apache.camel.support.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:66) ~[camel-support-3.12.0.jar:3.12.0]
> ... 11 more {code}
> I investigated the issue in details and came to know that package _org.elasticsearch.common.CheckedConsumer_ is present in _*elasticsearch-core-7.13.0.jar*_ but the *common* package is completely missing in _*elasticsearch-core-7.15.0.jar.*_ This is why while talking with Elasticsearch using Apache Camel component we are getting this runtime error.
> Please have a look on the attached images for the package structure and class information in respective jars.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)