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
Jar startup fails on JDK 11 with a SecurityManager enabled #25538
Comments
Thanks for creating an issue, @sascha-kaufmann. I've reproduced the problem:
As with #17796, the problem does not occur when jar checking is disabled:
Note that I'm using Spring Boot 2.3.x here as Spring Boot 2.2.x has been out of support since October 2020. The same |
It looks like the fix for #17796 may not have had the intended effect. It was made in 2.2.7.RELEASE. The sample supplied with this issue fails with symptoms similar to those in #17796 with 2.2.6 and then fails to load |
Thx a lot for the quick response. We are using the workaround (disable jar checking) in the meantime. The update to 2.3.x / 2.4.x should not be a problem for us (as far as I could see), haven't planned it yet though. |
I think #21126 is causing the problem. We now call
|
I've applied a "band-aid fix" in 2.3.x, 2.4.x and 2.5.x but ideally we'd do something different. I've opened #26745 to look at refactoring our |
We currently have a problem, similar to #17796, concerning the start of fat jars with JDK11 and SecurityManager enabled. The same application runs fine on JDK8 with SecurityManager enabled.
We get the following exception (where AbcApplication is the main class, annotated as SpringBootApplication) when starting the jar using command
java -Djava.security.manager -Djava.security.policy=security.policy -jar "build\libs\abc-application.jar"
:I created a small sample application with spring-boot 2.2.9.RELEASE (see Gist) with the following setup:
The text was updated successfully, but these errors were encountered: