[
https://issues.apache.org/jira/browse/SM-4641?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Lukas Holthof updated SM-4641:
------------------------------
Description:
I am using org.apache.servicemix.bundles.kafka-clients in version 2.2.1_1.
After updating to 2.6.0_1 the application fails with:
{code:java}
2020 12 10
07_30_02#+00#ERROR#org.apache.kafka.common.utils.KafkaThread###kafka-producer-network-thread
| MPLQueueProducer-1607585400245#na###Uncaught exception in thread
'kafka-producer-network-thread \|
MPLQueueProducer-1607585400245':java.lang.NoClassDefFoundError:
org/apache/kafka/common/requests/ApiVersionsRequest$Builder : cannot initialize
class because prior initialization attempt failed
at
org.apache.kafka.clients.NetworkClient.handleConnections(NetworkClient.java:910)
at org.apache.kafka.clients.NetworkClient.poll(NetworkClient.java:555)
at org.apache.kafka.clients.producer.internals.Sender.runOnce(Sender.java:325)
at org.apache.kafka.clients.producer.internals.Sender.run(Sender.java:240)
at java.lang.Thread.run(Thread.java:836)
Caused by: java.lang.ExceptionInInitializerError:
java.lang.NoClassDefFoundError: com/fasterxml/jackson/databind/JsonNode
at
org.apache.kafka.common.requests.ApiVersionsRequest$Builder.<clinit>(ApiVersionsRequest.java:36)
at
org.apache.kafka.clients.NetworkClient.handleConnections(NetworkClient.java:910)
at org.apache.kafka.clients.NetworkClient.poll(NetworkClient.java:555)
at org.apache.kafka.clients.producer.internals.Sender.runOnce(Sender.java:325)
at org.apache.kafka.clients.producer.internals.Sender.run(Sender.java:240)
at java.lang.Thread.run(Thread.java:836)
caused by: java.lang.ClassNotFoundException:
com.fasterxml.jackson.databind.JsonNode not found by
org.apache.servicemix.bundles.kafka-clients [170]
at
org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1639)
at
org.apache.felix.framework.BundleWiringImpl.access$200(BundleWiringImpl.java:80)
at
org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:2053)
at java.lang.ClassLoader.loadClass(ClassLoader.java:413)
at
org.apache.kafka.common.requests.ApiVersionsRequest$Builder.<clinit>(ApiVersionsRequest.java:36)
at
org.apache.kafka.clients.NetworkClient.handleConnections(NetworkClient.java:910)
at org.apache.kafka.clients.NetworkClient.poll(NetworkClient.java:555)
at org.apache.kafka.clients.producer.internals.Sender.runOnce(Sender.java:325)
at org.apache.kafka.clients.producer.internals.Sender.run(Sender.java:240)
at java.lang.Thread.run(Thread.java:836)at
java.lang.Class.setExceptionThrownDuringClinit(Class.java:3685)
... 5 common frames omitted
|
java.lang.NoClassDefFoundError:
org/apache/kafka/common/requests/ApiVersionsRequest$Builder : cannot initialize
class because prior initialization attempt failed
at
org.apache.kafka.clients.NetworkClient.handleConnections(NetworkClient.java:910)
at org.apache.kafka.clients.NetworkClient.poll(NetworkClient.java:555)
at org.apache.kafka.clients.producer.internals.Sender.runOnce(Sender.java:325)
at org.apache.kafka.clients.producer.internals.Sender.run(Sender.java:240)
at java.lang.Thread.run(Thread.java:836)
Caused by: java.lang.ExceptionInInitializerError:
java.lang.NoClassDefFoundError: com/fasterxml/jackson/databind/JsonNode
at
org.apache.kafka.common.requests.ApiVersionsRequest$Builder.<clinit>(ApiVersionsRequest.java:36)
at
org.apache.kafka.clients.NetworkClient.handleConnections(NetworkClient.java:910)
at org.apache.kafka.clients.NetworkClient.poll(NetworkClient.java:555)
at org.apache.kafka.clients.producer.internals.Sender.runOnce(Sender.java:325)
at org.apache.kafka.clients.producer.internals.Sender.run(Sender.java:240)
at java.lang.Thread.run(Thread.java:836)
caused by: java.lang.ClassNotFoundException:
com.fasterxml.jackson.databind.JsonNode not found by
org.apache.servicemix.bundles.kafka-clients [170]
at
org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1639)
at
org.apache.felix.framework.BundleWiringImpl.access$200(BundleWiringImpl.java:80)
at
org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:2053)
at java.lang.ClassLoader.loadClass(ClassLoader.java:413)
at
org.apache.kafka.common.requests.ApiVersionsRequest$Builder.<clinit>(ApiVersionsRequest.java:36)
at
org.apache.kafka.clients.NetworkClient.handleConnections(NetworkClient.java:910)
at org.apache.kafka.clients.NetworkClient.poll(NetworkClient.java:555)
at org.apache.kafka.clients.producer.internals.Sender.runOnce(Sender.java:325)
at org.apache.kafka.clients.producer.internals.Sender.run(Sender.java:240)
at java.lang.Thread.run(Thread.java:836)at
java.lang.Class.setExceptionThrownDuringClinit(Class.java:3685)
... 5 common frames omitted
{code}
Running on version 2.5.0_1, it does not show this error. Most likely kafka is
not using jackson-databind at this point in earlier versions, but that is just
my assumption.
I found a related issue in the camel community:
https://issues.apache.org/jira/browse/CAMEL-15752
Deviating from their resolution I do not think it is actually a version
conflict, but the servicemix bundle is just missing the import. By adding this
to the consuming project this import gets added. But ideally this would be
added to the servicemix bundle, so not every consumer of the bundle has to care
about it. In OSGI this import is a must. What do you think?
Another reported issue similar to the one in the camel community:
[https://stackoverflow.com/questions/63947560/error-org-apache-kafka-common-utils-kafkathread-uncaught-exception-in-thread]
was:
I am using org.apache.servicemix.bundles.kafka-clients in version 2.2.1_1.
After updating to 2.6.0_1 the application fails with:
{code:java}
2020 12 10
07_30_02#+00#ERROR#org.apache.kafka.common.utils.KafkaThread###kafka-producer-network-thread
| MPLQueueProducer-1607585400245#na###Uncaught exception in thread
'kafka-producer-network-thread \|
MPLQueueProducer-1607585400245':java.lang.NoClassDefFoundError:
org/apache/kafka/common/requests/ApiVersionsRequest$Builder : cannot initialize
class because prior initialization attempt failed
at
org.apache.kafka.clients.NetworkClient.handleConnections(NetworkClient.java:910)
at org.apache.kafka.clients.NetworkClient.poll(NetworkClient.java:555)
at org.apache.kafka.clients.producer.internals.Sender.runOnce(Sender.java:325)
at org.apache.kafka.clients.producer.internals.Sender.run(Sender.java:240)
at java.lang.Thread.run(Thread.java:836)
Caused by: java.lang.ExceptionInInitializerError:
java.lang.NoClassDefFoundError: com/fasterxml/jackson/databind/JsonNode
at
org.apache.kafka.common.requests.ApiVersionsRequest$Builder.<clinit>(ApiVersionsRequest.java:36)
at
org.apache.kafka.clients.NetworkClient.handleConnections(NetworkClient.java:910)
at org.apache.kafka.clients.NetworkClient.poll(NetworkClient.java:555)
at org.apache.kafka.clients.producer.internals.Sender.runOnce(Sender.java:325)
at org.apache.kafka.clients.producer.internals.Sender.run(Sender.java:240)
at java.lang.Thread.run(Thread.java:836)
caused by: java.lang.ClassNotFoundException:
com.fasterxml.jackson.databind.JsonNode not found by
org.apache.servicemix.bundles.kafka-clients [170]
at
org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1639)
at
org.apache.felix.framework.BundleWiringImpl.access$200(BundleWiringImpl.java:80)
at
org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:2053)
at java.lang.ClassLoader.loadClass(ClassLoader.java:413)
at
org.apache.kafka.common.requests.ApiVersionsRequest$Builder.<clinit>(ApiVersionsRequest.java:36)
at
org.apache.kafka.clients.NetworkClient.handleConnections(NetworkClient.java:910)
at org.apache.kafka.clients.NetworkClient.poll(NetworkClient.java:555)
at org.apache.kafka.clients.producer.internals.Sender.runOnce(Sender.java:325)
at org.apache.kafka.clients.producer.internals.Sender.run(Sender.java:240)
at java.lang.Thread.run(Thread.java:836)at
java.lang.Class.setExceptionThrownDuringClinit(Class.java:3685)
... 5 common frames omitted
|
java.lang.NoClassDefFoundError:
org/apache/kafka/common/requests/ApiVersionsRequest$Builder : cannot initialize
class because prior initialization attempt failed
at
org.apache.kafka.clients.NetworkClient.handleConnections(NetworkClient.java:910)
at org.apache.kafka.clients.NetworkClient.poll(NetworkClient.java:555)
at org.apache.kafka.clients.producer.internals.Sender.runOnce(Sender.java:325)
at org.apache.kafka.clients.producer.internals.Sender.run(Sender.java:240)
at java.lang.Thread.run(Thread.java:836)
Caused by: java.lang.ExceptionInInitializerError:
java.lang.NoClassDefFoundError: com/fasterxml/jackson/databind/JsonNode
at
org.apache.kafka.common.requests.ApiVersionsRequest$Builder.<clinit>(ApiVersionsRequest.java:36)
at
org.apache.kafka.clients.NetworkClient.handleConnections(NetworkClient.java:910)
at org.apache.kafka.clients.NetworkClient.poll(NetworkClient.java:555)
at org.apache.kafka.clients.producer.internals.Sender.runOnce(Sender.java:325)
at org.apache.kafka.clients.producer.internals.Sender.run(Sender.java:240)
at java.lang.Thread.run(Thread.java:836)
caused by: java.lang.ClassNotFoundException:
com.fasterxml.jackson.databind.JsonNode not found by
org.apache.servicemix.bundles.kafka-clients [170]
at
org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1639)
at
org.apache.felix.framework.BundleWiringImpl.access$200(BundleWiringImpl.java:80)
at
org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:2053)
at java.lang.ClassLoader.loadClass(ClassLoader.java:413)
at
org.apache.kafka.common.requests.ApiVersionsRequest$Builder.<clinit>(ApiVersionsRequest.java:36)
at
org.apache.kafka.clients.NetworkClient.handleConnections(NetworkClient.java:910)
at org.apache.kafka.clients.NetworkClient.poll(NetworkClient.java:555)
at org.apache.kafka.clients.producer.internals.Sender.runOnce(Sender.java:325)
at org.apache.kafka.clients.producer.internals.Sender.run(Sender.java:240)
at java.lang.Thread.run(Thread.java:836)at
java.lang.Class.setExceptionThrownDuringClinit(Class.java:3685)
... 5 common frames omitted
{code}
Running on version 2.5.0_1, it does not show this error. Most likely kafka is
not using jackson-databind at this point in earlier versions, but that is just
my assumption.
I found a related issue in the camel community:
https://issues.apache.org/jira/browse/CAMEL-15752
Deviating from their resolution I do not think it is actually a version
conflict, but the servicemix bundle is just missing the import. By adding this
to the consuming project this import gets added. But ideally this would be
added to the servicemix bundle, so not every consumer of the bundle has to care
about it. What do you think?
Another reported issue similar to the one in the camel community:
[https://stackoverflow.com/questions/63947560/error-org-apache-kafka-common-utils-kafkathread-uncaught-exception-in-thread]
> Bundle kafka-clients are missing jackson-databind import
> ---------------------------------------------------------
>
> Key: SM-4641
> URL: https://issues.apache.org/jira/browse/SM-4641
> Project: ServiceMix
> Issue Type: Bug
> Components: bundles
> Reporter: Lukas Holthof
> Priority: Major
>
> I am using org.apache.servicemix.bundles.kafka-clients in version 2.2.1_1.
> After updating to 2.6.0_1 the application fails with:
> {code:java}
> 2020 12 10
> 07_30_02#+00#ERROR#org.apache.kafka.common.utils.KafkaThread###kafka-producer-network-thread
> | MPLQueueProducer-1607585400245#na###Uncaught exception in thread
> 'kafka-producer-network-thread \|
> MPLQueueProducer-1607585400245':java.lang.NoClassDefFoundError:
> org/apache/kafka/common/requests/ApiVersionsRequest$Builder : cannot
> initialize class because prior initialization attempt failed
> at
> org.apache.kafka.clients.NetworkClient.handleConnections(NetworkClient.java:910)
> at org.apache.kafka.clients.NetworkClient.poll(NetworkClient.java:555)
> at org.apache.kafka.clients.producer.internals.Sender.runOnce(Sender.java:325)
> at org.apache.kafka.clients.producer.internals.Sender.run(Sender.java:240)
> at java.lang.Thread.run(Thread.java:836)
> Caused by: java.lang.ExceptionInInitializerError:
> java.lang.NoClassDefFoundError: com/fasterxml/jackson/databind/JsonNode
> at
> org.apache.kafka.common.requests.ApiVersionsRequest$Builder.<clinit>(ApiVersionsRequest.java:36)
> at
> org.apache.kafka.clients.NetworkClient.handleConnections(NetworkClient.java:910)
> at org.apache.kafka.clients.NetworkClient.poll(NetworkClient.java:555)
> at org.apache.kafka.clients.producer.internals.Sender.runOnce(Sender.java:325)
> at org.apache.kafka.clients.producer.internals.Sender.run(Sender.java:240)
> at java.lang.Thread.run(Thread.java:836)
> caused by: java.lang.ClassNotFoundException:
> com.fasterxml.jackson.databind.JsonNode not found by
> org.apache.servicemix.bundles.kafka-clients [170]
> at
> org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1639)
> at
> org.apache.felix.framework.BundleWiringImpl.access$200(BundleWiringImpl.java:80)
> at
> org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:2053)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:413)
> at
> org.apache.kafka.common.requests.ApiVersionsRequest$Builder.<clinit>(ApiVersionsRequest.java:36)
> at
> org.apache.kafka.clients.NetworkClient.handleConnections(NetworkClient.java:910)
> at org.apache.kafka.clients.NetworkClient.poll(NetworkClient.java:555)
> at org.apache.kafka.clients.producer.internals.Sender.runOnce(Sender.java:325)
> at org.apache.kafka.clients.producer.internals.Sender.run(Sender.java:240)
> at java.lang.Thread.run(Thread.java:836)at
> java.lang.Class.setExceptionThrownDuringClinit(Class.java:3685)
> ... 5 common frames omitted
> |
> java.lang.NoClassDefFoundError:
> org/apache/kafka/common/requests/ApiVersionsRequest$Builder : cannot
> initialize class because prior initialization attempt failed
> at
> org.apache.kafka.clients.NetworkClient.handleConnections(NetworkClient.java:910)
> at org.apache.kafka.clients.NetworkClient.poll(NetworkClient.java:555)
> at org.apache.kafka.clients.producer.internals.Sender.runOnce(Sender.java:325)
> at org.apache.kafka.clients.producer.internals.Sender.run(Sender.java:240)
> at java.lang.Thread.run(Thread.java:836)
> Caused by: java.lang.ExceptionInInitializerError:
> java.lang.NoClassDefFoundError: com/fasterxml/jackson/databind/JsonNode
> at
> org.apache.kafka.common.requests.ApiVersionsRequest$Builder.<clinit>(ApiVersionsRequest.java:36)
> at
> org.apache.kafka.clients.NetworkClient.handleConnections(NetworkClient.java:910)
> at org.apache.kafka.clients.NetworkClient.poll(NetworkClient.java:555)
> at org.apache.kafka.clients.producer.internals.Sender.runOnce(Sender.java:325)
> at org.apache.kafka.clients.producer.internals.Sender.run(Sender.java:240)
> at java.lang.Thread.run(Thread.java:836)
> caused by: java.lang.ClassNotFoundException:
> com.fasterxml.jackson.databind.JsonNode not found by
> org.apache.servicemix.bundles.kafka-clients [170]
> at
> org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1639)
> at
> org.apache.felix.framework.BundleWiringImpl.access$200(BundleWiringImpl.java:80)
> at
> org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:2053)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:413)
> at
> org.apache.kafka.common.requests.ApiVersionsRequest$Builder.<clinit>(ApiVersionsRequest.java:36)
> at
> org.apache.kafka.clients.NetworkClient.handleConnections(NetworkClient.java:910)
> at org.apache.kafka.clients.NetworkClient.poll(NetworkClient.java:555)
> at org.apache.kafka.clients.producer.internals.Sender.runOnce(Sender.java:325)
> at org.apache.kafka.clients.producer.internals.Sender.run(Sender.java:240)
> at java.lang.Thread.run(Thread.java:836)at
> java.lang.Class.setExceptionThrownDuringClinit(Class.java:3685)
> ... 5 common frames omitted
> {code}
> Running on version 2.5.0_1, it does not show this error. Most likely kafka is
> not using jackson-databind at this point in earlier versions, but that is
> just my assumption.
> I found a related issue in the camel community:
> https://issues.apache.org/jira/browse/CAMEL-15752
> Deviating from their resolution I do not think it is actually a version
> conflict, but the servicemix bundle is just missing the import. By adding
> this to the consuming project this import gets added. But ideally this would
> be added to the servicemix bundle, so not every consumer of the bundle has to
> care about it. In OSGI this import is a must. What do you think?
> Another reported issue similar to the one in the camel community:
> [https://stackoverflow.com/questions/63947560/error-org-apache-kafka-common-utils-kafkathread-uncaught-exception-in-thread]
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)