Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
    abhishek manocha
    Should I set /bin/java manually?
    abhishek manocha
    --no-fallback doesnt work with the micronaut app and docker fails with exit code 1
    Alina Yurenko
    Hi everyone. Due to popular demand we’re moving GraalVM channels to a GraalVM community Slack workspace.
    It has been set up and has the same channels as here (and more). To join the workspace, use this link:
    We hope this transition wouldn’t be too much trouble and will help to make our communication easier.
    Michel Schudel
    Hi. I'm trying to build a native image on Windows using a H2 embedded driver and JPA. I followed the instructions on, so I should use @TypeHint(typeNames = { "org.h2.Driver", "org.h2.mvstore.db.MVTableEngine"})
    @TypeHint( {
    but I can only specify one typehint annotation at a time
    my native-image .properties file looks like this:
    Args = -H:IncludeResources=logback.xml|application.yml|bootstrap.yml \
    -H:Name=person-service-micronaut \
    -H:Class=person.service.micronaut.Application \
    --report-unsupported-elements-at-runtime \
    Oleg Šelajev

    @MichelSchudel can you please join slack team mentioned above. Also, can you combine these hints?

    @TypeHint(typeNames = { "org.h2.Driver", "org.h2.mvstore.db.MVTableEngine"}, value={H2Dialect.class,

    but please move to slack channel, thanks!
    Michel Schudel
    yes, I've moved a few seconds ago, thanks

    Hello to everybody.... first at all, i want to greet this initiative ...

    I am trying to create a graal native image application with micronauts in a windows environment
    (Windows 10 professional x64; GraalVM CE 19-1-1; Micronauts 1.21; Java 8 compliant; Microsoft Windows SDK 7.1 )

    It's a simple microservice which connects to a remote url and get a result ....
    (you can see the code here; and as a standalone micronaut application; works perfectly)

    I get the following warning in one of steps of native compilation...
    "Caused by: java.lang.Error: failed to initialize the default SSL context"
    That propagates as an error when i try to execute it later ....

    I know it's a known error; and i have been trying tons of configuration/suggestion that i found in internet without success ; and sincerelly i don't know how to solve o patch it

    The same question has been sent to the micronaut forum, and they have resent me to this forum...

    Can you help me?... Thanks in advance

    David M. Lloyd
    you should move the question to the slack channel (see above)
    Is there an annotation to prevent build-time initialization of classes? this would be much handier/safer than external configuration.
    or some programming idiom
    Paulo Lopes
    no, but it feels like you're missing the libsunec to link your final image. BTW everyone moved to Slack, you should consider ask there too.
    Ryan Berckmans
    Good morning. I am trying to use build a Scala 2.13.1 project with native-image. I use Akka, graal-akka-actor, and sbt-native-packager's GraalVMNativeImagePlugin. Here's my config
    graalVMNativeImageOptions ++= Seq(
    I receive this error when running the binary produced by native-image:
    Caused by: java.lang.NoSuchMethodError: java.lang.Object[][].clone()
            at scala.collection.immutable.VectorPointer.gotoPosWritable0(Vector.scala:1158)
            at scala.collection.immutable.VectorPointer.gotoPosWritable0$(Vector.scala:1134)
    Quick googling suggests I may need a new option in graalVMNativeImageOptions, but I'm not sure which one
    Ryan Berckmans
    The problem seems to be with gotoPosWritable, also seeing
    java.lang.NoSuchMethodError: java.lang.Object[].clone()
        at scala.collection.immutable.VectorPointer.gotoPosWritable0$(Vector.scala:1134
        at scala.collection.immutable.Vector.gotoPosWritable(Vector.scala:119)
    @FrancoBenner looking at your error stack trace, i suppose you're generating the native-image in windows doesn't you? ... If the response is yes; comment the following lines in the file of the graalVM JVM (; and recompile your solution ... (libsunec.lib; libsunmscapi.lib doesn't exist in windows; and the dll's doesn't work)
    Ryan Berckmans
    Here is a GitHub issue corresponding to my problem scala/bug#11634
    @FrancoBenner can you show me the parameters that you use with native-image command?... also can tell me what version of the GraalVM JDK for windows are you using?

    Hell, I am trying to build a native image for my experimental springboot application which uses annotation based GraphQL integration. When I try to build the native image I get something like :

    Error: No instances of graphql.introspection.Introspection$DirectiveLocation are allowed in the image heap as this class should be initialized at image runtime. Object has been initialized by the io.leangen.graphql.annotations.types.GraphQLDirective class initializer with a trace: 
     .  To fix the issue mark graphql.introspection.Introspection$DirectiveLocation for build-time initialization with --initialize-at-build-time=graphql.introspection.Introspection$DirectiveLocation or use the the information from the trace to find the culprit and --initialize-at-run-time=<culprit> to prevent its instantiation.
    Detailed message:
    Trace:     object graphql.introspection.Introspection$DirectiveLocation[]
        method io.leangen.graphql.metadata.strategy.query.AnnotatedDirectiveBuilder.buildClientDirective(AnnotatedType, DirectiveBuilderParams)
    Call path from entry point to io.leangen.graphql.metadata.strategy.query.AnnotatedDirectiveBuilder.buildClientDirective(AnnotatedType, DirectiveBuilderParams): 
        at io.leangen.graphql.metadata.strategy.query.AnnotatedDirectiveBuilder.buildClientDirective(
        at io.leangen.graphql.generator.OperationMapper.lambda$generateDirectives$4(
        at io.leangen.graphql.generator.OperationMapper$$Lambda$1078/249839094.apply(Unknown Source)
        at$executeWithoutResult$0_ae12fe069646a236658983eb24bddfc18868bbcc_1261.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(
        at javax.xml.transform.TransformerException.printStackTrace(
        at javax.xml.transform.TransformerException.printStackTrace(

    if i add:


    then I get something like:

    graphql.schema.GraphQLSchema$Builder was unintentionally initialized at build time. graphql.introspection.Introspection caused initialization of this class with the following trace: 
    graphql.schema.GraphQLType was unintentionally initialized at build time. graphql.introspection.Introspection caused initialization of this class with the following trace: 
        at java.util.concurrent.ForkJoinTask$AdaptedRunnableAction.exec(
        at java.util.concurrent.ForkJoinTask.doExec(
        at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(
        at java.util.concurrent.ForkJoinPool.runWorker(
    Error: Image build request failed with exit status 1

    what am I doing wrong?

    i am using the experimental spring graalvm native-image support project and the following to create my reflection and other configs needed by native-image
    java  -agentlib:native-image-agent=config-output-dir=src/main/resources/META-INF/native-image -jar target/my-spring-app-0.0.1-SNAPSHOT.jar
    I was able to create a native image of a non-trivial and rather big application. No change of the application was necessary (!) and so far no big problems: This is really great - thanks for enabling us to do this! The startup speed is much faster (<0.05s vs. 0.5s before) although this is not the main goal of this experiment.
    The goal is more to create a native library that other applications can use. Is the creation of e.g. .so libraries possible with Graal too?
    And the next step would be to cross compile to iOS and Android :) ... but I learned that this is not yet possible (?)
    Uhm, sorry for the bubble. I was just using the wrong wording to search the internet. I found that this is supported directly as option of native-image:
        --shared              build shared library
        --static              build statically linked executable (requires static libc and zlib)
    Wow. Creating the shared library was also simple. How does this work with the static library?
    Alina Yurenko
    Hey, could you please use GraalVM Community Slack instead? Many people complained about Gitter, so we are trying to focus our efforts on Slack:
    Warning: Aborting stand-alone image build due to unsupported features
    how to avoid this warning ?
    Franco Benner
    anyone getting this error on windows?
    LINK : fatal error LNK1181: cannot open input file 'stdc++.lib'
    I'm using the "Microsoft Windows 7 x64 Debug Build Environment"
    Remko Popma
    No, never seen that. You may want to move to the Slack channel (link in previous messages). This Gitter channel is abandoned.
    Franco Benner
    Daniel Fitzpatrick
    I'm excited to try compiling some clojure to run on my pi (running manjaro 64-bit). However I can't find any information on how to cross-compile to target aarch64. Can someone explain the process?
    Remko Popma
    This channel is abandoned. Everyone moved to slack. See link above.
    Francisco Gómez García
    Hi, any way I could ask over here or Slack?
    Makarenko Anton

    A language implemented with Truffle Language Implementation framework can be AOT compiled using the GraalVM Native Image. Running mvn package in the simplelanguage folder also builds a slnative executable in the native directory. This executable is the full SimpleLanguage implementation as a single native application, and has no need for a GraalVM in order to execute SimpleLanguage code.

    GraalVM native-image supports JVM-based languages, e.g., Java, Scala, Clojure, Kotlin. The resulting native image can, optionally, execute dynamic languages like JavaScript, Ruby, R, or Python, but it does not pre-compile their code itself.

    Does this information conflict with each other or does SimpleLanguage compile in the same way as Java?

    Alexander Samsig
    Join the Slack community and ask there, that is where people are active. :)
    Boris Smidt

    Dear fellow graal users,

    Is there a way to override an already overwritten method with graal.
    Since the ManagementFactory.getPlatformMBeanServer returns null,
    it would be nice if i could overwrite it so i could still use jmx api for reporting and write my own http backend to get the metrics out of the app.
    At compile time it fails since this class has already been substituded by graal itself.

    final class ManagementFactory {
        public static synchronized MBeanServer getPlatformMBeanServer() {
            return ReplacementServer.server;
    nvm i'm posting this to slack.

    Hello all,

    I am having an issue with compiling a micronaut application to a native image with graalvm. This issue relates specifically to using H2 within this application. I have created a small test api. It utilizes h2 and I believe is configured properly (although obviously something is wrong due to the issue I am having). When I run the application normally, everything runs as expected. Hikari starts, I see the hibernate log messages I expect, and the table I use gets created using the h2 dialect. I can then successfully build this application into a native binary image. The issue comes about when running this application with docker, I do not see the start up log messages I expect and I get a "Internal Server Error: No backing RepositoryOperations configured for repository. Check your configuration and try again" error message. I find this confusing because again, it works when I am running it as a non native image. Has anyone faced similar issues or are they aware of the cause?

    Remko Popma
    This channel is abandoned. There’s a link to the Slack channel in earlier messages.
    Binoy Shah
    hi, I need to build arm64 native image for my application, how can I build an arm64 image from a mac, any leads would be helpful
    Remko Popma
    This channel is abandoned. There’s a link to the Slack channel in earlier messages.
    Alex Karymau

    Hi there! Has anybody successfully built native image and run Java AWS SDK V2 samples?
    Now playing with com.example.dynamodb.ListTables in attemp to build native image: built jar, run it with -agentlib:native-image-agent anf gen META-INF/native-image/*-config.json files, rebuild jar and when run:

    native-image --no-fallback -H:+TraceClassInitialization -jar target/sdk-dynamodb-examples-1.0.jar


    Error: Classes that should be initialized at run time got initialized during image building:
     org.apache.http.conn.ConnectionRequest the class was requested to be initialized at build time (from the command line). org.apache.http.conn.ConnectionRequest has been initialized without the native-image initialization instrumentation and the stack trace can't be tracked. Try avoiding to initialize the class that caused initialization of org.apache.http.conn.ConnectionRequest

    If add --initialize-at-build-time=org.apache.http then got dozens of another errors:

    org.apache.log4j.or.RendererMap was unintentionally initialized at build time. org.apache.log4j.or.RendererMap has been initialized without the native-image initialization instrumentation and the stack trace can't be tracked. Try marking this class for build-time initialization with --initialize-at-build-time=org.apache.log4j.or.RendererMap
    org.apache.commons.logging.LogFactory$4 was unintentionally initialized at build time. org.apache.commons.logging.LogFactory$4 has been initialized without the native-image initialization instrumentation and the stack trace can't be tracked. Try marking this class for build-time initialization with --initialize-at-build-time=org.apache.commons.logging.LogFactory$4
    org.apache.commons.logging.impl.Log4JLogger was unintentionally initialized at build time. org.apache.commons.logging.impl.Log4JLogger has been initialized without the native-image initialization instrumentation and the stack trace can't be tracked. Try marking this class for build-time initialization with --initialize-at-build-time=org.apache.commons.logging.impl.Log4JLogger

    Can anybody advice anything?

    Remko Popma
    Hi. This channel is abandoned. Please move to the Slack channel.
    See earlier comments for a link.
    Alex Karymau
    Caused by:$UserException: Static field or an object referenced from a static field changed during native image generation? object:java.lang.ref.SoftReference@3a20bbf7 of class: java.lang.ref.SoftReference
    I am struggling with this error, any idea?