couchbase / kafka-connect-couchbase

Kafka Connect connector for Couchbase Server
https://issues.couchbase.com/projects/KAFKAC
Apache License 2.0
73 stars 72 forks source link

java.lang.ClassNotFoundException: com.couchbase.client.core.util.ReactorOps after upgrading to 4.2.5 #51

Closed yeikel closed 1 week ago

yeikel commented 1 week ago

I upgraded to version 4.2.5, and I am seeing the following exception at startup :


java.lang.NoClassDefFoundError: com/couchbase/client/core/util/ReactorOps
    at com.couchbase.connect.kafka.KafkaCouchbaseClient.<init>(KafkaCouchbaseClient.java:64)
    at com.couchbase.connect.kafka.KafkaCouchbaseClient.<init>(KafkaCouchbaseClient.java:50)
    at com.couchbase.connect.kafka.CouchbaseSourceConnector.start(CouchbaseSourceConnector.java:66)
    at org.apache.kafka.connect.runtime.WorkerConnector.doStart(WorkerConnector.java:192)
    at org.apache.kafka.connect.runtime.WorkerConnector.start(WorkerConnector.java:217)
    at org.apache.kafka.connect.runtime.WorkerConnector.doTransitionTo(WorkerConnector.java:376)
    at org.apache.kafka.connect.runtime.WorkerConnector.doTransitionTo(WorkerConnector.java:357)
    at org.apache.kafka.connect.runtime.WorkerConnector.doRun(WorkerConnector.java:144)
    at org.apache.kafka.connect.runtime.WorkerConnector.run(WorkerConnector.java:122)
    at org.apache.kafka.connect.runtime.isolation.Plugins.lambda$withClassLoader$1(Plugins.java:237)
    at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
    at java.base/java.lang.Thread.run(Thread.java:1583)
Caused by: java.lang.ClassNotFoundException: com.couchbase.client.core.util.ReactorOps
    at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:445)
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:593)
    at org.apache.kafka.connect.runtime.isolation.PluginClassLoader.loadClass(PluginClassLoader.java:124)
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:526)
    ... 15 more
level=ERROR connector_context=Uncaught exception in REST call to /connectors/connectorName/restart class=org.apache.kafka.connect.runtime.rest.errors.ConnectExceptionMapper line=64 
org.apache.kafka.connect.errors.ConnectException: Failed to start connector: connectorName
    at org.apache.kafka.connect.runtime.distributed.DistributedHerder.lambda$startConnector$41(DistributedHerder.java:2045)
    at org.apache.kafka.connect.runtime.WorkerConnector.doTransitionTo(WorkerConnector.java:360)
    at org.apache.kafka.connect.runtime.WorkerConnector.doRun(WorkerConnector.java:144)
    at org.apache.kafka.connect.runtime.WorkerConnector.run(WorkerConnector.java:122)
    at org.apache.kafka.connect.runtime.isolation.Plugins.lambda$withClassLoader$1(Plugins.java:237)
    at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
    at java.base/java.lang.Thread.run(Thread.java:1583)
Caused by: org.apache.kafka.connect.errors.ConnectException: Failed to transition connector connector to state STARTED
    ... 9 more
Caused by: java.lang.NoClassDefFoundError: com/couchbase/client/core/util/ReactorOps
    at com.couchbase.connect.kafka.KafkaCouchbaseClient.<init>(KafkaCouchbaseClient.java:64)
    at com.couchbase.connect.kafka.KafkaCouchbaseClient.<init>(KafkaCouchbaseClient.java:50)
    at com.couchbase.connect.kafka.CouchbaseSourceConnector.start(CouchbaseSourceConnector.java:66)
    at org.apache.kafka.connect.runtime.WorkerConnector.doStart(WorkerConnector.java:192)
    at org.apache.kafka.connect.runtime.WorkerConnector.start(WorkerConnector.java:217)
    at org.apache.kafka.connect.runtime.WorkerConnector.doTransitionTo(WorkerConnector.java:376)
    at org.apache.kafka.connect.runtime.WorkerConnector.doTransitionTo(WorkerConnector.java:357)
    ... 8 more
Caused by: java.lang.ClassNotFoundException: com.couchbase.client.core.util.ReactorOps
    at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:445)
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:593)
    at org.apache.kafka.connect.runtime.isolation.PluginClassLoader.loadClass(PluginClassLoader.java:124)
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:526)

I downgraded to 4.2.4 and the issue does not seem to happen there

dnault commented 1 week ago

Confirmed -- an issue with maven dependency order is causing core-io 3.7.4 to get brought in instead of 3.7.5. :-( We'll fix this with a 4.2.6 release ASAP.

dnault commented 1 week ago

Tracking as KAFKAC-364

dnault commented 1 week ago

The 4.2.6 binaries are up. Revised release notes will be online soon. In the meantime, here's a direct download link: couchbase-kafka-connect-couchbase-4.2.6.zip

yeikel commented 1 week ago

I can confirm that it has been fixed

Thanks!