Skip to content

protobuf code generated w/ 3.22.0 broken w/ Quarkus #31240

Closed

Description

Describe the bug

Code that is generated with the new protobuf release 3.22.0 does not work in Quarkus.

The exception looks somewhat like this:

Caused by: java.lang.IllegalAccessError: class <some-generated-protobuf-code> tried to access method 'com.google.protobuf.LazyStringArrayList com.google.protobuf.LazyStringArrayList.emptyList()' (<some-generated-protobuf-code> is in unnamed module of loader io.quarkus.bootstrap.classloading.QuarkusClassLoader @4f5c30b1; com.google.protobuf.LazyStringArrayList is in unnamed module of loader io.quarkus.bootstrap.classloading.QuarkusClassLoader @6d4a65c6)

protobuf code generated w/ versions < 3.22.0 referenced the public static field com.google.protobuf.LazyStringArrayList#EMPTY, the static method emptyList() is package-protected before 3.22.0.

In 3.22.0 emptyList() became public static and code generated w/ 3.22.0 references that method.

However, the Quarkus bom enforces protobuf-java to 3.21.9, so code generated w/ 3.22.0 won't be able to access the package-protected method emptyList().

I suspect, a bump of protobuf to 3.22.0 in Quarkus (at least on main) should help here.

protobuf release notes

Expected behavior

No response

Actual behavior

No response

How to Reproduce?

No response

Output of uname -a or ver

No response

Output of java -version

No response

GraalVM version (if different from Java)

No response

Quarkus version or git rev

No response

Build tool (ie. output of mvnw --version or gradlew --version)

No response

Additional information

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions