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

Error: Could not find or load main class org.springframework.boot.loader.PropertiesLauncher #38775

Closed
carlwang87 opened this issue Dec 14, 2023 · 3 comments
Labels
status: invalid An issue that we don't feel is valid

Comments

@carlwang87
Copy link

Upgrade spring boot from 3.1.5 to 3.2.0

gradle configuration

buildscript {
	ext {
		SpringBootVersion = '3.2.0'
	}
}


plugins {
	id 'java'
	id 'org.springframework.boot' version "${SpringBootVersion}"
	id 'io.spring.dependency-management' version "1.1.4"
}

bootJar {
	manifest {
		attributes 'Main-Class': 'org.springframework.boot.loader.PropertiesLauncher'
		attributes 'Start-Class': 'com.java.test.Application'
		attributes 'Loader-Path': 'jar'
	}
}

gradle build jar successfully.

java -jar test.jar failed as below message

Error: Could not find or load main class org.springframework.boot.loader.PropertiesLauncher
Caused by: java.lang.ClassNotFoundException: org.springframework.boot.loader.PropertiesLauncher

downgrade back to 3.1.5, java -jar test.jar works well.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Dec 14, 2023
@bclozel
Copy link
Member

bclozel commented Dec 14, 2023

Classes were relocated in #37667

This is being called out in the upgrade notes. Thanks!

@bclozel bclozel closed this as not planned Won't fix, can't repro, duplicate, stale Dec 14, 2023
@bclozel bclozel added status: invalid An issue that we don't feel is valid and removed status: waiting-for-triage An issue we've not yet triaged labels Dec 14, 2023
@rubensa
Copy link

rubensa commented Jan 8, 2024

@bclozel The Spring Boot Docker Getting Started Guide still references the old org.springframework.boot.loader.JarLauncher class.

@bclozel
Copy link
Member

bclozel commented Jan 8, 2024

@rubensa https://github.com/spring-guides/top-spring-boot-docker/issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: invalid An issue that we don't feel is valid
Projects
None yet
Development

No branches or pull requests

4 participants