Skip to content

NullPointerException during native image build when using @SpringBootApplication #45791

Closed as not planned
@MiguelAntonioRS

Description

@MiguelAntonioRS

Describe the bug

When building a native image using GraalVM Native Image with a basic Spring Boot application annotated with @SpringBootApplication, a NullPointerException occurs during the build process.

Environment

  • Spring Boot version: 3.2.0
  • Java version: 17 (GraalVM 21.1.0)
  • Build tool: Maven 3.8.6
  • OS: macOS Ventura 13.6 (also reproduced on Ubuntu 22.04)
  • Native Image Maven Plugin version: 0.9.23

To Reproduce

  1. Create a minimal Spring Boot app with only:
    @SpringBootApplication
    public class DemoApplication {
        public static void main(String[] args) {
            SpringApplication.run(DemoApplication.class, args);
        }
    }

Add Spring Boot Native dependency:

org.springframework.boot spring-boot-starter-native

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: invalidAn issue that we don't feel is valid

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions