Giter Site home page Giter Site logo

Comments (11)

fniephaus avatar fniephaus commented on September 12, 2024 1

@roberttoyonaga is this something you could look into?

from graal.

albertattard avatar albertattard commented on September 12, 2024 1

Thank you very much @roberttoyonaga. I've noticed that some of the attributes that are exposed by the VM have the same issue. How can I address these too, please?

from graal.

selhagani avatar selhagani commented on September 12, 2024

Hi @albertattard , thank you for reporting this.

I just reproduced the issue and I confirm the issue you're facing.
We'll take a further look into this and I will keep you updated.

from graal.

albertattard avatar albertattard commented on September 12, 2024

Thank you @selhagani. Let me know if you require any further information.

from graal.

roberttoyonaga avatar roberttoyonaga commented on September 12, 2024

@fniephaus Yup, I can look into this issue.

from graal.

roberttoyonaga avatar roberttoyonaga commented on September 12, 2024

I was able to reproduce the issue. It looks like the problem is that you need to add serialization configuration for LocalDateTime.

Adding the below json in serialization-config.json inside the META-INF directory should fix the problem.

{
  "types":[

    {
      "name":"java.time.LocalDateTime"
    },
    {
      "name":"java.time.Ser"
    }
  ],
  "lambdaCapturingTypes":[
  ],
  "proxies":[
  ]
}

image

Running the Native Image Tracing Agent will help you generate the correct configuration automatically.

It's unfortunate that JMX requires extra configuration, but there isn't a good way of pre-configuring for all use-cases without greatly increasing image size (and remote JMX is already quite heavyweight). Maybe I'll update the JMX docs to suggest users run the tracing agent to generate their custom reflection configuration before using remote JMX.

from graal.

roberttoyonaga avatar roberttoyonaga commented on September 12, 2024

image
I think "java.lang.Double" needs to be added to the serialization config as well. All those "[N/A]" attribute values are doubles.

I'll open a PR to add java.lang.Double to the remote JMX Feature serialization config. It ought to be added there since its required for the OS platformMXBean.

Until that PR is integrated, you can use this for now:

{
  "types":[
    {
      "name":"java.time.LocalDateTime"
    },
    {
      "name":"java.lang.Double"
    },
    {
      "name":"java.time.Ser"
    }
  ],
  "lambdaCapturingTypes":[
  ],
  "proxies":[
  ]
}

from graal.

albertattard avatar albertattard commented on September 12, 2024

That's great @roberttoyonaga.

from graal.

roberttoyonaga avatar roberttoyonaga commented on September 12, 2024

I've put a PR up here: #9357

from graal.

fniephaus avatar fniephaus commented on September 12, 2024

Thanks, Robert! I just took a look :)

from graal.

fniephaus avatar fniephaus commented on September 12, 2024

This just got fixed on the main branch, and hopefully we can still backport it into the JDK 23 release.

from graal.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.