Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spring Boot 3.3.0 image generation failing #490

Open
jerdebsp opened this issue Jun 18, 2024 · 2 comments
Open

Spring Boot 3.3.0 image generation failing #490

jerdebsp opened this issue Jun 18, 2024 · 2 comments

Comments

@jerdebsp
Copy link

I am trying to build a native image (I am using the pom file as generated by https://start.spring.io/) however this is not successful. Basically, this is failing at the creator stage giving a fatal error.

Expected Behavior

Build a native docker image using ./mvnw spring-boot:build-image -Pnative

Current Behavior

Generation failing in the creator stage. See log here: https://gist.github.com/jerdebsp/3c239ef9e319bc3d03943efa1d0a11d6

Steps to Reproduce

POM file:

	<parent>
		<groupId>org.springframework.boot</groupId>
		<artifactId>spring-boot-starter-parent</artifactId>
		<version>3.3.0</version>
		<relativePath/> <!-- lookup parent from repository -->
	</parent>
...
	<properties>
		<java.version>22</java.version>
		<spring-cloud.version>2023.0.2</spring-cloud.version>
	</properties>
...
			<plugin>
				<groupId>org.graalvm.buildtools</groupId>
				<artifactId>native-maven-plugin</artifactId>
			</plugin>
			<plugin>
				<groupId>org.springframework.boot</groupId>
				<artifactId>spring-boot-maven-plugin</artifactId>
				<configuration>
					<image>
						<env>
							<BP_JVM_VERSION>${java.version}</BP_JVM_VERSION>
						</env>
					</image>
					<excludes>
						<exclude>
							<groupId>org.projectlombok</groupId>
							<artifactId>lombok</artifactId>
						</exclude>
					</excludes>
				</configuration>
			</plugin>

Command used:
./mvnw spring-boot:build-image -Pnative

Java Version

java 22.0.1 2024-04-16
Java(TM) SE Runtime Environment Oracle GraalVM 22.0.1+8.1 (build 22.0.1+8-jvmci-b01)
Java HotSpot(TM) 64-Bit Server VM Oracle GraalVM 22.0.1+8.1 (build 22.0.1+8-jvmci-b01, mixed mode, sharing)

Maven Version: Apache Maven 3.9.6

Machine: Mac M2

Motivations

Need to build a docker image for my micro service

@anthonydahanne
Copy link
Member

hello!
Can you please attach the logs described here:

[INFO]     [creator]     # An error report file with more information is saved as:
[INFO]     [creator]     # /layers/paketo-buildpacks_native-image/native-image/hs_err_pid320.log

THanks!

@jerdebsp
Copy link
Author

Any idea where that could be? Looked everywhere for it and couldn't find it anywhere. I tried the target/ folder and i did a find in the terminal

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants