Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
    Cristi Iaroi
    thanks. Another quick question : has anyone had the pleasure of creating a native-image for windows that uses httpsconnection? or calls an https endpoint? (--enable-https). Currently fighting with NoSuchAlgorithmException: SSL SSLContext not available issue when running the resulting binary - for which I had to "hack" the graalvml/jre/lib/security/java.security file (because of sunec issues)
    Charles Oliver Nutter
    what magic do I need to do to install native-image on EE?
    I just wanted to see how it compares to my CE image
    oh nevermind, same jar seems to work
    there are docs saying to use gu install native-image fwiw
    Oleg Šelajev
    yeah, this is a recent change I don't think all locations are changed with the instructions. Please download the native image for GraalVM Enterprise jar from OTN: https://www.oracle.com/downloads/graalvm-downloads.html and install it with gu install --file filename.jar
    Iván López

    Hey folks! I have a question about how to speed up compilation of GraalVM from source. For testing Micronaut integration we compile Graal from source and then run our tests. Currently this is what we execute:

    mx --disable-polyglot --disable-libpolyglot --dynamicimports /substratevm build

    And that generates libnative-image-agent, native-image-configure, gu and native-image.
    We only need native-image for our tests so I was wondering if there is a way to configure the build to generate only native-image and skip the rest so our builds are faster.

    Iván López
    Using mx --disable-polyglot --disable-libpolyglot --dynamicimports /substratevm --skip-libraries=true build builds native-image-configure, gu and native-image. Not sure if it's possible to also avoid building native-image-configure and gu
    abhishek manocha
    How exactly to solve Error: No bin/java and no environment variable JAVA_HOME with graalvvm-ce:19.2.0 --no-fallback doesnt work with the micronaut app and docker fails with exit code 1
    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: https://join.slack.com/t/graalvm/shared_invite/enQtNzk0NTc5MzUyNzg5LTAwY2YyODQ4MzJjMGJjZGQzMWY2ZDA3NWI3YzEzNDRlNGQ1MTZkYzkzM2JkYjIxMTY2NGQzNjUxOGQzZGExZmU
    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 https://github.com/micronaut-projects/micronaut-data/tree/master/src/main/docs/guide/graal, 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 https://github.com/jeag2002/TestMicronautGraalVM; 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 java.security file of the graalVM JVM (security.provider.3=sun.security.ec.SunEC; security.provider.10=sun.security.mscapi.SunMSCAPI) 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(AnnotatedDirectiveBuilder.java:82)
        at io.leangen.graphql.generator.OperationMapper.lambda$generateDirectives$4(OperationMapper.java:141)
        at io.leangen.graphql.generator.OperationMapper$$Lambda$1078/249839094.apply(Unknown Source)
        at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
        at org.springframework.transaction.support.TransactionOperations.lambda$executeWithoutResult$0(TransactionOperations.java:68)
        at com.oracle.svm.reflect.TransactionOperations_lambda$executeWithoutResult$0_ae12fe069646a236658983eb24bddfc18868bbcc_1261.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at javax.xml.transform.TransformerException.printStackTrace(TransformerException.java:348)
        at javax.xml.transform.TransformerException.printStackTrace(TransformerException.java:282)
        at com.oracle.svm.jni.functions.JNIFunctions.ExceptionDescribe(JNIFunctions.java:761)
        at com.oracle.svm.core.code.IsolateEnterStub.JNIFunctions_ExceptionDescribe_b5412f7570bccae90b000bc37855f00408b2ad73(generated:0)

    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 com.oracle.svm.core.util.UserError.abort(UserError.java:65)
        at com.oracle.svm.hosted.classinitialization.ConfigurableClassInitialization.checkDelayedInitialization(ConfigurableClassInitialization.java:494)
        at com.oracle.svm.hosted.classinitialization.ClassInitializationFeature.duringAnalysis(ClassInitializationFeature.java:188)
        at com.oracle.svm.hosted.NativeImageGenerator.lambda$runPointsToAnalysis$8(NativeImageGenerator.java:711)
        at com.oracle.svm.hosted.FeatureHandler.forEachFeature(FeatureHandler.java:63)
        at com.oracle.svm.hosted.NativeImageGenerator.runPointsToAnalysis(NativeImageGenerator.java:711)
        at com.oracle.svm.hosted.NativeImageGenerator.doRun(NativeImageGenerator.java:526)
        at com.oracle.svm.hosted.NativeImageGenerator.lambda$run$0(NativeImageGenerator.java:444)
        at java.util.concurrent.ForkJoinTask$AdaptedRunnableAction.exec(ForkJoinTask.java:1386)
        at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
        at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
        at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
        at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)
    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: https://github.com/karussell/graphhopper-native-image 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: https://join.slack.com/t/graalvm/shared_invite/enQtODM1NTQzNDIyMjk0LTNlYjBhNTdiNDQxNTdkNDE0ZmFlNzMwNDcyOWZjOTEzN2UyMTM5MTk5YjY1ZDgwMWU2NGQwNjVhZWVhOWRiOGQ
    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.