quarkus
quarkus copied to clipboard
Warning: RecomputeFieldValue.FieldOffset automatic substitution failed.
Describe the bug
Warning: RecomputeFieldValue.FieldOffset automatic substitution failed. The automatic substitution registration was attempted because a call to sun.misc.Unsafe.objectFieldOffset(Field) was detected in the static initializer of org.apache.kafka.shaded.com.google.protobuf.UnsafeUtil. Detailed failure reason(s): The argument of sun.misc.Unsafe.objectFieldOffset(java.lang.reflect.Field) is not a constant value or a field load that can be constant-folded., Could not determine the field where the value produced by the call to sun.misc.Unsafe.objectFieldOffset(Field) for the field offset computation is stored. The call is not directly followed by a field store or by a sign extend node followed directly by a field store.
Expected behavior
no warnings
Actual behavior
warning while building native
How to Reproduce?
No response
Output of uname -a
or ver
No response
Output of java -version
21
Quarkus version or git rev
3.9.3
Build tool (ie. output of mvnw --version
or gradlew --version
)
No response
Additional information
No response
Thanks for reporting.
Please provide more information about how to reproduce the issue and ideally a sample application that we can run in order to see the problem in action.
@geoand
java -version
openjdk version "21.0.1" 2023-10-17
OpenJDK Runtime Environment GraalVM CE 21.0.1+12.1 (build 21.0.1+12-jvmci-23.1-b19)
OpenJDK 64-Bit Server VM GraalVM CE 21.0.1+12.1 (build 21.0.1+12-jvmci-23.1-b19, mixed mode, sharing)
./mvnw clean package -Dmaven.test.skip=true -Dquarkus.native.additional-build-args=-J--enable-preview -Pnative
Build resources:
- 24.18GB of memory (75.6% of 32.00GB system memory, determined at start)
- 8 thread(s) (100.0% of 8 available processor(s), determined at start)
[2/8] Performing analysis... [19:44:32,767 WARN [org.hib.orm.deprecation] HHH90000025: DB2Dialect does not need to be specified explicitly using 'hibernate.dialect' (remove the property setting and it will be selected by default)
Warning: RecomputeFieldValue.FieldOffset automatic substitution failed. The automatic substitution registration was attempted because a call to sun.misc.Unsafe.objectFieldOffset(Field) was detected in the static initializer of org.apache.kafka.shaded.com.google.protobuf.UnsafeUtil. Detailed failure reason(s): The argument of sun.misc.Unsafe.objectFieldOffset(java.lang.reflect.Field) is not a constant value or a field load that can be constant-folded., Could not determine the field where the value produced by the call to sun.misc.Unsafe.objectFieldOffset(Field) for the field offset computation is stored. The call is not directly followed by a field store or by a sign extend node followed directly by a field store.
I have the same issue using Quarkus 3.9.4
with io.quarkus:quarkus-messaging-kafka
.
Same with Quarkus 3.10.1
cc @zakkak