confluent-kafka-connect 5.3.0升级失败,并出现java.lang.IncompatibleClassChangeError:实现类

时间:2019-08-28 23:22:33

标签: cassandra apache-kafka confluent confluent-platform

我正在尝试将我们的confluent-kafka-connect从3.2.0升级到5.3.0

Docker文件-

FROM confluentinc/cp-kafka-connect:5.3.0

COPY connector-drivers/Common/ /usr/share/java/confluent-common/

COPY connector-drivers/JDBC/ /usr/share/java/kafka-connect-jdbc/

ENV CLASSPATH=/usr/share/java/kafka-connect-jdbc/*:/usr/share/java/kafka-connect-jdbc/as400-java6-jt400.jar:/usr/share/java/kafka-connect-jdbc/jtds-1.3.1.jar:/usr/share/java/kafka-connect-jdbc/sqljdbc4-3.0.jar:/usr/share/java/confluent-common/kafka-connect-cassandra-1.0.0-1.0.0-all.jar:/usr/share/java/confluent-common/kafka-connect-couchbase-3.3.2.jar:/usr/share/java/kafka-connect-jdbc/ojdbc6.jar:/usr/share/java/kafka-connect-jdbc/mysql-connector-java-5.1.44-bin.jar

RUN echo "===> Installing Replicator ..." \
    && apt-get -qq update \
     && apt-get install -y \
        confluent-kafka-connect-replicator=5.3.0-1 \
     && echo "===> Cleaning up ..."  \
     && apt-get clean && rm -rf /tmp/* /var/lib/apt/lists/*

由于复制器无法在s3中找到相关文件,因此我在RUN命令下面添加了docker文件。

RUN sed -i s,https://s3-us-west-2.amazonaws.com/staging-confluent-packages-5.3.0/deb/5.3,https://packages.confluent.io/deb/5.3, /etc/apt/sources.list

当我尝试在DCOS群集中进行部署时,stdout文件中出现错误消息

[2019-08-28 23:01:19,289] ERROR Stopping due to error (org.apache.kafka.connect.cli.ConnectDistributed)
java.lang.IncompatibleClassChangeError: Implementing class
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:468)
    at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:369)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:362)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:468)
    at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:369)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:362)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    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:355)
    at org.apache.kafka.connect.runtime.isolation.DelegatingClassLoader.getPluginDesc(DelegatingClassLoader.java:331)
    at org.apache.kafka.connect.runtime.isolation.DelegatingClassLoader.scanPluginPath(DelegatingClassLoader.java:311)
    at org.apache.kafka.connect.runtime.isolation.DelegatingClassLoader.scanUrlsAndAddPlugins(DelegatingClassLoader.java:244)
    at org.apache.kafka.connect.runtime.isolation.DelegatingClassLoader.initPluginLoader(DelegatingClassLoader.java:192)
    at org.apache.kafka.connect.runtime.isolation.DelegatingClassLoader.initLoaders(DelegatingClassLoader.java:185)
    at org.apache.kafka.connect.runtime.isolation.Plugins.<init>(Plugins.java:61)
    at org.apache.kafka.connect.cli.ConnectDistributed.startConnect(ConnectDistributed.java:91)
    at org.apache.kafka.connect.cli.ConnectDistributed.main(ConnectDistributed.java:78)

我注意到,此错误仅在定义了cassandra jar文件时发生,我也尝试过使用kafka-connect-cassandra-1.2.2-2.1.0-all.tar.gz jar,仍然是同样的问题。

注意-使用相同的cassandra jar,confluent-kafka-connect可以正常工作到3.3.0版本。

0 个答案:

没有答案