Where communities thrive


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

    Hi Guys, I'm trying to run an application that uses a TcpClient from reactor.netty.tcp. When I try to build the native image, I get the following error:
    io.netty.util.AbstractReferenceCounted the class was requested to be initialized at build time (from the command line). io.netty.util.AbstractReferenceCounted caused initialization of this class with the following trace:
    at io.netty.util.AbstractReferenceCounted.<clinit>(AbstractReferenceCounted.java)
    ...

    Why is that?
    Is there an example project, which uses a TcpClient?
    And if it does not work at all, is there another Reactive Streams Tcp Client, which works with native image?

    Oleksandr
    @giova333

    Hi. I'm using ImageIO for image manipulation and getting java.lang.UnsatisfiedLinkError: com.sun.imageio.plugins.jpeg.JPEGImageReader.initJPEGImageReader()
    at runtime. Is there any way to solve this issue?
    I've tried to add:

    {
        "name" : "com.sun.imageio.plugins.jpeg.JPEGImageReader",
        "allDeclaredConstructors" : true,
        "allPublicConstructors" : true,
        "allDeclaredMethods" : true,
        "allPublicMethods" : true,
        "methods" : [
          { "name" : "initJPEGImageReader", "parameterTypes" : [] }
        ]

    to jni-config.json but that didn't help

    Oleksandr
    @giova333
    Helpful chat, I would say =)
    Remko Popma
    @remkop
    This channel is abandoned. Everyone moved to Slack: https://www.graalvm.org/slack-invitation/
    This channel should be closed.
    Oleksandr
    @giova333
    @remkop Thanks, good to know
    ilyamor
    @ilyamor
    is passing java env variables an option?
    msandy10
    @msandy10

    Jackson Mapper mapper.writeValueAsString(lambdaRequest) are not working in GraalVM, it converted object to empty json {} instead of {"resource":"/resource","path":"/path","httpMethod":"GET","multiValueQueryStringParameters":{"email":"user_email@test.com"}}

    Cannot construct instance of `com.test.LambdaRequest` (no Creators, like default construct, exist): cannot deserialize from Object value (no delegate- or property-based Creator) Caused by: com.test.exception.CustomException: Erro

    I have added LambdaRequest into reflection-config.json and annotated @Introspected

    Remko Popma
    @remkop
    This channel is abandoned. Everyone moved to Slack: https://www.graalvm.org/slack-invitation/
    This channel should be closed.
    Ivan Gregurić Ortolan
    @ntrp
    Hello, I already wasted days trying to run a Kafka Streaming application with AVRO schema registry. Is there someone that has a working example? I know it's a problem with Reflection/UnsafeAccess/Dynamic loading but I cannot figure our how to find out what is wrong..
    I tried already:
    • running the app with the tracing agent
    • adding classes to the reflection config
      The problem is that I always get a class cast exception in the end because somehow in native mode the binaryDecoder returns a GenericData$Record instead of my configured class
    Remko Popma
    @remkop
    This channel is abandoned. Everyone moved to Slack: https://www.graalvm.org/slack-invitation/
    This channel should be closed.
    Ivan Gregurić Ortolan
    @ntrp
    oh, I had some doubts... thanks for the hint..
    Muhammad Tabaza
    @Tabzz98
    Hello
    I have an issue configuring reflection, and I suspect native-image isn't detecting the json files in META-INF/native-image. The files are included in the jar (they're all there in jar -tf <jarfile>). Is there something I'm missing that I need to do in order for native-image to see them?
    The files are generated via
    java -agentlib:native-image-agent=config-merge-dir="./src/main/resources/META-INF/native-image/" -jar <jarfile>
    Remko Popma
    @remkop
    This channel is abandoned. Everyone moved to Slack: https://www.graalvm.org/slack-invitation/
    This channel should be closed.
    Alina Yurenko
    @alina-yur
    Hi everyone, since many people were asking to create a Slack workspace instead of Gitter, we've moved to https://www.graalvm.org/slack-invitation/. Please make sure to move there too, since we'll close Gitter rooms next week to avoid confusion. As an alternative you can also submit suggestions via GitHub discussions: https://github.com/oracle/graal/discussions
    Thank you!
    agilob
    @agilob
    shame, I can't have multiple rooms on slack, but I can be on 20 gitter rooms at the same time, gitter has much easier and faster navigation. that explains why there are so few conversations here
    smichaut
    @smichaut
    Hi, I try to run a simple Clojure script that use polyglot from GraalVM (v 20.1, Java 11 on Linux, Clojure 1.10.1). lein run command fails to create context: (def context (.build (Context/newBuilder (into-array ["js"])))) leads to Execution error (IllegalArgumentException) at com.oracle.truffle.polyglot.PolyglotEngineException/illegalArgument (PolyglotEngineException.java:122).
    Could not find option with name version. (I am trying to run the code from https://blog.taylorwood.io/2018/11/26/graal-polyglot.html)
    Remko Popma
    @remkop
    This channel is abandoned. Everyone moved to Slack: https://www.graalvm.org/slack-invitation/
    This channel should be closed.
    alexh2o17
    @alexh2o17_gitlab

    Hi, I've a problem with my native image. I want to create native images of my microservices written in scala with http4s. On my macbook pro everything works but if i try to create native image on jenkins I've an error on last stage. This is my error:

    Fatal error:com.oracle.svm.core.util.VMError$HostedError: com.oracle.svm.core.util.UserError$UserException: Image heap writing found a class not seen during static analysis. Did a static field or an object referenced from a static field change during native image generation? For example, a lazily initialized cache could have been initialized during image generation, in which case you need to force eager initialization of the cache before static analysis or reset the cache using a field value recomputation. object: com.oracle.svm.reflect.ThreadImpl_getThreadAllocatedBytes_5fae1c01d629826c21ab7d94ef2df2ac98ffda29_170@7138655a of class: com.oracle.svm.reflect.ThreadImpl_getThreadAllocatedBytes_5fae1c01d629826c21ab7d94ef2df2ac98ffda29_170 reachable through: object: public long[] sun.management.ThreadImpl.getThreadAllocatedBytes(long[]) of class: java.lang.reflect.Method object: public long[] sun.management.ThreadImpl.getThreadAllocatedBytes(long[]) of class: java.lang.reflect.Method root: HostedField<ThreadAllocatedMemory.getThreadAllocatedBytes location: 96 AnalysisField<ThreadAllocatedMemory.getThreadAllocatedBytes accessed: false reads: false written: true>> at com.oracle.svm.core.util.VMError.shouldNotReachHere(VMError.java:72) at com.oracle.svm.hosted.NativeImageGenerator.doRun(NativeImageGenerator.java:661) at com.oracle.svm.hosted.NativeImageGenerator.lambda$run$0(NativeImageGenerator.java:468) 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:163) Caused by: com.oracle.svm.core.util.UserError$UserException: Image heap writing found a class not seen during static analysis. Did a static field or an object referenced from a static field change during native image generation? For example, a lazily initialized cache could have been initialized during image generation, in which case you need to force eager initialization of the cache before static analysis or reset the cache using a field value recomputation. object: com.oracle.svm.reflect.ThreadImpl_getThreadAllocatedBytes_5fae1c01d629826c21ab7d94ef2df2ac98ffda29_170@7138655a of class: com.oracle.svm.reflect.ThreadImpl_getThreadAllocatedBytes_5fae1c01d629826c21ab7d94ef2df2ac98ffda29_170 reachable through: object: public long[] sun.management.ThreadImpl.getThreadAllocatedBytes(long[]) of class: java.lang.reflect.Method object: public long[] sun.management.ThreadImpl.getThreadAllocatedBytes(long[]) of class: java.lang.reflect.Method root: HostedField<ThreadAllocatedMemory.getThreadAllocatedBytes location: 96 AnalysisField<ThreadAllocatedMemory.getThreadAllocatedBytes accessed: false reads: false

    Remko Popma
    @remkop
    This channel is abandoned. Everyone moved to Slack: https://www.graalvm.org/slack-invitation/
    This channel should be closed.
    Dimitar Dimitrov
    @ddimtirov

    I am trying to run Native Image on a new company-customized RHEL7 build, and I get:

    Fatal error:com.oracle.svm.core.util.VMError$HostedError: java.io.IOException: Cannot run program "/tmp/SVM-977745275151305999/AArch64LibCHelperDirectives" (in directory "/tmp/SVM-977745275151305999"): error=13, Permission denied

    the reason is most likely that the /tmp is mounted as noexec
    Remko Popma
    @remkop
    Hi Dimitar!
    This channel is abandoned. Everyone moved to Slack: https://www.graalvm.org/slack-invitation/
    This channel should be closed.
    Dimitar Dimitrov
    @ddimtirov
    Is there a way to specify different location for that would be used for whatever creates the SVM-<many numbers>
    Hi Remko!
    heh, can't use Slack from work
    I guess I'm going to raise an issue
    thanks for letting me know
    Remko Popma
    @remkop
    Issue may be better
    You’re welcome!
    Dimitar Dimitrov
    @ddimtirov
    Dean Del Ponte
    @ddelponte

    I'm interested in kicking the tires on GraalVm to see if I can get my Micronaut Java app up and running.
    Micronaut supports GraalVm out of the box, so I'm not worried about the micronaut libraries.
    I'm concerned with some additional dependencies and if it's even possible for GraalVm to support them. My goal is to avoid wasting time trying to implement support for libraries which can't be done.
    The dependencies I'm concerned with are as follows:

        implementation("software.amazon.awssdk:dynamodb-enhanced:latest.release")
        implementation("org.apache.commons:commons-collections4:latest.release")
        implementation("io.vavr:vavr:latest.release")
        implementation("org.apache.commons:commons-lang3:latest.release")
        implementation("commons-io:commons-io:latest.release")

    What's everyone's thoughts... is this an endeavor worth undertaking? Thanks!

    Remko Popma
    @remkop
    This channel is abandoned. Everyone moved to Slack: https://www.graalvm.org/slack-invitation/
    This channel should be closed.
    Liam
    @desire
    hey
    Erkam Kahriman
    @Erkam246
    How can i fix this:
    Caused by: java.lang.InstantiationException: Type `org.apache.logging.log4j.message.DefaultFlowMessageFactory` can not be instantiated reflectively as it does not have a no-parameter constructor or the no-parameter constructor has not been added explicitly to the native image.
            at java.lang.Class.newInstance(DynamicHub.java:850)
            at org.apache.logging.log4j.spi.AbstractLogger.createDefaultFlowMessageFactory(AbstractLogger.java:228)
    Remko Popma
    @remkop
    This channel is abandoned. Everyone moved to Slack: https://www.graalvm.org/slack-invitation/
    This channel should be closed.
    Brian Wyka
    @brianwyka
    Hey everyone, I recently created a native image from a java app which makes HTTP calls from within the application. Once I dockerized the image (based on alpine), I noticed DNS resolution issues and UnknownHostExceptions. I did a lot of research and it seems to be due to usage of muslc instead of glibc. When I created the native image, I used the --static option to build it. I am able to run the native image on docker only when I use an image like busybox:glibc. Has anyone gotten this working in alpine?
    Remko Popma
    @remkop
    This channel is abandoned. Everyone moved to Slack: https://www.graalvm.org/slack-invitation/
    This channel should be closed.