Fork me on GitHub
#holy-lambda
<
2022-04-18
>
willier02:04:54

Hi, I am new to holy-lambda/graalvm and got a basic hello-world native lambda working. Now I have added aws-api with dynamodb to it and during the bb hl:native:executable phase, I get the following error:

Error: Classes that should be initialized at run time got initialized during image building:
 jdk.xml.internal.SecuritySupport was unintentionally initialized at build time. To see why jdk.xml.internal.SecuritySupport got initialized use --trace-class-initialization=jdk.xml.internal.SecuritySupport

Karol Wójcik07:04:50

Just add this class to —initialize-at-build-time. For GraalVM issues it’s easier to get help on #graalvm channel.

Karol Wójcik08:04:06

The rule of thumb is whenever you see this error just add the class listen in the error to —initialize-at-build-time. See: https://github.com/FieryCod/holy-lambda/tree/master/examples/bb/native/cognitect.aws.api bb.edn file :native-image-args.

❤️ 1
willier09:04:34

Awesome, that works! I was flipping between that document and this https://fierycod.github.io/holy-lambda/#/native-backend and missed overlooked step #7

👍 1
willier09:04:41

Also, I must say the whole process is very smooth so kudos for that!