Manas-Bhole opened a new issue, #109:
URL: https://github.com/apache/doris-kafka-connector/issues/109

   **Versions**
   - doris-kafka-connector 26.1.0, the jar from Maven Central 
(`org.apache.doris:doris-kafka-connector:26.1.0`)
   - Kafka Connect 4.3.0 (image `quay.io/debezium/connect:3.6.3.Final`)
   - Doris 4.1.5
   
   **What happens**
   
   Every task dies as soon as partitions are assigned, and stays dead:
   
   ```
   WorkerSinkTask{id=sink-0} Task threw an uncaught and unrecoverable exception.
   java.lang.NoClassDefFoundError: org/apache/commons/lang3/StringUtils
       at 
org.apache.doris.kafka.connector.writer.DorisWriter.<init>(DorisWriter.java:76)
       at 
org.apache.doris.kafka.connector.writer.AsyncStreamLoadWriter.<init>(AsyncStreamLoadWriter.java:50)
       at 
org.apache.doris.kafka.connector.service.DorisCombinedSinkService.createWriter(DorisCombinedSinkService.java:94)
       ...
       at 
org.apache.doris.kafka.connector.DorisSinkTask.open(DorisSinkTask.java:81)
   Caused by: java.lang.ClassNotFoundException: 
org.apache.commons.lang3.StringUtils
   ```
   
   **Why**
   
   Six classes import `org.apache.commons.lang3`, but the pom does not declare 
it: it compiles because commons-lang3 arrives transitively through 
`connect-runtime` (scope `provided`, via `maven-artifact`). So the jar does not 
contain it (`unzip -l` shows no `org/apache/commons/lang3/`), and at run time 
it must come from the worker. The `libs/` directory of Kafka Connect 4.3.0 in 
this image has no commons-lang3, so the class is missing.
   
   **Workaround**
   
   Put `commons-lang3-3.17.0.jar` next to the connector jar in the plugin 
directory. With it, the connector works on Kafka 4.3.
   
   **Suggested fix**
   
   Declare commons-lang3 as a compile dependency so the shaded jar includes it 
(or replace the six uses with JDK methods).
   
   This also answers #88 (Kafka 4.0 support): the connector works on Kafka 4 
once this class is available.
   
   cc @JNSimba


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to