Questions tagged [graalvm-native-image]

449 questions
24
votes
5 answers

cl.exe missing when building native app using GraalVM

I'm trying to build a native application using GraalVM and native-image. An error occures when starting the build process. It seems the cl.exe is missing in the classpath. Like mentioned on the GraalVM website, i've installed the…
tmmls
  • 510
  • 1
  • 4
  • 16
21
votes
2 answers

GraalVM (native-image) can not compile logback dependencies

I'm using the current version of community edition: GraalVM/native-image 22.1.0 My project has a dependency to the logging framework logback (version 1.2.3) If I want to compile my "all-in-one" jar with graalVM the native-image complains: Error:…
Tony
  • 360
  • 2
  • 11
19
votes
2 answers

How to fix "Try avoiding to initialize the class that caused initialization" with GraalVM native-image

I'm trying to create a native-image from a fat jar file with $ native-image -H:+TraceClassInitialization --initialize-at-run-time=org.slf4j,org.apache.log4j \ -jar ./my-jar-with-dependencies.jar And I'm getting those error messages…
Sammers
  • 1,038
  • 2
  • 8
  • 20
16
votes
4 answers

/lib64/libc.so.6: version `GLIBC_2.32' not found

I'm building the lambda on Ubuntu with the basic example. It builds without any errors but if I upload and test it on aws in crashes with: { "errorMessage": "RequestId: 7f4d0aca-125c-4032-98dd-9ff387e5252b Error: Runtime exited with error: exit…
utk
  • 171
  • 1
  • 2
  • 7
11
votes
1 answer

How do you debug a 'No instances of ... are allowed in the image heap' when building a native image?

I have a little Java application that implements a RESTful API using Micronaut 2.0.0. Under the hood, it uses Redisson 3.13.1 to go to Redis. Redisson, in turn, uses Netty (4.1.49). The application works fine in a 'classic' java (on HotSpot, both…
Roman Puchkovskiy
  • 11,415
  • 5
  • 36
  • 72
10
votes
1 answer

For a developer what is the difference between the CE and EE versions of GraalVM 19.3?

With the recent release of GraalVM 19.3 it had Java 11 support added which made it interesting to look at again for us. It is understandable that Oracle have two editions, the free community edition and the non-free enterprise edition, but they are…
Thorbjørn Ravn Andersen
  • 73,784
  • 33
  • 194
  • 347
9
votes
1 answer

How can Serializable.class not be assignable from Class.class?

In org.springframework.core.SerializableTypeWrapper (version 5.2.3), there is the following code at line 112: if (GraalDetector.inImageCode() || !Serializable.class.isAssignableFrom(Class.class)) { // Let's skip any wrapping attempts if…
Roman Puchkovskiy
  • 11,415
  • 5
  • 36
  • 72
8
votes
0 answers

Reducing the size of JavaFX native image app

When building a minimum JavaFX app for Windows platform using Gluon's client-maven-plugin incorporating GraalVM native image, the final exe size is approx. 60 MB. Is there something in the plugin config what can be tweaked on my side to reduce this…
Jan Tosovsky
  • 498
  • 5
  • 18
8
votes
0 answers

GraalVM native-image compile Java libraries into iOS framework/libraries

GraalVM native-image allow us to convert Java libraries into local executable. It also allow to compile to shared library as mentioned https://www.graalvm.org/docs/Native-Image/user/README An native image can be built as a standalone executable,…
Sam YC
  • 10,725
  • 19
  • 102
  • 158
8
votes
1 answer

Is there a way to use kotlin.random.Random inside GraalVM native image

I tried to build a simple App with Kotlin that uses kotlin.random.Random class on a GraalVM native image. But this fails at runtime. Stacktrace see below. As a workaround you can use the java standard java.util.Random class. Can someone tell me how…
Oliver
  • 332
  • 1
  • 11
8
votes
1 answer

When and why is the SubstrateVM Framwork Required for a Native Image?

I read about the GraalVM and the SubstrateVM framework. I understand that the native-image command can be used to create native applications from Java source files as follows: $ javac Hello.java $ native-image --no-server --no-fallback Hello $…
aboger
  • 2,214
  • 6
  • 33
  • 47
7
votes
1 answer

Is there a way to create native-binary from Jetpack Compose Desktop app using GraalVM?

I want to create a small binary out of my Compose desktop app. Following are the options out of the box with Compose: Create native package with java runtime (great, but the size is very big) Create an Uber (fat) Jar (but it requires Java 11 to…
7
votes
1 answer

GraalVM native-image jvm metrics

When running a native-image of a Micronaut application retrieving Prometheus metrics fails because it cannot get jvm metrics. Of course native-image pre-compiles the application and includes only what's actually being used, but what kind of JVM is…
6
votes
1 answer

How to use Java agent with native compiled spring boot application

Together with our SpringBoot (3.0.3) application we are using Application Insights (Azure) for monitoring. Currently we are trying to compile the application natively with the GraalVM. That works quite well and gives us a lot of benefits (startup…
6
votes
2 answers

Is it possible to customize docker image generated with Spring Native (with buildpack)

I'm currently developping a Spring Native application, it's building using paketo buildpack and generating a Docker image. I was wondering if it's possible to customize the generated Docker image by adding third party tools (like a Datadog agent for…
1
2 3
29 30