Questions tagged [graalvm-native-image]

449 questions
0
votes
0 answers

Access Java functions (JNI/JNA) from a GraalVM Native Image shared Library

I am having difficulties in accessing java methods from a shared library built with GraalVM. Imagine this code loading a GraalVM Shared library: public class Main { static native int onEnable(long isolateThread, int a); static native long…
0
votes
0 answers

Error: Path entry 'axis.jar' does not map to a real path. Error: Image build request failed with exit status 1

I am attempting to build a native image for my picocli application using GraalVM, and I am encountering an error: Error: Path entry 'axis.jar' does not map to a real path. Error: Image build request failed with exit status 1 I used the following…
0
votes
0 answers

dlopen failed: cannot locate symbol "JNI_OnLoad_javajpeg"

I have pretty simple desktop app written in JavaFX. The only task is to get a search term (text input box), send a request to my REST API and display results in a form of articles list (name and photo). When I try to convert this app to native…
horvoje
  • 643
  • 6
  • 21
0
votes
1 answer

Register RuntimeHints for Collections EmptyList class not working

I have the following method and a Cacheable annotation on top of that. @Cacheable(value = "autosuggest", key = "#term", unless = "#result.size()==0") @Override public List autoSuggestUsers(String term) { if…
Ladu anand
  • 646
  • 2
  • 8
  • 30
0
votes
1 answer

Spring Boot Native: Error withe the ' jasypt-spring-boot' module

I am trying to create a native executable from my Spring Boot 3.0.7 app (Java 17) using GraalVM. I am using GraalVM in a Docker build to create the native executable. I am using the "jasypt-spring-boot" (3.0.5) library to store the required app…
Ben
  • 290
  • 2
  • 17
0
votes
1 answer

Error when running Spring Native with GraalVM: Cannot load optional framework class

Spring-native(Spring-boot3.0.5):Override calss ClassPathBeanDefinitionScanner run error when use AOT Spring-boot version:3.0.5 I define a new class extende ClassPathBeanDefinitionScanner: lang=java public class RpcComponentScanner extends…
0
votes
0 answers

how to add additional reachability metadata when working with native:compile

I have a Spring Boot project that depends on a local JAR package. This local JAR package uses a lot of reflections, in order to package my app to native image, I generated reachability metadata (by using tracing agent) for it. I use the…
fish
  • 79
  • 1
  • 6
0
votes
0 answers

How to implement a plugin architecture using Spring Boot 3 Native Image and Dynamic Classloading if possible

Plenty of java applications today contain executable code and a set of interfaces. These interfaces are then used by implementors to create a set of classes that should function when loaded into the application. However, these implemented classes…
StevenPG
  • 311
  • 4
  • 16
0
votes
1 answer

Graalvm generated binary is working inside the project directory but not outside that directory

I am using a rather simple Java application that receives an input file, process it and generate an output file. I am using Picocli for arguments to the application and Graalvm to create a native binary. I first created the artifact in intellij…
Dr. Mian
  • 3,334
  • 10
  • 45
  • 69
0
votes
0 answers

Constructor binding in a native image requires compilation with -parameters but the following classes were compiled without it: okhttp3.Protocol

I'm trying to create a spring-boot 3 native graalvm image using mvn clean native:compile but I'm getting the following error: Constructor binding in a native image requires compilation with -parameters but the following classes were compiled without…
0
votes
0 answers

Docker container build with Spring Boot Native can't access files in src/main/resources

My goal is to build a Spring Boot Native app that reads a file in src/main/resources. pom.xml: 17
ThCollignon
  • 976
  • 3
  • 14
  • 31
0
votes
1 answer

Spring Boot Native - Can't find file in /resources

I've built a Spring Boot native executable using the command mvn clean package -Pnative but it can't read files in /resources. Java code: try (InputStream inputStream = Reader.class.getClassLoader() …
ThCollignon
  • 976
  • 3
  • 14
  • 31
0
votes
0 answers

Runtime Hints for Spring Boot 3 AOT with jOOQ 3.18+

Starting a native Spring Boot image with an application that uses jOOQ 3.18+ results in Caused by: java.lang.NullPointerException: null at org.jooq.impl.DefaultBinding.binding(DefaultBinding.java:487) at…
Jan Švejda
  • 160
  • 2
  • 8
0
votes
0 answers

MyBatis error when compile SpringBoot project using GraalVM

Here I am facing the following problem with MyBatis when I compile the SpringBoot project using GraaVM, the build process finished successfully and generates the .exe file, but when I run the program it throws the exception, but in case I run the…
Bahramdun Adil
  • 5,907
  • 7
  • 35
  • 68
0
votes
1 answer

Custom Dockerfile, base image or docker image extension for Spring Boot 3.x

With https://start.spring.io/ I created Spring Boot 3.x app with support for native image I can build with gralde bootBuildImage and run with docker run spring305gradlenativeimage:0.0.1-SNAPSHOT How to use custom Dockerfile or extend this docker…
Paul Verest
  • 60,022
  • 51
  • 208
  • 332