confluentinc / schema-registry

Confluent Schema Registry for Kafka
https://docs.confluent.io/current/schema-registry/docs/index.html
Other
2.19k stars 1.11k forks source link

Same java package in two modules for Avro #2349

Open daltrogama opened 2 years ago

daltrogama commented 2 years ago

JVM's module system, since Java 9, doesn't allow more than one JAR module with the same package. At least when using the module system instead of compatibility mode (module path instead of the classpath).

See: https://jlbp.dev/JLBP-19

I must do some workaround to use those modules with a dependency relationship:

https://github.com/confluentinc/schema-registry/tree/master/avro-serializer/src/main/java/io/confluent/kafka/serializers https://github.com/confluentinc/schema-registry/tree/master/schema-serializer/src/main/java/io/confluent/kafka/serializers

When using the module system, I always get a ClassNotDef/ClassNotFound on some classes due to package name ambiguity, and I don't want to leave the module system only because of this single dependency.

Is there some already defined workaround for this issue?

[]'s

lauroschuck commented 1 year ago

Can we get some attention here, please?

These libs are the only ones preventing me from migrating my code into Java modules.

thoalm commented 1 year ago

I am also running in to this issue. Would be great if this got some more attention.

credmond commented 4 months ago

Yep. Please fix it, Confluent, you're way behind the rest of the world here.

It's bad design with a simple fix.