Hi,
I get this exception on start (runing the startup.bat from the zip file):
GeoServer/webapps/geoserver/WEB-INF/lib/gs-main-2.27.1.jar!/applicationSecurityContext.xml]: Bean instantiation via constructor failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.geoserver.security.csp.CSPHeaderDAO]: Constructor threw exception; nested exception is java.lang.IllegalStateException: Failure while trying to get lock for key security/csp.xml
How did you run it? Any more information you can share? GeoServer needs to have write access to a data directory, where security/csp.xml is a configuration file.
I just downloaded the zip file from the site, unzipped it in the “Downloads” folder and as stated run the startup.bat file (without any changes to configs whatsoever). Running it normally throws the exception immediatelly and as Admininstrator the exception comes after 60 seconds. Checked all read only flags, created file manually etc. nothing worked.
I have used Geoserver for years, but looks likes the latest versions using this file changed something. Not sure what rights exactly needs to be set?
Java version: jdk-17.0.6.10-hotspot
The file.csp functionality is new, as part of introducing the content security policy for browsers. You can disable this functionality with org.geoserver.web.csp.strict=false but it still may try checking that file.
Can you see if the file exists and delete it by and then re-run geoserver? You may need to restart your machine to “release” the file lock.
Cant find file.csp in the filder or any csp file. There are also no lock files existing. Searched in all files inside the folder looking for org.geoserver.web.csp.strict and did not found any file containing it…