-
Notifications
You must be signed in to change notification settings - Fork 3k
Closed
Labels
Milestone
Description
Describe the bug
1.12.1.Final
and 1.12.2.Final
failed to build native package with io.quarkus:quarkus-amazon-lambda-xray
dependency.
Actual behavior
I got this error while building native package
Error: No instances of sun.security.provider.NativePRNG are allowed in the image heap as this class should be initialized at image runtime. To see how this object got instantiated use --trace-object-instantiation=sun.security.provider.NativePRNG.
Detailed message:
Trace: Object was reached by
reading field java.security.SecureRandom.secureRandomSpi of
constant java.security.SecureRandom@511394c6 reached by
scanning method com.amazonaws.xray.ThreadLocalStorage.getRandom(ThreadLocalStorage.java:64)
Call path from entry point to com.amazonaws.xray.ThreadLocalStorage.getRandom():
at com.amazonaws.xray.ThreadLocalStorage.getRandom(ThreadLocalStorage.java:64)
at com.amazonaws.xray.internal.SecureIdGenerator.newTraceId(SecureIdGenerator.java:38)
at com.amazonaws.xray.entities.TraceID.<init>(TraceID.java:123)
at com.oracle.svm.reflect.TraceID_constructor_2bbc23dee901af749a2b73bb6c92ad7e96d74f97_766.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Constructor.java:490)
at java.util.ServiceLoader$ProviderImpl.newInstance(ServiceLoader.java:780)
at java.util.ServiceLoader$ProviderImpl.get(ServiceLoader.java:722)
at com.oracle.svm.core.jdk.SystemPropertiesSupport.initializeLazyValue(SystemPropertiesSupport.java:211)
at com.oracle.svm.core.jdk.SystemPropertiesSupport.setProperty(SystemPropertiesSupport.java:196)
at com.oracle.svm.core.jdk.Target_java_lang_System.setProperty(JavaLangSubstitutions.java:287)
at com.oracle.svm.jni.JNIJavaCallWrappers.jniInvoke_ARRAY:Ljava_lang_System_2_0002esetProperty_00028Ljava_lang_String_2Ljava_lang_String_2_00029Ljava_lang_String_2(generated:0)
To Reproduce
I'm building native package for AWS lambda, and it seems that the upgraded version of the Xray dependency in 1.12.1.Final
causes this problem. I still can build the package if I remove io.quarkus:quarkus-amazon-lambda-xray
from the dependency list.
Environment (please complete the following information):
Output of uname -a
or ver
Darwin local 19.6.0 Darwin Kernel Version 19.6.0: Thu Oct 29 22:56:45 PDT 2020; root:xnu-6153.141.2.2~1/RELEASE_X86_64 x86_64
Output of java -version
openjdk version "11.0.10" 2021-01-19
OpenJDK Runtime Environment (build 11.0.10+9)
OpenJDK 64-Bit Server VM (build 11.0.10+9, mixed mode)
GraalVM version (if different from Java)
quay.io/quarkus/ubi-quarkus-native-image:21.0.0-java11
Quarkus version or git rev
1.12.2.Final
Build tool (ie. output of mvnw --version
or gradlew --version
)
------------------------------------------------------------
Gradle 6.8.3
------------------------------------------------------------
Build time: 2021-02-22 16:13:28 UTC
Revision: 9e26b4a9ebb910eaa1b8da8ff8575e514bc61c78
Kotlin: 1.4.20
Groovy: 2.5.12
Ant: Apache Ant(TM) version 1.10.9 compiled on September 27 2020
JVM: 11.0.10 (Oracle Corporation 11.0.10+9)
OS: Mac OS X 10.15.7 x86_64