Uploaded image for project: 'Debezium'
  1. Debezium
  2. DBZ-6517

CloudEventsConverter throws static error on Kafka Connect 3.5+

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 2.4.0.Alpha1
    • 1.1.0.Final, 2.2.0.Final, 2.3.0.Beta1
    • core-library
    • None
    • False
    • None
    • False

      Bug report

      I downloaded a released version of Debezium including the CloudEventsConverter.
      I attempted to use it with a 3.5 release candidate from the AK mailing list: https://lists.apache.org/thread/4njxjvtcd4tmjxjrtdbmomk9tznwzt1t 

      What behaviour do you expect?

      The CloudEventsConverter is usable in a typical connector configuration.

      What behaviour do you see?

      The CloudEventsConverter throws an ExceptionInInitializerError with the following (truncated) stacktrace:

      java.lang.ExceptionInInitializerError
              at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
              at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77)
              at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
              at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)
              at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:480)
      ...
      Caused by: org.apache.kafka.connect.errors.DataException
              at io.debezium.converters.CloudEventsConverter.<clinit>(CloudEventsConverter.java:111)
              ... 13 more
      

      This appears to be because the static initializer is performing a reflective access on another class: https://github.com/debezium/debezium/blob/3993f3eaad20290300883bbecedae0d213ac3afd/debezium-core/src/main/java/io/debezium/converters/CloudEventsConverter.java#L106-L112 

      And the referenced method has changed signature recently (due to be released in 3.5): https://github.com/apache/kafka/pull/13419

            Unassigned Unassigned
            gharris1727 Greg Harris (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: