JRob
10/07/2025, 7:55 PMCannot construct instance of `org.apache.druid.data.input.protobuf.SchemaRegistryBasedProtobufBytesDecoder`, problem: io/confluent/kafka/schemaregistry/protobuf/ProtobufSchemaProvider
The instructions here seem to be wrong: https://druid.apache.org/docs/latest/development/extensions-core/protobuf/#when-using-schema-registry
(there is no extension-core folder and creating it didn't fix the issue)
I also tried placing the jars to extensions/protobuf-extensions and extensions/druid-protobuf-extensions but still no luck...JRob
10/07/2025, 8:30 PM2025-10-07T20:23:34,367 INFO [main] org.apache.druid.guice.ExtensionsLoader - Loading extension [druid-protobuf-extensions], jars: druid-protobuf-extensions-33.0.0.jar, wire-schema-3.2.2.jar, kotlin-stdlib-1.4.0.jar, kafka-protobuf-provider-6.0.1.jar. Druid extension dependencies [[]]Ben Krug
10/07/2025, 8:36 PMBen Krug
10/07/2025, 8:37 PMJRob
10/07/2025, 8:45 PMJRob
10/08/2025, 1:37 AMio.confluent.kafka.schemaregistry.protobuf.ProtobufSchemaProvider (from kafka-protobuf-provider jar) imports and extends io.confluent.kafka.schemaregistry.AbstractSchemaProvider but that class isn't included in the jar...JRob
10/08/2025, 4:48 PMBen Krug
10/08/2025, 4:50 PMJRob
10/08/2025, 5:29 PMkafka-schema-registry-client-6.2.12.jar into druid-protobuf-extensions folder (and restarted) but no luck 😢JRob
10/08/2025, 5:44 PMjava -classpath "lib/*" org.apache.druid.cli.Main tools pull-deps -r "https://packages.confluent.io/maven/" -c io.confluent:kafka-protobuf-provider:6.2.12
Sadly, this also did not do the trick. 😢
It seems the druid-protobuf-extensions is broken for Schema Registry.JRob
10/08/2025, 7:19 PMkafka-protobuf-provider causing this.JRob
10/08/2025, 7:29 PM[INFO] \- io.confluent:kafka-protobuf-provider:jar:6.2.12:compile
[INFO] +- com.squareup.wire:wire-schema:jar:3.6.0:compile
[INFO] | +- com.google.guava:guava:jar:20.0:compile
[INFO] | +- com.squareup.wire:wire-runtime:jar:3.6.0:compile
[INFO] | | \- org.jetbrains.kotlin:kotlin-stdlib-jdk8:jar:1.4.10:compile
[INFO] | | \- org.jetbrains.kotlin:kotlin-stdlib-jdk7:jar:1.4.10:compile
[INFO] | +- org.jetbrains.kotlin:kotlin-stdlib-common:jar:1.4.10:compile
[INFO] | \- com.squareup.okio:okio:jar:2.8.0:compile
[INFO] +- org.jetbrains.kotlin:kotlin-stdlib:jar:1.6.0:compile
[INFO] | \- org.jetbrains:annotations:jar:13.0:compile
[INFO] +- com.google.protobuf:protobuf-java:jar:3.19.6:compile
[INFO] +- com.google.protobuf:protobuf-java-util:jar:3.19.6:compile
[INFO] | +- com.google.errorprone:error_prone_annotations:jar:2.5.1:compile
[INFO] | +- com.google.j2objc:j2objc-annotations:jar:1.3:compile
[INFO] | +- com.google.code.findbugs:jsr305:jar:3.0.2:compile
[INFO] | \- com.google.code.gson:gson:jar:2.8.6:compile
[INFO] +- com.google.api.grpc:proto-google-common-protos:jar:2.22.1:compile
[INFO] +- io.confluent:kafka-schema-registry-client:jar:6.2.12:compile
[INFO] | +- org.yaml:snakeyaml:jar:2.0:compile
[INFO] | +- org.apache.kafka:kafka-clients:jar:6.2.12-ccs:compile
[INFO] | | +- com.github.luben:zstd-jni:jar:1.4.9-1:compile
[INFO] | | +- org.lz4:lz4-java:jar:1.7.1:compile
[INFO] | | \- org.xerial.snappy:snappy-java:jar:1.1.10.1:compile
[INFO] | +- org.apache.avro:avro:jar:1.10.1:compile
[INFO] | | \- com.fasterxml.jackson.core:jackson-core:jar:2.11.3:compile
[INFO] | +- org.apache.commons:commons-compress:jar:1.21:compile
[INFO] | +- com.fasterxml.jackson.core:jackson-databind:jar:2.14.2:compile
[INFO] | | \- com.fasterxml.jackson.core:jackson-annotations:jar:2.14.2:compile
[INFO] | +- io.swagger:swagger-annotations:jar:1.6.2:compile
[INFO] | \- io.swagger:swagger-core:jar:1.6.2:compile
[INFO] | +- org.apache.commons:commons-lang3:jar:3.2.1:compile
[INFO] | +- com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:jar:2.11.1:compile
[INFO] | \- io.swagger:swagger-models:jar:1.6.2:compile
[INFO] +- io.confluent:kafka-protobuf-types:jar:6.2.12:compile
[INFO] \- io.confluent:common-utils:jar:6.2.12:compile
[INFO] \- org.slf4j:slf4j-api:jar:1.7.36:compileJRob
10/08/2025, 8:00 PMnew ProtobufSchemaProvider()
Then I use the following command to download dependencies:
java -classpath "/druid/lib/*" org.apache.druid.cli.Main tools pull-deps -r "https://packages.confluent.io/maven/" -c io.confluent:kafka-protobuf-provider:6.2.12
Then I run my test via:
java Test -cp "extensions/kafka-protobuf-provider/*"
And get output:
Exception in thread "main" java.lang.NoClassDefFoundError: io/confluent/kafka/schemaregistry/protobuf/ProtobufSchemaProvider
at Test.main(Test.java:8)
Caused by: java.lang.ClassNotFoundException: io.confluent.kafka.schemaregistry.protobuf.ProtobufSchemaProvider
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:525)
... 1 more
So I think the version of kafka-protobuf-provider that druid-protobuf-extensions-33.0.0.jar uses has dependency conflicts. Since the extension doesn't include a working kafka-protobuf-provider jar without conflicts there's simply no way to use the Schema Registry with protobuf in Druid today.
Can anyone help with this dependency hell?JRob
10/08/2025, 8:34 PMdruid-avro-extensionsJRob
10/08/2025, 8:50 PMBen Krug
10/08/2025, 8:51 PMJRob
10/08/2025, 8:52 PMBen Krug
10/08/2025, 8:54 PMJRob
10/08/2025, 8:55 PMdruid-avro-extensions because I noticed that it includes kafka-schema-registry-client-6.2.12.jarJRob
10/08/2025, 8:55 PMJRob
10/08/2025, 8:56 PMdruid-protobuf-extensions includes its dependencies. Else I could run into issues at the next Druid upgrade.JRob
10/08/2025, 9:01 PMextensions-core/protobuf-extensions under the distribution root directory."
However, the correct directory is: extensions/druid-protobuf-extensions