Vadim Ryzhov created KARAF-5582:
-----------------------------------

             Summary: Incompatible Jackson's versions in camel-jackson and 
decanter elasticsearch
                 Key: KARAF-5582
                 URL: https://issues.apache.org/jira/browse/KARAF-5582
             Project: Karaf
          Issue Type: Bug
          Components: decanter
    Affects Versions: 4.1.4, decanter-1.4.0
            Reporter: Vadim Ryzhov


When install both camel-jackson 2.20.1 and decanter 1.4.0 elasticseach, in log 
appears error:

java.lang.NoSuchMethodError: 
com.fasterxml.jackson.dataformat.smile.SmileGenerator.getOutputContext()Lcom/fasterxml/jackson/core/json/JsonWriteContext;

This config runs fine:
{code:java}
karaf@root()> bundle:list
START LEVEL 100 , List Threshold: 50
ID | State | Lvl | Version | Name
----+--------+-----+--------------+-------------------------------------------------------------------------------------
29 | Active | 80 | 4.1.4 | Apache Karaf :: OSGi Services :: Event
52 | Active | 80 | 2.6.3 | Jackson-annotations
53 | Active | 80 | 2.6.3 | Jackson-core
54 | Active | 80 | 2.6.3 | jackson-databind
55 | Active | 80 | 2.6.3 | Jackson-dataformat-Smile
56 | Active | 80 | 2.6.3 | Jackson-dataformat-YAML
57 | Active | 80 | 18.0.0 | Guava: Google Core Libraries for Java
58 | Active | 80 | 1.0.2 | Compress-LZF
68 | Active | 80 | 1.4.0 | Apache Karaf :: Decanter :: Elasticsearch 2.x
74 | Active | 80 | 2.2.0.1 | Apache ServiceMix :: Bundles :: elasticsearch
104 | Active | 80 | 3.10.5.Final | Netty
115 | Active | 80 | 1.4.0 | Apache Karaf :: Decanter :: Kibana 4.x
116 | Active | 80 | 1.4.0 | Apache Karaf :: Decanter :: API
117 | Active | 80 | 1.4.0 | Apache Karaf :: Decanter :: Appender :: 
Elasticsearch Native 2.x
118 | Active | 80 | 1.4.0 | Apache Karaf :: Decanter :: Marshaller :: Json
119 | Active | 80 | 1.0.4 | JSR 353 (JSON Processing) Default Provider
120 | Active | 80 | 1.4.0 | Apache Karaf :: Decanter :: Collector :: Log
121 | Active | 80 | 1.4.0 | Apache Karaf :: Decanter :: Collector :: JMX
{code}
After installing camel-jackson feature jackson bundles version updated to 
2.8.10:
{code:java}
karaf@root()> feature:repo-add camel 2.20.1
Adding feature url mvn:org.apache.camel.karaf/apache-camel/2.20.1/xml/features
karaf@root()> feature:install camel-jackson
karaf@root()> list
START LEVEL 100 , List Threshold: 50
ID | State | Lvl | Version | Name
----+--------+-----+--------------+-------------------------------------------------------------------------------------
29 | Active | 80 | 4.1.4 | Apache Karaf :: OSGi Services :: Event
55 | Active | 80 | 2.6.3 | Jackson-dataformat-Smile
56 | Active | 80 | 2.6.3 | Jackson-dataformat-YAML
57 | Active | 80 | 18.0.0 | Guava: Google Core Libraries for Java
58 | Active | 80 | 1.0.2 | Compress-LZF
68 | Active | 80 | 1.4.0 | Apache Karaf :: Decanter :: Elasticsearch 2.x
74 | Active | 80 | 2.2.0.1 | Apache ServiceMix :: Bundles :: elasticsearch
104 | Active | 80 | 3.10.5.Final | Netty
115 | Active | 80 | 1.4.0 | Apache Karaf :: Decanter :: Kibana 4.x
116 | Active | 80 | 1.4.0 | Apache Karaf :: Decanter :: API
117 | Active | 80 | 1.4.0 | Apache Karaf :: Decanter :: Appender :: 
Elasticsearch Native 2.x
118 | Active | 80 | 1.4.0 | Apache Karaf :: Decanter :: Marshaller :: Json
119 | Active | 80 | 1.0.4 | JSR 353 (JSON Processing) Default Provider
120 | Active | 80 | 1.4.0 | Apache Karaf :: Decanter :: Collector :: Log
121 | Active | 80 | 1.4.0 | Apache Karaf :: Decanter :: Collector :: JMX
123 | Active | 50 | 2.8.10 | Jackson-annotations
124 | Active | 50 | 2.8.10 | Jackson-core
125 | Active | 50 | 2.8.10 | jackson-databind
126 | Active | 50 | 2.8.10 | Jackson module: JAXB-annotations
127 | Active | 80 | 2.20.1 | camel-commands-core
128 | Active | 50 | 2.20.1 | camel-core
129 | Active | 50 | 2.20.1 | camel-jackson
130 | Active | 80 | 2.20.1 | camel-karaf-commands
{code}
And in log appears error:
{code:java}
2018-01-26 17:09:19,573 | WARN | updateTask][T#1] | gateway | 74 - 
org.apache.servicemix.bundles.elasticsearch - 2.2.0.1 | [decanter] 
[karaf-2018.01.26]: failed to write index state
java.lang.NoSuchMethodError: 
com.fasterxml.jackson.dataformat.smile.SmileGenerator.getOutputContext()Lcom/fasterxml/jackson/core/json/JsonWriteContext;
at 
com.fasterxml.jackson.dataformat.smile.SmileGenerator.close(SmileGenerator.java:1524)
 ~[55:com.fasterxml.jackson.dataformat.jackson-dataformat-smile:2.6.3]
at 
org.elasticsearch.common.xcontent.json.JsonXContentGenerator.close(JsonXContentGenerator.java:445)
 ~[74:org.apache.servicemix.bundles.elasticsearch:2.2.0.1]
at 
org.elasticsearch.common.xcontent.XContentBuilder.close(XContentBuilder.java:1174)
 ~[74:org.apache.servicemix.bundles.elasticsearch:2.2.0.1]
at 
org.elasticsearch.gateway.MetaDataStateFormat.write(MetaDataStateFormat.java:128)
 ~[74:org.apache.servicemix.bundles.elasticsearch:2.2.0.1]
at 
org.elasticsearch.gateway.MetaStateService.writeIndex(MetaStateService.java:135)
 [74:org.apache.servicemix.bundles.elasticsearch:2.2.0.1]
at 
org.elasticsearch.gateway.GatewayMetaState.clusterChanged(GatewayMetaState.java:160)
 [74:org.apache.servicemix.bundles.elasticsearch:2.2.0.1]
at org.elasticsearch.gateway.Gateway.clusterChanged(Gateway.java:185) 
[74:org.apache.servicemix.bundles.elasticsearch:2.2.0.1]
at 
org.elasticsearch.cluster.service.InternalClusterService.runTasksForExecutor(InternalClusterService.java:600)
 [74:org.apache.servicemix.bundles.elasticsearch:2.2.0.1]
at 
org.elasticsearch.cluster.service.InternalClusterService$UpdateTask.run(InternalClusterService.java:762)
 [74:org.apache.servicemix.bundles.elasticsearch:2.2.0.1]
at 
org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.runAndClean(PrioritizedEsThreadPoolExecutor.java:231)
 [74:org.apache.servicemix.bundles.elasticsearch:2.2.0.1]
at 
org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.run(PrioritizedEsThreadPoolExecutor.java:194)
 [74:org.apache.servicemix.bundles.elasticsearch:2.2.0.1]
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) [?:?]
{code}
Elasticsearch fixthis bug on 2.4.0 and 5.0.0:

[https://github.com/elastic/elasticsearch/issues/20089]

But in decanter still used version 2.2.0.



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

Reply via email to