Questions tagged [spring-native]

Spring Native supports compiling Spring applications to native images with GraalVM.

Spring Native supports compiling Spring applications to native images with GraalVM.

iIt s new experimental Spring project https://github.com/spring-projects-experimental/spring-native , that was announce in 2021 https://spring.io/blog/2021/03/11/announcing-spring-native-beta and pinned as #1 Dependency option on https://start.spring.io/

146 questions
0
votes
1 answer

How does the static code analysis of Spring Native work?

I've spent the last weeks trying to get a project of mine work with Spring Native. One of my biggest problems is with serializing / deserializing objects using Jackson. I'm aware of the reason why this fails and that I can add native hints for any…
Pragmatick
  • 130
  • 16
0
votes
1 answer

Using Properties Class with Map within an spring native build

I try to build a native executable with GraalVM and Spring Boot 3.0. When I use configuration properties class including a HashMap, starting of these application fails. example project This class contains a simple…
0
votes
0 answers

Can I build spring-native boot image in low resources machine (like AWS CodeBuild Linux Small 2vCPUs / 3gb ram)?

I want to build boot build image for GraalVM spring native project using AWS CodeBuild called from AWS CodePipeline, but the build process stops at missing RAM resources. I tried the default spring builder and the following one:…
0
votes
1 answer

Content type 'application/json' not supported for bodyType when using native images

I'm using Spring Boot 3 with WebFlux. Tests run successfully, local service also works fine. Problems appear when running native image generated by gradlew bootBuildImage. Code example: @Configuration public class RouteConfiguration { @Bean …
solomkinmv
  • 1,804
  • 3
  • 19
  • 30
0
votes
0 answers

SpringApplicationAotProcessor does not return when processing Spring AOT

I'm trying to generate AOT data for a Spring Boot 3 application. When I run mvn -Pnative native:compile the Spring application is started using org.springframework.boot.SpringApplicationAotProcessor. The problem is that the process doesn't quit even…
Pragmatick
  • 130
  • 16
0
votes
3 answers

id property inherited from AbstractPersistable is not recognized in a Spring Boot AOT compiled native image

I have migrated a Spring Boot application to Spring Boot 3 and compiled a native image. The application is exposing a simple entity using Spring Data REST (see code below). During application startup it terminates with complaining that no identifier…
0
votes
1 answer

Spring Boot 3 with CustomValidator and native Executable

Hello Spring Boot Experts, I'm trying to create a annotation custom validation, when i execute this in JVM Mode everything works as expected, but when i execute as native image i get this error StackTrace 2022-11-28T17:09:40.312+01:00 ERROR 14056…
Alex
  • 130
  • 6
0
votes
1 answer

Set deserializing in Spring Native image problem

I'm stuck with a problem on a built Spring Native image: Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is…
Garion S.
  • 119
  • 2
  • 9
0
votes
0 answers

How much Spring Native Image affect on CI/CD pipeline? do we need to create built on individual environment

We are planning to switch to SpringNative using graalvm-ce-java8-21.2.0. My question is do we need to built a tested copy in all environment or we can just copy the executable or docker image directly in testing and than production environment ?…
0
votes
0 answers

Is it possible to define Interface-based projection for an entity in a spring boot application compiled with spring-native?

I try to compile an existing spring boot (2.7.1) application with spring-native (0.12.1), and i'm kind of stuck on an issue related to spring data rest projection (based on interface). For example, the Entity is like the following : public class…
0
votes
0 answers

Error when trying to run spring-boot native with aws credentials

I'm trying to migrate a java spring boot application to use spring boot native implementation and I'm facing some problems to realize it. Many of the problems that I've faced I solved just googling, but this one with aws credentials provider I…
0
votes
1 answer

adding option "--enable-https" to GraalVM gradle nativeCompile task

I am trying to build an executive via the compileNative task from a Spring Boot 3.0.0M5 project. I need to add the --enable-https to the GraalVM compiler. How is it possible to add that option using the gradle plugin? id…
Thomas Einwaller
  • 8,873
  • 4
  • 40
  • 55
0
votes
2 answers

Failed to compile spring-native on GraalVM with the message "native-image.cmd returned non-zero result"

I followed the Spring documentation to try out the Native project, But... Is it related to the version of GraalVM? What version should I use? Spring officially supports it. Spring doc:…
0
votes
2 answers

Spring Native with buildpacks error com.oracle.graal.pointsto.constraints.UnresolvedElementException

I am trying to build a Spring Native application using buildpacks by following the instructions from: https://docs.spring.io/spring-native/docs/current/reference/htmlsingle/#getting-started I changed Java version to 11 or 17 to avoid an error.…
0
votes
0 answers

Response from java aws authorizer lambda changed to APIGatewayProxyResponseEvent from Iam Policy response pojo object

Created Java authorizer lambda to validate token. When I deploy aws jar works as expected, getting iampolicy as response. When Created native image using graalvm to minimize cold start time the response is changed to…