Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Charles Oliver Nutter
    @headius
    Seems quiet, ok for one-off questions? I've got an inscrutable error from native-image trying to compile JRuby
    Field org.jruby.runtime.DynamicScope.staticScope is not present on type java.lang.Object. Error encountered while analysing org.jruby.runtime.DynamicScope.getStaticScope()
    getStaticScope accesses protected final StaticScope staticScope on `DynamicScope like any getter
    Ghost
    @ghost~5377c1e9048862e761fa1c25
    @headius that’s where I get stuck on using Native Image on JRuby as well - I didn’t get any further
    Charles Oliver Nutter
    @headius
    @chrisseaton I removed final from the methods and the error went away. Closer to finishing now
    Seems like a bug
    Łukasz Biały
    @lbialy
    this Could not find non-initialized charset JIS_X_*.java thing is really annoying, I have to kill graal's build server to make it go away
    Ghost
    @ghost~5377c1e9048862e761fa1c25
    I try to avoid using the server
    Łukasz Biały
    @lbialy
    I use --no-server all the time but it makes stuff a lot slower
    Charles Oliver Nutter
    @headius
    I have to use --no-server because it flakes out after just a few builds
    errors become random, things start to hang
    Stathis Sideris
    @stathissideris_twitter
    Hello, the documentation says that "Polyglot embeddings can also be compiled ahead-of-time" but it's not clear to me how this can be achieved. Any pointers?
    Remko Popma
    @remkop
    What does --server do? I looked but couldn’t find any docs... Can anyone share a link?
    Łukasz Biały
    @lbialy

    that

    Caused by: com.oracle.svm.core.util.VMError$HostedError: Could not find non-initialized charset JIS_X_0212.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)

    thing is happening often even with --no-server

    @remkop do you mean --no-server? it builds native image without starting background compilation server as a daemon
    Cristi Iaroi
    @cristiWiRd_twitter
    hello everyone, I'm not sure if this is the right place to ask this but has anyone build a native-image with code running jaxb? I'm currently getting Caused by: java.lang.ClassNotFoundException: com.sun.xml.internal.bind.v2.ContextFactory when running the resulting binary. Is there some fix/workaround for this? (point me in the right direction pls)
    Ghost
    @ghost~5377c1e9048862e761fa1c25
    @cristiWiRd_twitter yes the right place to ask, but you're probably best off opening a GitHub issue for that.
    Cristi Iaroi
    @cristiWiRd_twitter
    @chrisseaton thanks for the reply. There is an issue already open : oracle/graal#379 but no solution
    Ghost
    @ghost~5377c1e9048862e761fa1c25
    Try pinging cstancu in the issue
    Cristi Iaroi
    @cristiWiRd_twitter
    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
    @headius
    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
    @shelajev
    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
    @ilopmar

    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.
    Thanks!

    Iván López
    @ilopmar
    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
    @koolak82_twitter
    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
    @koolak82_twitter
    --no-fallback doesnt work with the micronaut app and docker fails with exit code 1
    Alina Yurenko
    @alina-yur
    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
    @MichelSchudel
    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( {
    H2Dialect.class,
    org.h2.Driver.class
    })
    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 \
    --initialize-at-build-time=org.h2.Driver
    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?