Closed
Description
openedon Feb 17, 2023
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.
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