Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

java.lang.NoClassDefFoundError: com/google/api/gax/rpc/TransportChannelProvider #241

Open
ZackBarry opened this issue Nov 3, 2020 · 0 comments

Comments

@ZackBarry
Copy link

I'm getting the following error when I try to run connect-standalone.sh:

[2020-11-03 08:16:25,930] ERROR Stopping due to error (org.apache.kafka.connect.cli.ConnectStandalone:130)
java.lang.NoClassDefFoundError: com/google/api/gax/rpc/TransportChannelProvider
        at java.base/java.lang.Class.getDeclaredConstructors0(Native Method)
        at java.base/java.lang.Class.privateGetDeclaredConstructors(Class.java:3137)
        at java.base/java.lang.Class.getConstructor0(Class.java:3342)
        at java.base/java.lang.Class.newInstance(Class.java:556)
        at org.apache.kafka.connect.runtime.isolation.DelegatingClassLoader.versionFor(DelegatingClassLoader.
java:395)
        at org.apache.kafka.connect.runtime.isolation.DelegatingClassLoader.getPluginDesc(DelegatingClassLoad
er.java:365)
        at org.apache.kafka.connect.runtime.isolation.DelegatingClassLoader.scanPluginPath(DelegatingClassLoa
der.java:337)
        at org.apache.kafka.connect.runtime.isolation.DelegatingClassLoader.scanUrlsAndAddPlugins(DelegatingC
lassLoader.java:268)
        at org.apache.kafka.connect.runtime.isolation.DelegatingClassLoader.registerPlugin(DelegatingClassLoa
der.java:260)
        at org.apache.kafka.connect.runtime.isolation.DelegatingClassLoader.initPluginLoader(DelegatingClassL
oader.java:229)
        at org.apache.kafka.connect.runtime.isolation.DelegatingClassLoader.initLoaders(DelegatingClassLoader
.java:206)
        at org.apache.kafka.connect.runtime.isolation.Plugins.<init>(Plugins.java:61)
        at org.apache.kafka.connect.cli.ConnectStandalone.main(ConnectStandalone.java:79)
Caused by: java.lang.ClassNotFoundException: com.google.api.gax.rpc.TransportChannelProvider
        at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:471)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:589)
        at org.apache.kafka.connect.runtime.isolation.PluginClassLoader.loadClass(PluginClassLoader.java:104)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
        ... 13 more

Prior to the error, some plugins seem to be loaded fine:

[2020-11-03 08:16:25,597] INFO Scanning for plugin classes. This might take a moment ... (org.apache.kafka.co
nnect.cli.ConnectStandalone:78)
[2020-11-03 08:16:25,637] INFO Loading plugin from: /opt/bitnami/kafka/connectors/pubsub-0.4-alpha/kafka-conn
ector/target/maven-archiver (org.apache.kafka.connect.runtime.isolation.DelegatingClassLoader:246)
[2020-11-03 08:16:25,713] INFO Registered loader: PluginClassLoader{pluginLocation=file:/opt/bitnami/kafka/co
nnectors/pubsub-0.4-alpha/kafka-connector/target/maven-archiver/} (org.apache.kafka.connect.runtime.isolation
.DelegatingClassLoader:269)
[2020-11-03 08:16:25,716] INFO Added plugin 'org.apache.kafka.connect.connector.policy.AllConnectorClientConf
igOverridePolicy' (org.apache.kafka.connect.runtime.isolation.DelegatingClassLoader:198)
[2020-11-03 08:16:25,717] INFO Added plugin 'org.apache.kafka.connect.connector.policy.PrincipalConnectorClie
ntConfigOverridePolicy' (org.apache.kafka.connect.runtime.isolation.DelegatingClassLoader:198)
[2020-11-03 08:16:25,717] INFO Added plugin 'org.apache.kafka.connect.connector.policy.NoneConnectorClientCon
figOverridePolicy' (org.apache.kafka.connect.runtime.isolation.DelegatingClassLoader:198)
[2020-11-03 08:16:25,721] INFO Loading plugin from: /opt/bitnami/kafka/connectors/pubsub-0.4-alpha/kafka-conn
ector/target/generated-sources (org.apache.kafka.connect.runtime.isolation.DelegatingClassLoader:246)
[2020-11-03 08:16:25,731] INFO Registered loader: PluginClassLoader{pluginLocation=file:/opt/bitnami/kafka/co
nnectors/pubsub-0.4-alpha/kafka-connector/target/generated-sources/} (org.apache.kafka.connect.runtime.isolat
ion.DelegatingClassLoader:269)
[2020-11-03 08:16:25,732] INFO Loading plugin from: /opt/bitnami/kafka/connectors/pubsub-0.4-alpha/kafka-conn
ector/target/generated-test-sources (org.apache.kafka.connect.runtime.isolation.DelegatingClassLoader:246)
[2020-11-03 08:16:25,737] INFO Registered loader: PluginClassLoader{pluginLocation=file:/opt/bitnami/kafka/co
nnectors/pubsub-0.4-alpha/kafka-connector/target/generated-test-sources/} (org.apache.kafka.connect.runtime.i
solation.DelegatingClassLoader:269)
[2020-11-03 08:16:25,738] INFO Loading plugin from: /opt/bitnami/kafka/connectors/pubsub-0.4-alpha/kafka-conn
ector/target/test-classes (org.apache.kafka.connect.runtime.isolation.DelegatingClassLoader:246)
[2020-11-03 08:16:25,886] INFO Registered loader: PluginClassLoader{pluginLocation=file:/opt/bitnami/kafka/co
nnectors/pubsub-0.4-alpha/kafka-connector/target/test-classes/} (org.apache.kafka.connect.runtime.isolation.D
elegatingClassLoader:269)
[2020-11-03 08:16:25,893] INFO Loading plugin from: /opt/bitnami/kafka/connectors/pubsub-0.4-alpha/kafka-conn
ector/target/classes (org.apache.kafka.connect.runtime.isolation.DelegatingClassLoader:246)

I'm running a Kafka cluster from GCP Marketplace with the 0.4 Alpha release of the Kafka connector, built with Maven 3.6.3. Here's my configuration file for the connector:

name=TestSinkConnector
connector.class=com.google.pubsub.kafka.sink.CloudPubSubSinkConnector
tasks.max=1
topics=test
cps.topic=projects/<my-project>/topics/<my-topic>
cps.project=<my-project>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant