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

Liberty server won't start when specifying java security manager in Java 24+ #30617

Open
gjwatts opened this issue Jan 23, 2025 · 0 comments · May be fixed by #30618
Open

Liberty server won't start when specifying java security manager in Java 24+ #30617

gjwatts opened this issue Jan 23, 2025 · 0 comments · May be fixed by #30618

Comments

@gjwatts
Copy link
Member

gjwatts commented Jan 23, 2025

When trying to start a Liberty server with the security manager enabled in the bootstrap.properties file, like this

websphere.java.security

The Liberty server fails to start with messages similar to this in the console.log:

WARNING: package sun.security.action not in java.base
Launching com.ibm.ws.security.csiv2.fat.servlet.client.java2 (WebSphere Application Server 25.0.0.1/wlp-1.0.97.202501102305) on OpenJDK 64-Bit Server VM, version 24-ea+31-3600 (en_US)
CWWKE0005E: The runtime environment could not be launched.
CWWKE0018E: An exception occurred while launching the runtime environment: java.lang.UnsupportedOperationException: Setting a system-wide Policy object is not supported
com.ibm.ws.kernel.boot.LaunchException: Caught unexpected exception java.lang.UnsupportedOperationException: Setting a system-wide Policy object is not supported
	at com.ibm.ws.kernel.boot.internal.KernelBootstrap.rethrowException(KernelBootstrap.java:714)
	at com.ibm.ws.kernel.boot.internal.KernelBootstrap.go(KernelBootstrap.java:221)
	at com.ibm.ws.kernel.boot.Launcher.handleActions(Launcher.java:243)
	at com.ibm.ws.kernel.boot.Launcher.createPlatform(Launcher.java:119)
	at com.ibm.ws.kernel.boot.cmdline.EnvCheck.main(EnvCheck.java:61)
	at com.ibm.ws.kernel.boot.cmdline.EnvCheck.main(EnvCheck.java:37)
Caused by: java.lang.UnsupportedOperationException: Setting a system-wide Policy object is not supported
	at java.base/java.security.Policy.setPolicy(Policy.java:114)
	at com.ibm.ws.kernel.boot.internal.KernelBootstrap.enableJava2SecurityIfSet(KernelBootstrap.java:458)
	at com.ibm.ws.kernel.boot.internal.KernelBootstrap.buildClassLoader(KernelBootstrap.java:412)
	at com.ibm.ws.kernel.boot.internal.KernelBootstrap.go(KernelBootstrap.java:196)
	... 4 more

But according to our design documentation for handling the disabling of the security manager in Java 18, we are supposed to ignore the security manager request, post a message and start the server.

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

Successfully merging a pull request may close this issue.

1 participant