Exception when starting on open-source Kafka 2.6.0
avelanarius opened this issue · comments
Piotr Grabowski commented
When starting the connector on open-source Kafka 2.6.0, it fails to start with:
[2021-05-04 14:43:00,052] ERROR Stopping due to error (org.apache.kafka.connect.cli.ConnectStandalone:130)
java.lang.NoClassDefFoundError: com/datastax/driver/core/Statement
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.versionFor(DelegatingClassLoader.java:395)
at org.apache.kafka.connect.runtime.isolation.DelegatingClassLoader.getPluginDesc(DelegatingClassLoader.java:365)
at org.apache.kafka.connect.runtime.isolation.DelegatingClassLoader.scanPluginPath(DelegatingClassLoader.java:337)
at org.apache.kafka.connect.runtime.isolation.DelegatingClassLoader.scanUrlsAndAddPlugins(DelegatingClassLoader.java:268)
at org.apache.kafka.connect.runtime.isolation.DelegatingClassLoader.registerPlugin(DelegatingClassLoader.java:260)
at org.apache.kafka.connect.runtime.isolation.DelegatingClassLoader.initPluginLoader(DelegatingClassLoader.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.datastax.driver.core.Statement
at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
at org.apache.kafka.connect.runtime.isolation.PluginClassLoader.loadClass(PluginClassLoader.java:104)
at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
... 13 more
Bolshakov, Denis commented
Wojciech Bączkowski commented
Make sure your plugin.path in config/connect-standalone.properties
points to directory with plugin bundle that has all dependencies included.
plugin.path=/home/user/Documents/repos/kafka-connect-scylladb/target/components/packages/ScyllaDB-kafka-connect-scylladb-1.0.0-SNAPSHOT-preview
It's important that you do not point directly to the lib subdirectory ([...]/packages/ScyllaDB-kafka-connect-scylladb-1.0.0-SNAPSHOT-preview/ScyllaDB-kafka-connect-scylladb-1.0.0-SNAPSHOT-preview/lib
) with all .jar files.