by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Oleg Šelajev
    @shelajev

    @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,
    org.h2.Driver.class})

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

    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
    @dmlloyd
    you should move the question to the slack channel (see above)
    fcurts
    @fcurts
    Is there an annotation to prevent build-time initialization of classes? this would be much handier/safer than external configuration.
    fcurts
    @fcurts
    or some programming idiom
    Paulo Lopes
    @pmlopes
    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
    @ryanberckmans
    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(
      "--report-unsupported-elements-at-runtime",
      "-H:+ReportExceptionStackTraces",
      "--verbose",
      "--allow-incomplete-classpath",
      "--initialize-at-build-time",
      "--no-fallback",
      s"-H:ConfigurationFileDirectories=${baseDirectory.in(ThisBuild).value}/graalvm-conf/",
    )
    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
    @ryanberckmans
    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)
    jeag2002
    @jeag2002
    @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
    @ryanberckmans
    Here is a GitHub issue corresponding to my problem scala/bug#11634
    jeag2002
    @jeag2002
    @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?
    behi
    @behbas

    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:

    --initialize-at-build-time=graphql.introspection.Introspection$DirectiveLocation

    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
    Karussell
    @timetabling_twitter
    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 (?)
    Karussell
    @timetabling_twitter
    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)
    Karussell
    @timetabling_twitter
    Wow. Creating the shared library was also simple. How does this work with the static library?
    Alina Yurenko
    @alina-yur
    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
    Joe
    @Hi-Shan
    Warning: Aborting stand-alone image build due to unsupported features
    how to avoid this warning ?
    Franco Benner
    @FrancoBenner
    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
    @remkop
    No, never seen that. You may want to move to the Slack channel (link in previous messages). This Gitter channel is abandoned.
    Franco Benner
    @FrancoBenner
    thanks
    Daniel Fitzpatrick
    @crinklywrappr
    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
    @remkop
    This channel is abandoned. Everyone moved to slack. See link above.
    Francisco Gómez García
    @xerz_gitlab
    Hi, any way I could ask over here or Slack?
    Makarenko Anton
    @FTOH

    https://www.graalvm.org/docs/graalvm-as-a-platform/implement-language/

    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.

    https://www.graalvm.org/docs/reference-manual/native-image/

    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
    @Asamsig
    Join the Slack community and ask there, that is where people are active. :)
    Boris Smidt
    @borissmidt

    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.

    @TargetClass(java.lang.management.ManagementFactory.class)
    @SuppressWarnings("unused")
    final class ManagementFactory {
        @Substitute
        public static synchronized MBeanServer getPlatformMBeanServer() {
            return ReplacementServer.server;
        }
    }
    nvm i'm posting this to slack.
    ThomasW0221
    @ThomasW0221

    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
    @remkop
    This channel is abandoned. There’s a link to the Slack channel in earlier messages.
    Binoy Shah
    @ShahBinoy
    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
    @remkop
    This channel is abandoned. There’s a link to the Slack channel in earlier messages.
    Alex Karymau
    @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

    got

    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
    @remkop
    Hi. This channel is abandoned. Please move to the Slack channel.
    See earlier comments for a link.
    Alex Karymau
    @karymau
    Thanks!
    amahfouz1
    @amahfouz1
    Caused by: com.oracle.svm.core.util.UserError$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?
    Remko Popma
    @remkop
    Hi. This channel is abandoned. Please move to the Slack channel.
    See earlier comments for a link.
    drocsid
    @drocsid

    Hi , I've got a curious error appearing almost randomly in my native-image runs:

    Caused by: com.oracle.svm.core.util.VMError$HostedError: Could not find non-initialized charset JIS_X_0208.java
            at com.oracle.svm.core.util.VMError.shouldNotReachHere(VMError.java:74)
            at com.oracle.svm.core.jdk.LocalizationFeature$CharsetNodePlugin.handleInvoke(LocalizationFeature.java:86)
            at org.graalvm.compiler.java.BytecodeParser.tryNodePluginForInvocation(BytecodeParser.java:2105)
            at org.graalvm.compiler.java.BytecodeParser.appendInvoke(BytecodeParser.java:1788)
            at org.graalvm.compiler.java.BytecodeParser.genInvokeStatic(BytecodeParser.java:1566)
            at org.graalvm.compiler.java.BytecodeParser.genInvokeStatic(BytecodeParser.java:1546)
            at org.graalvm.compiler.java.BytecodeParser.processBytecode(BytecodeParser.java:5125)
            at org.graalvm.compiler.java.BytecodeParser.iterateBytecodesForBlock(BytecodeParser.java:3267)
            ... 23 more
    Caused by: java.nio.charset.UnsupportedCharsetException: JIS_X_0208
            at java.nio.charset.Charset.forName(Charset.java:531)
            at com.oracle.svm.core.jdk.LocalizationFeature$CharsetNodePlugin.handleInvoke(LocalizationFeature.java:83)

    The VMError.shouldNotReachHereand the fact that the same fatjar compiles with native-image on some runs tells me it's probably not related to my code

    @lbialy ^^ did you ever solve this issue?

    Remko Popma
    @remkop
    Hi, this channel has been abandoned and replaced by Slack. See links earlier in this channel.
    drocsid
    @drocsid
    @remkop maybe close the channel? @Ibialy can you please DM me if you solved the issue?
    Remko Popma
    @remkop
    Hi, this channel has been abandoned and replaced by Slack. See links earlier in this channel.
    James Roper
    @jroper
    The GraalVM native image compiler runs as a server - is it possible to run and use such a server remotely, eg, start a 96 CPU ec2 instance running the native image compiler server, and then have a developer machine connect to and use it to compile something?
    Remko Popma
    @remkop
    This channel is abandoned and replaced by Slack. See links earlier in this channel.