Closed zakkak closed 3 years ago
For reference, instead of building Graal VM master from source, one could also use 21.1 dev builds from: https://github.com/graalvm/graalvm-ce-dev-builds/releases in order to reproduce those failures.
PR for solving the runtime-init problem for modules using http-client (includes integration-test/main
): https://github.com/quarkusio/quarkus/pull/15856
PR for integration-tests/redis-client
: https://github.com/quarkusio/quarkus/pull/15864
PR for integration-tests/reactive-messaging-kafka
: https://github.com/quarkusio/quarkus/pull/15879
I've created #15889 to track the quarkus-integration-test-bouncycastle-fips
failures. It needs some consideration and agreement on the solution.
Elytron Security LDAP is actually a Graal issue: https://github.com/oracle/graal/issues/3297
PR for integration-tests/amazon-services
: https://github.com/quarkusio/quarkus/pull/15897
PR for integration-tests/artemis-core
and integration-tests/artemis-jms
: https://github.com/quarkusio/quarkus/pull/15952
At this point most of the Random/SplittableRandom related failures should be fixed. I haven't done a full run, but it would be good to get one done with quarkus master to see what's still left. @zakkak could you help with that?
@zakkak could you help with that?
Sure, I started https://github.com/zakkak/graalvm-quarkus-ci/actions/runs/681073992 to test latest Quarkus with latest GraalVM.
@zakkak Thanks. In the spirit of teach a man to fish, what would be the steps to do this myself? Anyway, most issues are now #15962 which is unfortunate since we still have lots of noise :(
@zakkak Thanks. In the spirit of teach a man to fish, what would be the steps to do this myself?
In that case I just copied the GH workflow from oracle/graal to a new repo (zakkak/graalvm-quarkus-ci) and slightly edited it to use the latest dev branch of both graalvm and quarkus (the original workflow is using the latest release of quarkus with the latest dev branch of graalvm).
I also made it possible to trigger the workflow on demand with different combinations of versions and repos as well. It would be nice to have the option to use forked repos as well to try out PRs as well.
I probably need to give you (and anyone interested in running this kind of tests) some access rights to the repo.
Anyway, most issues are now #15962 which is unfortunate since we still have lots of noise :(
True, #15962 seems to be something new though , so I'll try to schedule a run with an older version to see how far we have gone with the Random/SplittableRandom related failures. I started a new workflow to test @geoand 's fix for #15962 with latest graalvm: https://github.com/zakkak/graalvm-quarkus-ci/actions/runs/683208450
@zakkak Thanks for the info!
Job for latest Quarkus vs latest Graal now that #15962 is fixed: https://github.com/zakkak/graalvm-quarkus-ci/actions/runs/683707199
👍🏼
Job for latest Quarkus vs latest Graal now that #15962 is fixed: https://github.com/zakkak/graalvm-quarkus-ci/actions/runs/683707199
Now that looks a lot better already! Thank you.
I list below the ITs that are still failing (based on https://github.com/zakkak/graalvm-quarkus-ci/actions/runs/683707199)
Bouncy Castle JSEE Compiles but fails with:
java.lang.NoSuchMethodException: org.bouncycastle.jcajce.provider.drbg.DRBG$Default.<init>(java.security.SecureRandomParameters)
Kafka with Snappy Compiles but fails with:
ERROR: Failed to start application (with profile prod)
org.xerial.snappy.SnappyError: [FAILED_TO_LOAD_NATIVE_LIBRARY] no native library is found for os.name=Linux and os.arch=x86_64
at io.quarkus.kafka.client.runtime.KafkaRecorder.loadSnappy(KafkaRecorder.java:39)
at io.quarkus.deployment.steps.KafkaProcessor$loadSnappyIfEnabled1534179476.deploy_0(KafkaProcessor$loadSnappyIfEnabled1534179476.zig:67)
at io.quarkus.deployment.steps.KafkaProcessor$loadSnappyIfEnabled1534179476.deploy(KafkaProcessor$loadSnappyIfEnabled1534179476.zig:40)
at io.quarkus.runner.ApplicationImpl.doStart(ApplicationImpl.zig:400)
at io.quarkus.runtime.Application.start(Application.java:90)
at io.quarkus.runtime.ApplicationLifecycleManager.run(ApplicationLifecycleManager.java:100)
at io.quarkus.runtime.Quarkus.run(Quarkus.java:66)
at io.quarkus.runtime.Quarkus.run(Quarkus.java:42)
at io.quarkus.runtime.Quarkus.run(Quarkus.java:119)
at io.quarkus.runner.GeneratedMain.main(GeneratedMain.zig:29)
PR for gRPC* tests https://github.com/quarkusio/quarkus/pull/16008
@zakkak
I'll look into Spring Data JPA
2. JGit seems a bytecode parsing problem (not j.u.Random related). Probably a graal issue.
Hmm I just saw that as well, but it seems non-deterministic... I'll see if I can get a reproducer. In the meantime https://github.com/quarkusio/quarkus/pull/16017 fixes the Random related issue for it.
@zakkak @jerboaa I just wanted to thank you both for this work!
@jerboaa I'm surprised Spring Data JPA is an issue. We're supposed to only use a subset of Spring Data JPA APIs and no implementations.
What is the issue with Spring Data JPA?
@gsmet @geoand https://github.com/quarkusio/quarkus/issues/16018 is the Spring Data JPA issue.
2. JGit seems a bytecode parsing problem (not j.u.Random related). Probably a graal issue.
Hmm I just saw that as well, but it seems non-deterministic... I'll see if I can get a reproducer.
Indeed seems to be non-deterministic :( Thanks for fixing the j.u.Random issues.
Latest test run with graal master and quarkus master here: https://github.com/zakkak/graalvm-quarkus-ci/actions/runs/687103625
2. JGit seems a bytecode parsing problem (not j.u.Random related). Probably a graal issue.
Hmm I just saw that as well, but it seems non-deterministic... I'll see if I can get a reproducer.
Indeed seems to be non-deterministic :( Thanks for fixing the j.u.Random issues.
I've created this issue to track it: https://github.com/graalvm/mandrel/issues/226
I believe we've covered all the bases for Random/SplittableRandom now and this umbrella issue can be closed. What remains are other issues (or non-quarkus issues):
Thanks for your work!
Thank you @jerboaa!
I'm getting this error when converting one of my applications to Quarkus to build a native-image using GraalVM 21.1.0. From this thread I can't really tell what I need to do to get around it.
I'm building my quarkus project with Quarkus 1.13.4.Final
@akuzni2 I might be wrong but I think 21.1 is only supported in Quarkus 2.x onwards...
@akuzni2 I might be wrong but I think 21.1 is only supported in Quarkus 2.x onwards...
That's correct,
Quarkus version | Compatible GraalVM/Mandrel version |
---|---|
1.12.x | 21.0.x.x |
1.13.x | 20.3.x.x 21.0.x.x |
2.0.x | 20.3.x.x 21.1.x.x |
hello,
I have same issue on cxf extension. https://github.com/quarkiverse/quarkus-cxf/pull/253 it failed with exception. Can you help with that because I am not sure. Do I need to switch to runtime initialization for some class : org.apache.cxf.endpoint.ClientImpl
Error: com.oracle.graal.pointsto.constraints.UnsupportedFeatureException: Detected an instance of Random/SplittableRandom class in the image heap. Instances created during image generation have cached seed values and don't behave as expected. To see how this object got instantiated use --trace-object-instantiation=java.util.Random. The object was probably created by a class initializer and is reachable from a static field. You can request class initialization at image runtime by using the option --initialize-at-run-time=. Or you can write your own initialization methods and call them explicitly from your main entry point.
Detailed message:
Trace:
at parsing org.apache.cxf.attachment.AttachmentUtil.getUniqueBoundaryValue(AttachmentUtil.java:255)
Call path from entry point to org.apache.cxf.attachment.AttachmentUtil.getUniqueBoundaryValue():
at org.apache.cxf.attachment.AttachmentUtil.getUniqueBoundaryValue(AttachmentUtil.java:255)
at org.apache.cxf.attachment.AttachmentSerializer.writeProlog(AttachmentSerializer.java:82)
at org.apache.cxf.interceptor.AttachmentOutInterceptor.handleMessage(AttachmentOutInterceptor.java:91)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)
at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:831)
at org.apache.cxf.endpoint.ClientImpl$3$1.run(ClientImpl.java:923)
at java.lang.Thread.run(Thread.java:829)
at com.oracle.svm.core.thread.JavaThreads.threadStartRoutine(JavaThreads.java:553)
at com.oracle.svm.core.posix.thread.PosixJavaThreads.pthreadStartRoutine(PosixJavaThreads.java:192)
at com.oracle.svm.core.code.IsolateEnterStub.PosixJavaThreads_pthreadStartRoutine_e1f4a8c0039f8337338252cd8734f63a79b5e3df(generated:0)
com.oracle.svm.core.util.UserError$UserException: com.oracle.graal.pointsto.constraints.UnsupportedFeatureException: Detected an instance of Random/SplittableRandom class in the image heap. Instances created during image generation have cached seed values and don't behave as expected. To see how this object got instantiated use --trace-object-instantiation=java.util.Random. The object was probably created by a class initializer and is reachable from a static field. You can request class initialization at image runtime by using the option --initialize-at-run-time=. Or you can write your own initialization methods and call them explicitly from your main entry point.
Detailed message:
Trace:
at parsing org.apache.cxf.attachment.AttachmentUtil.getUniqueBoundaryValue(AttachmentUtil.java:255)
Call path from entry point to org.apache.cxf.attachment.AttachmentUtil.getUniqueBoundaryValue():
at org.apache.cxf.attachment.AttachmentUtil.getUniqueBoundaryValue(AttachmentUtil.java:255)
at org.apache.cxf.attachment.AttachmentSerializer.writeProlog(AttachmentSerializer.java:82)
at org.apache.cxf.interceptor.AttachmentOutInterceptor.handleMessage(AttachmentOutInterceptor.java:91)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)
at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:831)
at org.apache.cxf.endpoint.ClientImpl$3$1.run(ClientImpl.java:923)
at java.lang.Thread.run(Thread.java:829)
at com.oracle.svm.core.thread.JavaThreads.threadStartRoutine(JavaThreads.java:553)
at com.oracle.svm.core.posix.thread.PosixJavaThreads.pthreadStartRoutine(PosixJavaThreads.java:192)
at com.oracle.svm.core.code.IsolateEnterStub.PosixJavaThreads_pthreadStartRoutine_e1f4a8c0039f8337338252cd8734f63a79b5e3df(generated:0)
at com.oracle.svm.core.util.UserError.abort(UserError.java:82)
at com.oracle.svm.hosted.FallbackFeature.reportAsFallback(FallbackFeature.java:233)
at com.oracle.svm.hosted.NativeImageGenerator.runPointsToAnalysis(NativeImageGenerator.java:798)
at com.oracle.svm.hosted.NativeImageGenerator.doRun(NativeImageGenerator.java:582)
at com.oracle.svm.hosted.NativeImageGenerator.lambda$run$2(NativeImageGenerator.java:495)
at java.base/java.util.concurrent.ForkJoinTask$AdaptedRunnableAction.exec(ForkJoinTask.java:1407)
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)
Caused by: com.oracle.graal.pointsto.constraints.UnsupportedFeatureException: com.oracle.graal.pointsto.constraints.UnsupportedFeatureException: Detected an instance of Random/SplittableRandom class in the image heap. Instances created during image generation have cached seed values and don't behave as expected. To see how this object got instantiated use --trace-object-instantiation=java.util.Random. The object was probably created by a class initializer and is reachable from a static field. You can request class initialization at image runtime by using the option --initialize-at-run-time=. Or you can write your own initialization methods and call them explicitly from your main entry point.
Detailed message:
Trace:
at parsing org.apache.cxf.attachment.AttachmentUtil.getUniqueBoundaryValue(AttachmentUtil.java:255)
Call path from entry point to org.apache.cxf.attachment.AttachmentUtil.getUniqueBoundaryValue():
at org.apache.cxf.attachment.AttachmentUtil.getUniqueBoundaryValue(AttachmentUtil.java:255)
at org.apache.cxf.attachment.AttachmentSerializer.writeProlog(AttachmentSerializer.java:82)
at org.apache.cxf.interceptor.AttachmentOutInterceptor.handleMessage(AttachmentOutInterceptor.java:91)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)
at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:831)
at org.apache.cxf.endpoint.ClientImpl$3$1.run(ClientImpl.java:923)
at java.lang.Thread.run(Thread.java:829)
at com.oracle.svm.core.thread.JavaThreads.threadStartRoutine(JavaThreads.java:553)
at com.oracle.svm.core.posix.thread.PosixJavaThreads.pthreadStartRoutine(PosixJavaThreads.java:192)
at com.oracle.svm.core.code.IsolateEnterStub.PosixJavaThreads_pthreadStartRoutine_e1f4a8c0039f8337338252cd8734f63a79b5e3df(generated:0)
at com.oracle.graal.pointsto.constraints.UnsupportedFeatures.report(UnsupportedFeatures.java:126)
at com.oracle.svm.hosted.NativeImageGenerator.runPointsToAnalysis(NativeImageGenerator.java:795)
... 8 more
Caused by: com.oracle.graal.pointsto.constraints.UnsupportedFeatureException: Detected an instance of Random/SplittableRandom class in the image heap. Instances created during image generation have cached seed values and don't behave as expected. To see how this object got instantiated use --trace-object-instantiation=java.util.Random. The object was probably created by a class initializer and is reachable from a static field. You can request class initialization at image runtime by using the option --initialize-at-run-time=. Or you can write your own initialization methods and call them explicitly from your main entry point.
at com.oracle.svm.hosted.image.DisallowedImageHeapObjectFeature.error(DisallowedImageHeapObjectFeature.java:163)
at com.oracle.svm.core.image.DisallowedImageHeapObjects.check(DisallowedImageHeapObjects.java:65)
at com.oracle.svm.hosted.image.DisallowedImageHeapObjectFeature.replacer(DisallowedImageHeapObjectFeature.java:139)
at com.oracle.graal.pointsto.meta.AnalysisUniverse.replaceObject(AnalysisUniverse.java:565)
at com.oracle.svm.hosted.ameta.AnalysisConstantReflectionProvider.replaceObject(AnalysisConstantReflectionProvider.java:213)
at com.oracle.svm.hosted.ameta.AnalysisConstantReflectionProvider.interceptValue(AnalysisConstantReflectionProvider.java:184)
at com.oracle.svm.hosted.ameta.AnalysisConstantReflectionProvider.readValue(AnalysisConstantReflectionProvider.java:98)
at com.oracle.svm.hosted.ameta.AnalysisConstantReflectionProvider.readFieldValue(AnalysisConstantReflectionProvider.java:77)
at jdk.internal.vm.compiler/org.graalvm.compiler.nodes.util.ConstantFoldUtil$1.readValue(ConstantFoldUtil.java:51)
at jdk.internal.vm.compiler/org.graalvm.compiler.core.common.spi.JavaConstantFieldProvider.readConstantField(JavaConstantFieldProvider.java:84)
at com.oracle.svm.hosted.ameta.AnalysisConstantFieldProvider.readConstantField(AnalysisConstantFieldProvider.java:70)
at jdk.internal.vm.compiler/org.graalvm.compiler.nodes.util.ConstantFoldUtil.tryConstantFold(ConstantFoldUtil.java:47)
at com.oracle.svm.hosted.phases.ConstantFoldLoadFieldPlugin.tryConstantFold(ConstantFoldLoadFieldPlugin.java:61)
at com.oracle.svm.hosted.phases.ConstantFoldLoadFieldPlugin.handleLoadStaticField(ConstantFoldLoadFieldPlugin.java:57)
at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.genGetStatic(BytecodeParser.java:4972)
at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.genGetStatic(BytecodeParser.java:4939)
at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.processBytecode(BytecodeParser.java:5442)
at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.iterateBytecodesForBlock(BytecodeParser.java:3451)
at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.processBlock(BytecodeParser.java:3258)
at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.build(BytecodeParser.java:1125)
at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.buildRootMethod(BytecodeParser.java:1019)
at jdk.internal.vm.compiler/org.graalvm.compiler.java.GraphBuilderPhase$Instance.run(GraphBuilderPhase.java:84)
at com.oracle.svm.hosted.phases.SharedGraphBuilderPhase.run(SharedGraphBuilderPhase.java:76)
at jdk.internal.vm.compiler/org.graalvm.compiler.phases.Phase.run(Phase.java:49)
at jdk.internal.vm.compiler/org.graalvm.compiler.phases.BasePhase.apply(BasePhase.java:212)
at jdk.internal.vm.compiler/org.graalvm.compiler.phases.Phase.apply(Phase.java:42)
at jdk.internal.vm.compiler/org.graalvm.compiler.phases.Phase.apply(Phase.java:38)
at com.oracle.graal.pointsto.flow.AnalysisParsedGraph.parseBytecode(AnalysisParsedGraph.java:113)
at com.oracle.svm.hosted.SVMHost.parseBytecode(SVMHost.java:647)
at com.oracle.graal.pointsto.meta.AnalysisMethod.ensureGraphParsed(AnalysisMethod.java:592)
at com.oracle.graal.pointsto.flow.MethodTypeFlowBuilder.parse(MethodTypeFlowBuilder.java:163)
at com.oracle.graal.pointsto.flow.MethodTypeFlowBuilder.apply(MethodTypeFlowBuilder.java:304)
at com.oracle.graal.pointsto.flow.MethodTypeFlow.createTypeFlow(MethodTypeFlow.java:313)
at com.oracle.graal.pointsto.flow.MethodTypeFlow.ensureTypeFlowCreated(MethodTypeFlow.java:302)
at com.oracle.graal.pointsto.flow.MethodTypeFlow.addContext(MethodTypeFlow.java:103)
at com.oracle.graal.pointsto.flow.StaticInvokeTypeFlow.update(InvokeTypeFlow.java:420)
at com.oracle.graal.pointsto.BigBang$2.run(BigBang.java:547)
at com.oracle.graal.pointsto.util.CompletionExecutor.lambda$execute$0(CompletionExecutor.java:173)
at java.base/java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1426)
Hi @dufoli, my understanding is that https://github.com/quarkiverse/quarkus-cxf/commit/8804ddad2bee27311d63f33d2ec6d2befde2dc8f fixed the above issue, is that right?
@zakkak yes
HI @zakkak @dufoli thanks for commenting back. I've upgraded to Quarkus 2.0.0 and I still see the same issue cause by some AWS dependencies.
Error: Detected an instance of Random/SplittableRandom class in the image heap. Instances created during image generation have cached seed values and don't behave as expected. To see how this object got instantiated use --trace-object-instantiation=java.util.Random. The object was probably created by a class initializer and is reachable from a static field. You can request class initialization at image runtime by using the option --initialize-at-run-time=<class-name>. Or you can write your own initialization methods and call them explicitly from your main entry point.
Trace: Object was reached by
reading field com.amazonaws.retry.PredefinedBackoffStrategies$EqualJitterBackoffStrategy.random of
constant com.amazonaws.retry.PredefinedBackoffStrategies$EqualJitterBackoffStrategy@546fe072 reached by
reading field com.amazonaws.retry.PredefinedBackoffStrategies$SDKDefaultBackoffStrategy.equalJitterBackoffStrategy of
constant com.amazonaws.retry.PredefinedBackoffStrategies$SDKDefaultBackoffStrategy@4d11ec9e reached by
reading field com.amazonaws.retry.RetryPolicy.backoffStrategy of
constant com.amazonaws.retry.RetryPolicy@28b37dae reached by
scanning method com.amazonaws.ClientConfiguration.<init>(ClientConfiguration.java:155)
Call path from entry point to com.amazonaws.ClientConfiguration.<init>(ClientConfiguration):
at com.amazonaws.ClientConfiguration.<init>(ClientConfiguration.java:378)
at com.amazonaws.client.builder.AwsClientBuilder.resolveClientConfiguration(AwsClientBuilder.java:169)
at com.amazonaws.client.builder.AwsClientBuilder.access$000(AwsClientBuilder.java:54)
at com.amazonaws.client.builder.AwsClientBuilder$SyncBuilderParams.<init>(AwsClientBuilder.java:505)
at com.amazonaws.client.builder.AwsClientBuilder.getSyncClientParams(AwsClientBuilder.java:441)
at com.amazonaws.client.builder.AwsSyncClientBuilder.build(AwsSyncClientBuilder.java:46)
at com.mycompany.service.ApiServiceImpl.<init>(ApiServiceImpl.java:23)
at com.mycompany.service.ProcessingService.<init>(ProcessingService.java:22)
at com.mycompany.service.ProcessingService_Bean.create(ProcessingService_Bean.zig:140)
at com.mycompany.service.ProcessingService_Bean.create(ProcessingService_Bean.zig:155)
at io.quarkus.arc.impl.AbstractSharedContext.createInstanceHandle(AbstractSharedContext.java:96)
at io.quarkus.arc.impl.AbstractSharedContext$1.get(AbstractSharedContext.java:29)
at io.quarkus.arc.impl.AbstractSharedContext$1.get(AbstractSharedContext.java:26)
at com.oracle.svm.core.jdk.SystemPropertiesSupport.initializeLazyValue(SystemPropertiesSupport.java:216)
at com.oracle.svm.core.jdk.SystemPropertiesSupport.getProperty(SystemPropertiesSupport.java:169)
at com.oracle.svm.core.jdk.Target_java_lang_System.getProperty(JavaLangSubstitutions.java:291)
at com.oracle.svm.jni.JNIJavaCallWrappers.jniInvoke_VA_LIST:Ljava_lang_System_2_0002egetProperty_00028Ljava_lang_String_2_00029Ljava_lang_String_2(generated:0)
I'm not really sure how to perform the recommendation by the error message
Or you can write your own initialization methods and call them explicitly from your main entry point.
If you have any ideas please let me know.
@akuzni2 what aws extension are you using ? do you add the corresponding quarkus extension ? s3, lambda, SNS, SQS, ... ?
@dufoli I am getting exactly the same issue as @akuzni2 is getting when I try to invoke another lamba using
@Produces
@ApplicationScoped
public AWSLambda awsLambda() {
return AWSLambdaAsyncClient.builder().build();
}
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-lambda</artifactId>
<version>1.12.15</version>
</dependency>
I have the same problem as @wsy89 and @akuzni2 with an AWS SDK library.
Error: Detected an instance of Random/SplittableRandom class in the image heap. Instances created during image generation have cached seed values and don't behave as expected. To see how this object got instantiated use --trace-object-instantiation=java.util.Random. The object was probably created by a class initializer and is reachable from a static field. You can request class initialization at image runtime by using the option --initialize-at-run-time=
Adding this to maven does not help:
@EdwinKorsten @akuzni2 I was able to fix this by adding
--initialize-at-run-time=org.apache.http.impl.auth.NTLMEngineImpl
in additional build arg. Also I had to use aws sdk v2 instead of v1
@gsmet I am running also into the issue with org.apache.http.impl.auth.NTLMEngineImpl using aws s3 extension and apache client. Can we get a fix for that?
@antonwiens Are you also using the HTTP client extension as a dependency as described here?
@jerboaa No, i didn't. I pulled up the versions and didn`t know i had to add this, thats a nice hint, thanks and sorry for pulling this issue up again.
Maybe a build error from the quarkus plugin would be nice, if the apache client dependency was added and the quarkus-apache-client extension was missing. Just as a hint for ppl upgrading or not reading the documentation properly :)
I've been getting the same Random/SplittableRandom
error. I'm currently following the Quarkus Lambda guide (https://quarkus.io/guides/amazon-lambda) using the Quarkus 2.7.3.Final with GraalVM 21.3.1. I'm using the DynamoDB client from Java SDK v2.
Update: managed to get it to work by following the sample code found here: https://github.com/quarkusio/quarkus-quickstarts/blob/main/amazon-dynamodb-quickstart/pom.xml. Specifically by the use of the quarkus-amazon-dynamodb
dependency instead of including the AWS SDK directly. I don't see this mentioned in any of the guides. Working now and man is the Lambda function fast! Great work.
@jmgtan Maybe you could improve the amazon-lambda guide? OSS FTW
@jmgtan I've also started hitting the Random/SplittableRandom error with the latest AWS SDK. It is possible to workaround it by using --initialize-at-run-time=software.amazon.awssdk.utils.cache.CachedSupplier.
see https://github.com/aws/aws-sdk-java-v2/issues/3323
@MarkusKramer I created https://github.com/quarkiverse/quarkus-amazon-services/pull/220 to fix the issue in our extension.
Describe the bug Quarkus TS fail with latest Graal (see https://github.com/oracle/graal/actions/runs/546718036)
In the upcoming release of GraalVM (21.1) instances of Random/SplittableRandom class won't be allowed in the native image heap. The corresponding patch can be seen here.
As a result, moving forward Quarkus needs to ensure that its core and extensions reinitialize any classes holding instances of Random/SplittableRandom class.
In order to find out which classes to reinitialize one needs to run:
This will print out something like this:
Which indicates that Quarkus should reinitialize
NTLMEngineImpl
at runtime.Expected behavior Tests should pass (at least most of them)
Actual behavior Multiple integration tests fail.
To Reproduce
mx --primary-suite-path substratevm --components='Native Image' build
export GRAALVM_HOME=/path/to/graal/sdk/latest_graalvm_home
./mvnw clean verify -Dnative -Dnative.surefire.skip -pl integration-tests/main
Environment (please complete the following information):
uname -a
orver
: Linux 5.10.10-200.fc33.x86_64java -version
: 11.0.9+10-jvmci-21.0-b03master
ca436f5a8d260027da4218761ee1b83a4d0b4a0fmaster
dac8d8b4df5f09060057cacba96ce65826b147d0mvnw --version
orgradlew --version
): Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)