Open burd0047 opened 7 years ago
Perhaps related to #105
I'm running into the same error. Is there any news on this?
What do you have set for your plug in path?
I encountered the same error while running this locally. I suspect you are running a newer major version of confluent. Kafka-Connect-Bigquery requires confluent-3.0.0 specified in this repo, but I was running it with confluent-5.0.0 (which I think uses kafka 2.0.0 rather than 1.1.1), which resulted in NoClassDefFoundError: com/google/cloud/bigquery/BigQuery
If you must run confluent-5.0.0:
org.apache.kafka:connect-api:1.1.1
with org.apache.kafka:connect-api:2.0.0
org.apache.kafka:kafka-clients:1.1.1
with org.apache.kafka:kafka-clients:2.0.0
com.google.cloud:google-cloud:0.47.0-alpha
with com.google.cloud:google-cloud-bigquery:1.51.0
and com.google.cloud:google-cloud-storage:1.51.0
(those steps above seem to have fixed the error for me)This is a bit risky as Kafka-Connect-Bigquery should be upgraded in lockstep with Debezium, which uses the older version of confluent as well. We haven't tested the pipeline in production with this newer version of confluent, so cannot be sure what kind of odd edge cases could come up when they mismatch.
Hello,
I am trying to run kafka-connect-bigquery and getting the following error: [2017-10-27 20:07:07,792] INFO Loading plugin from: /usr/share/java/kafka-connect-bigquery/kcbq-connector-1.0.0-SNAPSHOT.jar (org.apache.kafka.connect.runtime.isolation.DelegatingClassLoader:176) Exception in thread "main" java.lang.NoClassDefFoundError: com/google/cloud/bigquery/BigQuery at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2671) at java.lang.Class.getConstructor0(Class.java:3075) at java.lang.Class.newInstance(Class.java:412) at org.apache.kafka.connect.runtime.isolation.DelegatingClassLoader.getPluginDesc(DelegatingClassLoader.java:242) at org.apache.kafka.connect.runtime.isolation.DelegatingClassLoader.scanPluginPath(DelegatingClassLoader.java:223) at org.apache.kafka.connect.runtime.isolation.DelegatingClassLoader.scanUrlsAndAddPlugins(DelegatingClassLoader.java:198) at org.apache.kafka.connect.runtime.isolation.DelegatingClassLoader.registerPlugin(DelegatingClassLoader.java:190) at org.apache.kafka.connect.runtime.isolation.DelegatingClassLoader.initLoaders(DelegatingClassLoader.java:150) at org.apache.kafka.connect.runtime.isolation.Plugins.(Plugins.java:47)
at org.apache.kafka.connect.cli.ConnectDistributed.main(ConnectDistributed.java:63)
Caused by: java.lang.ClassNotFoundException: com.google.cloud.bigquery.BigQuery
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at org.apache.kafka.connect.runtime.isolation.PluginClassLoader.loadClass(PluginClassLoader.java:62)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 11 more
I am using the following DockerFile to build the image. I have also tried including the tar ball directly instead of building the code, but i get the same error.
FROM solsson/kafka-connect-jdbc@sha256:a6108f094eaef52469c8ca7d3e60b2523cadd6f5283f481c96308033b26fc92e WORKDIR /usr/src/app
RUN ["mkdir", "app"]
RUN ["mkdir", "/usr/logs"] RUN ["chmod", "a+rwx", "/usr/logs"]
RUN ["mkdir", "/usr/share/java/kafka-connect-bigquery"] RUN ["chmod", "a+rwx", "/usr/share/java/kafka-connect-bigquery"]
COPY . . RUN ["./gradlew", "clean", "confluentTarBall"] RUN ["tar", "-C", "/usr/share/java/kafka-connect-bigquery", "-xf", "/usr/src/app/bin/tar/kcbq-connector-1.0.0-SNAPSHOT-confluent-dist.tar"]
RUN ["rm", "-r", "app"]
WORKDIR /opt/kafka
Any ideas on what may be wrong? I tried googling for error, but didn't find much.