Questions tagged [graalvm]
Graal is a just-in-time compiler for the JVM focused on peak performance and multi-language support. Graal offers performance advantages not only to Java code, but also to scripting languages such as JavaScript, Ruby, and R.
667
questions
0
votes
0
answers
29
views
Micronaut application with GraalVM native image
I am trying to build a GraalVM native application from my Micronaut project. I used JAXB inside it to read and write some XML files. The application works fine, by running it directly or building a ...
0
votes
0
answers
24
views
Gson.toJson(Any) always get {} when using springboot3.0 native image
I'm using Kotlin lang with springboot3.0. The way I package the native package is ./mvnw native:compile -Pnative.
Gson version is 2.10.1
springboot version is 3.0.2
fun doSometing(payload:Any){
...
0
votes
0
answers
12
views
Cannot install Graal on M1 Macintosh
I have tried to install graal on my M1 Macintosh, but I always get variations on
I have tried both brew and
https://www.graalvm.org/22.0/docs/getting-started/macos
https://github.com/graalvm/graalvm-...
0
votes
1
answer
24
views
Gradle can't build native image
I am trying to build a native image via gradle but it can't do it.
./gradle nativeCompile fails with an error
What went wrong: Execution failed for task ':nativeCompile'.
Determining GraalVM ...
0
votes
1
answer
17
views
How exactly Truffle does "Tree Rewriting"?
A ubiquitous phrase in literature describing the Truffle language implementation framework is "Tree Rewriting". It's often said that this allows tree nodes to become more specialized to ...
0
votes
1
answer
31
views
Quarkus native container-build
I have write a small quarkus application and I create a native executable with the command:
mvn package -Pnative -Dquarkus.native.container-build=true
The process works fine (I'm able to deploy the ...
0
votes
0
answers
26
views
Failed graalvm native build through quarkus with Unsupported field jdk.internal.loader.NativeLibraries.loadedLibraryNames
I am facing an issue when I am doing a native build and I am not sure where to proceed to try to resolve the issue as no where in the stack trace indicates what I have done wrong in my code.
If ...
-1
votes
0
answers
40
views
What might be causing my system to not apply GraalVM to Java 11 when both bins are in the PATH variable?
I am seeking professional recommendations on how to enable GraalVM for Java 11 in my system. Despite installing the corresponding GraalVM version intended for Java 11, it appears that my system is not ...
0
votes
0
answers
17
views
Can GraalVM compiled code call methods from other GraalVM compiled code?
I've always been interested in the idea of a polyglot framework that allows steps in a pipeline of transformations to be written in arbitrary programming languages, as long as the transforming code ...
0
votes
0
answers
47
views
Micronaut aws lambda native image throws runtime error Could not find option 'MaxPermSize'
I have deployed a micronaut lambda native image as AWS Lambda. But when I did a test I am getting following error
INIT_START Runtime Version: provided:al2.v16 Runtime Version ARN: arn:aws:lambda:eu-...
0
votes
1
answer
47
views
RuntimeHint for Hibernate Db2Dialect with Spring Boot and GraalVM
I am trying to get the Db2Dialect working with Hibernate. I am using Sprint Boot 3.0.2 and the GraalVm version 22.3.1. Adding the hibernate-graalvm dependency did not help either. When starting the ...
1
vote
1
answer
29
views
Cannot access internal (polyglot) libraries from Graal native-image binary
I've created a simple "hello world" application to introduce myself to Graal and its polyglot functionality (currently linux only).
https://github.com/BurntMonkey/hello-graal/
To be honest, ...
0
votes
1
answer
43
views
Quarkus with GraalVM, doesn't work with Graal.js
I have a quarkus App (jdk11), which makes a call out to Javascript, using Graal.js . My pom.xml contains dependencies on graal.js:
<dependency>
<groupId>org.graalvm.js</groupId>
...
0
votes
1
answer
50
views
How to embed a file into spring boot native image?
I want to put a file inside an image generated by spring boot native image. But as far as I tried to search, there's no such option (or I couldn't find it) in neither spring boot maven plugin, paketo ...
0
votes
0
answers
33
views
How to Spring Boot Native / GraalVM without Parent
GraalVM documentations without Spring Boot Parent are really rare.
So i tried to reproduce what the spring boot parent is doing.
Here is my Solution with i came up with: https://github.com/...
0
votes
1
answer
71
views
ClassNotFoundException when package Spring Boot Application with native-maven-plugin
I try to build a native executables on win 10 use SpringBoot 3.0 (include Spring Test) and Graalvm. I packaged my project with native-maven-plugin but failed.
How do I fix it?
JDK version: 17.0.6
...
0
votes
1
answer
188
views
Spring Boot / GraalVM native-maven-plugin failing with runtime vs build-time class initialization
I'm trying to build a native image using Spring Boot 3, referring to these docs.
I'm hitting the below exception at build time:
[INFO] [creator]
[INFO] [creator] Error: Classes that ...
0
votes
0
answers
13
views
GraalVM - can you jar multiple languages together?
I've read a bit about GraalVM on how to run node.js and Polygloting, but there's something I still haven't understood;
Can I jar a polyglot program, java + node.js (say SvelteKit server)?
Will GraalVM ...
0
votes
0
answers
30
views
What are the Spring Native changes from Spring Boot 2 (incubation) to Spring Boot 3?
As stated in docs: "After 3+ years of incubation in the Spring Native experimental project with Spring Boot 2, native support is moving to General Availability with Spring Framework 6 and Spring ...
0
votes
0
answers
47
views
Use JNI to call graalvm native build shared library
I am learning graalvm, and I was wondering if it is possible that I can use JNI to call a java native-built shared library?
Let's say there are two Java source codes, the first would be compiled as a ...
1
vote
1
answer
60
views
Difference between Java custom JRE and Java native image
In addition to developing classic services on Spring Boot, I want to know Java with it environment better.
When I began to study portability, I came across such concepts as custom JRE (jlink, jmods) ...
0
votes
0
answers
14
views
How can I add jars to the classpath of graaljs
I'm trying to write a graaljs script using VSCode, I've added all the necessary Graal extensions, I have Graasl.js installed , but I also have several jars with Java classes I want to use. Is there a ...
1
vote
0
answers
167
views
Hibernate enhance maven plugin not working with spring boot 3 and graalvm
I am using spring boot 3:
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<...
0
votes
0
answers
197
views
Build of native image with Spring Boot get stuck on Apple Silicon
The build with -Pnative starts and progresses successfully, but fails to complete on my Apple Silicon Mac. Any ideas what might be missing?
. ____ _ __ _ _
/\\ / ___'_ __ _ _(...
0
votes
0
answers
41
views
spring boot 3 native fail with javaAgent configured
I must say that I am pretty new with graalvm (like most people nowadays).
I have been following this guide created by @joshLong to create a spring boot native application.
In the guide it explains ...
0
votes
1
answer
62
views
Micronaut + GraalVM + Kotlin for Lambda Function with S3 Notification fails to run with error "Unconvertible input: null"
I am using micronaut to create a kotlin project that can build to a native GraalVM image that I can upload as a lambda function on AWS. I want this lambda function to get triggereted on S3 ...
1
vote
1
answer
185
views
GraalVM native image build `nativeCompile` task fails on Gradle after migrating from Java11 to Java17
In summary, after migrating Gradle properties (source/target) and native GraalVM image from Java11 to Java17, the build task fails on Gradle.
This is a micronaut Java service and without giving away ...
0
votes
2
answers
65
views
Graalvm not detecting nodejs
New to graalvm. Trying to run a node module in Intellij
Context c = Context.create("nodejs");
try {
File birdJS = new File(PATH);
c.eval(Source....
0
votes
2
answers
333
views
springboot 3 graalvm native image stuck forever: mac m1
I am using spring boot 3.0.2 and I am using native-maven-plugin.
<plugin>
<groupId>org.graalvm.buildtools</groupId>
<artifactId>native-maven-plugin</...
-2
votes
1
answer
47
views
GraalVM Heap Size Setting Recommendations
What is the usual recommended heap memory setting for a production environment, 1 microservice written in Java, if compiled as a native image using GraalVM Community Edition? Should I specify both -...
3
votes
1
answer
68
views
Why do I need JVM to run an AOT compiled code?
Im learning about GraalVM and AOT and I was reading the spec for AOT and then I got confused, if AOT compiles my code to machine code (native) why do I need a JVM?
why I need this:
java -XX:AOTLibrary=...
1
vote
1
answer
73
views
Quarkus register for reflection external POJOs
i have an external lib with POJOs (about +100). I want to register all for reflection as i will use it on my rest client.
Is there a way to RegisterForReflection a whole package ? Should i do it ...
0
votes
0
answers
26
views
Is it posssible to preinstall the files downloaded by graalvm nativeCompile to avoid using internet on build Spring (native) Boot 3?
Error downloading component catalog from https://www.graalvm.org/component-catalog/v2/graal-updater-component-catalog-java17.properties: PKIX path building failed: sun.security.provider.certpath....
0
votes
1
answer
210
views
Spring Boot NativeImage compilation fails on: "Could not find target method: private org.springframework.boot.Banner"
I have problem with compilation of my Spring boot application.
TL;DR: Error: Could not find target method: private org.springframework.boot.Banner org.springframework.nativex.substitutions.boot....
1
vote
0
answers
72
views
How configure proxy in gradle graalvm plugin for Spring Native compile with Spring Boot 3
I try to build Spring native (Spring boot 3) behind an enterprise proxy.
I use gradle and gradle graalvm plugin (id 'org.graalvm.buildtools.native' version '0.9.18')
I use gradle-7.6 (with Oracle jdk-...
0
votes
0
answers
121
views
Unable to create javax script engine for javascript in Extjs
It seems that the Nashorn engine has been removed since JDK15 https://openjdk.org/jeps/372 But I don't want to downgrade the JDK to build the Sencha app. Do you have any suggestions? Thanks!
I also ...
3
votes
3
answers
290
views
docker build fails inside gitlab-runner but works locally : spring boot native compilation with GraalVm
I made a Dockerfile to build my spring boot project with GraalVm natively; everything went correctly.
Here is the Dockerfile
FROM ghcr.io/graalvm/graalvm-ce:22.3.1 AS buildnative
WORKDIR /app
COPY ...
2
votes
3
answers
355
views
Spring Boot Native: no valid dependencies for native-image-svm
I've just upgraded several projects to Java 19, Spring Boot 3.0.2, Kotlin 1.8.0 with Maven and I'd like Spring Boot to generate native images.
<java.version>19</java.version>
<kotlin....
2
votes
1
answer
104
views
Unsatisfied dependency expressed through method 'setFilterChains' parameter 0: Error creating bean with name 'mvcHandlerMappingIntrospector'
I upgraded Spring boot version 3.0.2 and i try graalvm nativeCompile that is error happened.
I run this application normal way it is OK but i try executable file show this error.
Exception ...
0
votes
1
answer
252
views
Profile specific application properties not picked by Spring Boot 3 native executable
I am planning to use a native image with Spring Boot 3. My environment-specific properties are stored in the application.properties file. Sample file
spring.config.activate.on-profile=dev
server.port=...
0
votes
1
answer
105
views
Provide system properties at runtime when building native image in Spring Boot 3
I am upgrading an existing project to Spring Boot 3 to run as a native image. My application requires a custom trust store to connect to OpenLDAP, earlier I used to create a uber jar and provide the ...
0
votes
0
answers
76
views
Spring Boot 3 : Workaround for Profiles with GraalVM
I am planning to migrate my project from 2.7.6 to 3.0.1 and also use the Native image feature. But I see in the release notes that Profiles don't work when building a native image using GraalVM. Our ...
0
votes
0
answers
24
views
How to compile Graal Native Image on MacOs BigSur?
When I try to compile with ./gradlew nativeCompile
java -version
openjdk version "17.0.5" 2022-10-18
OpenJDK Runtime Environment GraalVM CE 22.3.0 (build 17.0.5+8-jvmci-22.3-b08)
OpenJDK 64-...
0
votes
0
answers
143
views
How to create a Quarkus application executable on Windows?
How to create a Quarkus application executable on Windows?
I have created a first Quarkus app from its initializer https://code.quarkus.io/
I have been able to do correctly all the steps indicated in ...
0
votes
1
answer
622
views
Error when trying to run Java 17 - Spring Boot 3 project with ehcache using GraalVM native image
I'm trying to run an app with Java 17 and Spring Boot 3 using GraalVM native image support.
It's a very simple app with just a GET endpoint.
The app uses ehcache and Spring Boot cache to cache the ...
1
vote
1
answer
56
views
Howto add the version, description and copyright meta-data in the generated executable using gluonfx:build?
We need meta-information in the generated executable so that right-clicking and selecting "details" will display the description, copyright and version.
We have added description and vendor ...
0
votes
1
answer
57
views
SpringBoot 3 AOT/GraalVM/Native: Build native binary from Windows to run on Linux
Small question regarding SpringBoot 3 and the new AOT Native binary with GraalVM please.
I am building my java SpringBoot 3 app on a Windows machine (no judging please!) in order to scp the binary on ...
0
votes
0
answers
37
views
GraalVM native-image: how to disable auto-detected internal GsonFeature?
During my GraalVM native image build GsonFeature is auto detected and enabled:
1 user-specific feature(s)
- com.oracle.svm.thirdparty.gson.GsonFeature
This Feature registeres reflective access to ...
0
votes
1
answer
32
views
Failed to find class `com.fasterxml.jackson.databind.deser.std.DateDeserializers$TimestampDeserializer` for handlingvaluesof type `java.sql.Timestamp`
Failed to find class `com.fasterxml.jackson.databind.deser.std.DateDeserializers$TimestampDeserializer` for handling values of type
`java.sql.Timestamp`, problem: (java.lang.ClassNotFoundException) ...
0
votes
1
answer
90
views
Quarkus build native with graalvm polyglot embed script language runtime error
Quarkus and Graalvm version
quarkusPluginId=io.quarkus
quarkusPluginVersion=2.15.3.Final
quarkusPlatformGroupId=io.quarkus.platform
quarkusPlatformArtifactId=quarkus-bom
quarkusPlatformVersion=2.15.3....