java.lang.ClassNotFoundException: com.couchbase.client.core.logging.RedactionLevel

Hi Team, I am Trying to deploy Kafka Connect Couchbase 4.6.1 I am Able to Successfully Build Source Code Provided by Couchbase But when I Create image of The Source file using OpenShift pipeline and deploy it in Kafka Connect Section of AMQ streams Hosted on Azure OpenShift I am Getting java.lang.ClassNotFoundException: com.couchbase.client.core.logging.RedactionLevel

2023-10-16 07:03:10,127 WARN /connectors/couchbase-collection-connector-test/config (org.eclipse.jetty.server.HttpChannel) [qtp1598047636-21]
javax.servlet.ServletException: org.glassfish.jersey.server.ContainerException: java.lang.NoClassDefFoundError: com/couchbase/client/core/logging/RedactionLevel
at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:410)
at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:346)
at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:366)
at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:319)
at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:205)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:799)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:550)
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1624)
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1434)
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:501)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1594)
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1349)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:234)
at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:179)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
at org.eclipse.jetty.server.Server.handle(Server.java:516)
at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:388)
at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:633)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:380)
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:277)
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105)
at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:338)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:315)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:173)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:131)
at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:386)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:883)
at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1034)
at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: org.glassfish.jersey.server.ContainerException: java.lang.NoClassDefFoundError: com/couchbase/client/core/logging/RedactionLevel
at org.glassfish.jersey.servlet.internal.ResponseWriter.rethrow(ResponseWriter.java:254)
at org.glassfish.jersey.servlet.internal.ResponseWriter.failure(ResponseWriter.java:236)
at org.glassfish.jersey.server.ServerRuntime$Responder.process(ServerRuntime.java:438)
at org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:263)
at org.glassfish.jersey.internal.Errors$1.call(Errors.java:248)
at org.glassfish.jersey.internal.Errors$1.call(Errors.java:244)
at org.glassfish.jersey.internal.Errors.process(Errors.java:292)
at org.glassfish.jersey.internal.Errors.process(Errors.java:274)
at org.glassfish.jersey.internal.Errors.process(Errors.java:244)
at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:265)
at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:234)
at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:680)
at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:394)
… 35 more

You’re going to need to include couchbase java-client as a dependency.

I have already added

    <dependency>
        <groupId>com.couchbase.client</groupId>
        <artifactId>java-client</artifactId>
        <version>${java-client.version}</version>
    </dependency>

and java client version is
<java-client.version>3.2.5</java-client.version>
<dcp-client.version>0.40.0</dcp-client.version>

but it seems there is some conflict between DCP Client and java client for io.projectreactor:reactor-core

DCP Client using version 3.4.13 and Java Client Using 3.4.14 and thus maven omiting 3.4.14 over conflict with 3.4.13

Can you please provide any solution for this.

Please use the latest Java SDK which is 3.4.11. https://mvnrepository.com/artifact/com.couchbase.client/java-client

I don’t understand what “DCP Client using version 3.4.13 and Java Client Using 3.4.14 and thus maven omiting 3.4.14 over conflict with 3.4.13” means.

Both DCP Client and Java Client Are Using io.projectreactor:reactor-core but version are different:
DCP Client is using io.projectreactor:reactor-core:3.4.13 and
Java Client is using io.projectreactor:reactor-core:3.4.14
that’s the conflict so maven omitting io.projectreactor:reactor-core:3.4.14 due to conflict 3.4.13

The latest version of Kafka Connect Couchbase is 4.1.11.

It’s not recommended (and should not be necessary) to mix and match Couchbase SDK component versions when deploying the Kafka connector.

I am Able to Successfully Build Source Code Provided by Couchbase

It shouldn’t be necessary to build the connector from source. We recommend using a pre-built binary from Confluent Hub or the Kafka Couchbase Connector release notes page. Do you want to talk about why you’re building from source?

Thanks,
David

we need to add some custom filter in source code that’s why we are building and deploying source code, but we are facing issues with running the connector without any code changes that should not be happening. and also, we have tried deploying latest version there we are getting error: org.apache.kafka.connect.errors.ConnectException: Failed to find any class that implements Connector and which name matches com.couchbase.connect.kafka.CouchbaseSourceConnector

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.