[Geoserver-users] Geoserver 2.21.4 not deploying with Security Manager on JBoss EAP 7.4.9 when upgrading from Java 8 to Java 11

I am trying to deploy GeoServer 2.21.4 in JBoss EAP 7.4.9 with Java 11. The GeoServer application fails to deploy when Java Security Manager is turned on.

I have been using the same Geoserver/JBoss versions on Java 8 successfully with Java Security Manager turned on with the following environament:

Java 8 environament:

Oracle JRE 1.8.0_351

JBoss EAP 7.4.9

GeoServer 2.21.4

Windows 10

With Java Security Manager turned on. (set “SECMGR=true” in JBoss’ standalone.conf.bat)

  • GeoServer successfully deploys with the following configuration set in JBoss’ standalone.xml file in the security-manager subsystem section.

Java 11 environament:

Oracle JRE 11.0.20

JBoss EAP 7.4.9

GeoServer 2.21.4

Windows 10

With Java Security Manager turned on. (set “SECMGR=true” in JBoss’ standalone.conf.bat)

  • GeoServer failed to deploy with the following configuration set in JBoss’ standalone.xml file in the security-manager subsystem section. (Same setting used with Java 8)

Error Log:

"{"WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"geoserver.war\".undertow-deployment" => "java.lang.RuntimeException: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘gwcCatalogConfiguration’ defined in URL [vfs:/C:/Program%20Files/NN/jboss/bin/content/geoserver.war/WEB-INF/lib/gs-gwc-2.21.4.jar/geowebcache-geoserver-context.xml]: Invocation of init method failed; nested exception is java.security.AccessControlException: WFSM000001: Permission check failed (permission \"(\"java.io.FilePermission\" \"F:\\NN\\gis\\geoserver\\external\\gwc-layers\" \"read\")\" in code source \"null\" of \"null\")

Caused by: java.lang.RuntimeException: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘gwcCatalogConfiguration’ defined in URL [vfs:/C:/Program%20Files/NN/jboss/bin/content/geoserver.war/WEB-INF/lib/gs-gwc-2.21.4.jar/geowebcache-geoserver-context.xml]: Invocation of init method failed; nested exception is java.security.AccessControlException: WFSM000001: Permission check failed (permission \"(\"java.io.FilePermission\" \"F:\\NN\\gis\\geoserver\\external\\gwc-layers\" \"read\")\" in code source \"null\" of \"null\")

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘gwcCatalogConfiguration’ defined in URL [vfs:/C:/Program%20Files/NN/jboss/bin/content/geoserver.war/WEB-INF/lib/gs-gwc-2.21.4.jar/geowebcache-geoserver-context.xml]: Invocation of init method failed; nested exception is java.security.AccessControlException: WFSM000001: Permission check failed (permission \"(\"java.io.FilePermission\" \"F:\\NN\\gis\\geoserver\\external\\gwc-layers\" \"read\")\" in code source \"null\" of \"null\")

Caused by: java.security.AccessControlException: WFSM000001: Permission check failed (permission \"(\"java.io.FilePermission\" \"F:\\NN\\gis\\geoserver\\external\\gwc-layers\" \"read\")\" in code source \"null\" of \"null\")"}}"

-Modified the standalone.xml to individual permissions for

Failed results are similar compared to the previous configuration using only for

Error Log:

"{"WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"geoserver.war\".undertow-deployment" => "java.lang.RuntimeException: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘gwcCatalogConfiguration’ defined in URL [vfs:/C:/Program%20Files/NN/jboss/bin/content/geoserver.war/WEB-INF/lib/gs-gwc-2.21.4.jar/geowebcache-geoserver-context.xml]: Invocation of init method failed; nested exception is java.security.AccessControlException: WFSM000001: Permission check failed (permission \"(\"java.io.FilePermission\" \"F:\\NN\\gis\\geoserver\\external\\gwc-layers\" \"read\")\" in code source \"null\" of \"null\")

Caused by: java.lang.RuntimeException: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘gwcCatalogConfiguration’ defined in URL [vfs:/C:/Program%20Files/NN/jboss/bin/content/geoserver.war/WEB-INF/lib/gs-gwc-2.21.4.jar/geowebcache-geoserver-context.xml]: Invocation of init method failed; nested exception is java.security.AccessControlException: WFSM000001: Permission check failed (permission \"(\"java.io.FilePermission\" \"F:\\NN\\gis\\geoserver\\external\\gwc-layers\" \"read\")\" in code source \"null\" of \"null\")

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘gwcCatalogConfiguration’ defined in URL [vfs:/C:/Program%20Files/NN/jboss/bin/content/geoserver.war/WEB-INF/lib/gs-gwc-2.21.4.jar/geowebcache-geoserver-context.xml]: Invocation of init method failed; nested exception is java.security.AccessControlException: WFSM000001: Permission check failed (permission \"(\"java.io.FilePermission\" \"F:\\NN\\gis\\geoserver\\external\\gwc-layers\" \"read\")\" in code source \"null\" of \"null\")

Caused by: java.security.AccessControlException: WFSM000001: Permission check failed (permission \"(\"java.io.FilePermission\" \"F:\\NN\\gis\\geoserver\\external\\gwc-layers\" \"read\")\" in code source \"null\" of \"null\")"}}"

Any help would be much appreciated.

Tung Pham

GeoServer 2.21 reached end of life earlier this year, you may wish to try an active version.

We did fix some windows + java p11 test failure with absolute paths. we do. it have any active developers in or community on windows so it is hard to assist.

Please try with a supported version.

Jody

···


Jody Garnett

Hi Jody,

Thanks for the quick response.

I’ve tried it on GeoServer 2.22.4 and 2.23.2 with similar failed results. See below.

We are currently running GeoServer 2.21.4 and planning to upgrade towards the end of the year. We are doing one major component upgrade at a time. Our first upgrade is going from Java 8 to Java 11.

Tung

GeoServer 2.22.4

"{"WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"geoserver.war\".undertow-deployment" => "java.lang.RuntimeException: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘gwcCatalogConfiguration’ defined in URL [vfs:/C:/Program%20Files/NN/jboss/bin/content/geoserver.war/WEB-INF/lib/gs-gwc-2.22.4.jar/geowebcache-geoserver-context.xml]: Invocation of init method failed; nested exception is java.security.AccessControlException: WFSM000001: Permission check failed (permission \"(\"java.io.FilePermission\" \"F:\\NN\\gis\\geoserver\\external\\gwc-layers\" \"read\")\" in code source \"null\" of \"null\")

Caused by: java.lang.RuntimeException: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘gwcCatalogConfiguration’ defined in URL [vfs:/C:/Program%20Files/NN/jboss/bin/content/geoserver.war/WEB-INF/lib/gs-gwc-2.22.4.jar/geowebcache-geoserver-context.xml]: Invocation of init method failed; nested exception is java.security.AccessControlException: WFSM000001: Permission check failed (permission \"(\"java.io.FilePermission\" \"F:\\NN\\gis\\geoserver\\external\\gwc-layers\" \"read\")\" in code source \"null\" of \"null\")

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘gwcCatalogConfiguration’ defined in URL [vfs:/C:/Program%20Files/NN/jboss/bin/content/geoserver.war/WEB-INF/lib/gs-gwc-2.22.4.jar/geowebcache-geoserver-context.xml]: Invocation of init method failed; nested exception is java.security.AccessControlException: WFSM000001: Permission check failed (permission \"(\"java.io.FilePermission\" \"F:\\NN\\gis\\geoserver\\external\\gwc-layers\" \"read\")\" in code source \"null\" of \"null\")

Caused by: java.security.AccessControlException: WFSM000001: Permission check failed (permission \"(\"java.io.FilePermission\" \"F:\\NN\\gis\\geoserver\\external\\gwc-layers\" \"read\")\" in code source \"null\" of \"null\")"}}"

GeoServer 2.23.2

"{"WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"geoserver.war\".undertow-deployment" => "java.lang.RuntimeException: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘gwcCatalogConfiguration’ defined in URL [vfs:/C:/Program%20Files/NN/jboss/bin/content/geoserver.war/WEB-INF/lib/gs-gwc-2.23.2.jar/geowebcache-geoserver-context.xml]: Invocation of init method failed; nested exception is java.security.AccessControlException: WFSM000001: Permission check failed (permission \"(\"java.io.FilePermission\" \"F:\\NN\\gis\\geoserver\\external\\gwc-layers\" \"read\")\" in code source \"null\" of \"null\")

Caused by: java.lang.RuntimeException: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘gwcCatalogConfiguration’ defined in URL [vfs:/C:/Program%20Files/NN/jboss/bin/content/geoserver.war/WEB-INF/lib/gs-gwc-2.23.2.jar/geowebcache-geoserver-context.xml]: Invocation of init method failed; nested exception is java.security.AccessControlException: WFSM000001: Permission check failed (permission \"(\"java.io.FilePermission\" \"F:\\NN\\gis\\geoserver\\external\\gwc-layers\" \"read\")\" in code source \"null\" of \"null\")

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘gwcCatalogConfiguration’ defined in URL [vfs:/C:/Program%20Files/NN/jboss/bin/content/geoserver.war/WEB-INF/lib/gs-gwc-2.23.2.jar/geowebcache-geoserver-context.xml]: Invocation of init method failed; nested exception is java.security.AccessControlException: WFSM000001: Permission check failed (permission \"(\"java.io.FilePermission\" \"F:\\NN\\gis\\geoserver\\external\\gwc-layers\" \"read\")\" in code source \"null\" of \"null\")

Caused by: java.security.AccessControlException: WFSM000001: Permission check failed (permission \"(\"java.io.FilePermission\" \"F:\\NN\\gis\\geoserver\\external\\gwc-layers\" \"read\")\" in code source \"null\" of \"null\")"}}"

···

From: Jody Garnett <jody.garnett@…84…>
Sent: Wednesday, August 16, 2023 7:23 AM
To: Pham, Tung M <Tung.Pham@…1196…>
Cc: geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] Geoserver 2.21.4 not deploying with Security Manager on JBoss EAP 7.4.9 when upgrading from Java 8 to Java 11



[External: Use caution with links & attachments]

GeoServer 2.21 reached end of life earlier this year, you may wish to try an active version.

We did fix some windows + java p11 test failure with absolute paths. we do. it have any active developers in or community on windows so it is hard to assist.

Please try with a supported version.

Jody

On Wed, Aug 16, 2023 at 7:05 AM Pham, Tung M via Geoserver-users <geoserver-users@lists.sourceforge.net> wrote:

I am trying to deploy GeoServer 2.21.4 in JBoss EAP 7.4.9 with Java 11. The GeoServer application fails to deploy when Java Security Manager is turned on.

I have been using the same Geoserver/JBoss versions on Java 8 successfully with Java Security Manager turned on with the following environament:

Java 8 environament:

Oracle JRE 1.8.0_351

JBoss EAP 7.4.9

GeoServer 2.21.4

Windows 10

With Java Security Manager turned on. (set “SECMGR=true” in JBoss’ standalone.conf.bat)

  • GeoServer successfully deploys with the following configuration set in JBoss’ standalone.xml file in the security-manager subsystem section.

Java 11 environament:

Oracle JRE 11.0.20

JBoss EAP 7.4.9

GeoServer 2.21.4

Windows 10

With Java Security Manager turned on. (set “SECMGR=true” in JBoss’ standalone.conf.bat)

  • GeoServer failed to deploy with the following configuration set in JBoss’ standalone.xml file in the security-manager subsystem section. (Same setting used with Java 8)

Error Log:

"{"WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"geoserver.war\".undertow-deployment" => "java.lang.RuntimeException: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘gwcCatalogConfiguration’ defined in URL [vfs:/C:/Program%20Files/NN/jboss/bin/content/geoserver.war/WEB-INF/lib/gs-gwc-2.21.4.jar/geowebcache-geoserver-context.xml]: Invocation of init method failed; nested exception is java.security.AccessControlException: WFSM000001: Permission check failed (permission \"(\"java.io.FilePermission\" \"F:\\NN\\gis\\geoserver\\external\\gwc-layers\" \"read\")\" in code source \"null\" of \"null\")

Caused by: java.lang.RuntimeException: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘gwcCatalogConfiguration’ defined in URL [vfs:/C:/Program%20Files/NN/jboss/bin/content/geoserver.war/WEB-INF/lib/gs-gwc-2.21.4.jar/geowebcache-geoserver-context.xml]: Invocation of init method failed; nested exception is java.security.AccessControlException: WFSM000001: Permission check failed (permission \"(\"java.io.FilePermission\" \"F:\\NN\\gis\\geoserver\\external\\gwc-layers\" \"read\")\" in code source \"null\" of \"null\")

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘gwcCatalogConfiguration’ defined in URL [vfs:/C:/Program%20Files/NN/jboss/bin/content/geoserver.war/WEB-INF/lib/gs-gwc-2.21.4.jar/geowebcache-geoserver-context.xml]: Invocation of init method failed; nested exception is java.security.AccessControlException: WFSM000001: Permission check failed (permission \"(\"java.io.FilePermission\" \"F:\\NN\\gis\\geoserver\\external\\gwc-layers\" \"read\")\" in code source \"null\" of \"null\")

Caused by: java.security.AccessControlException: WFSM000001: Permission check failed (permission \"(\"java.io.FilePermission\" \"F:\\NN\\gis\\geoserver\\external\\gwc-layers\" \"read\")\" in code source \"null\" of \"null\")"}}"

-Modified the standalone.xml to individual permissions for

Failed results are similar compared to the previous configuration using only for

Error Log:

"{"WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"geoserver.war\".undertow-deployment" => "java.lang.RuntimeException: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘gwcCatalogConfiguration’ defined in URL [vfs:/C:/Program%20Files/NN/jboss/bin/content/geoserver.war/WEB-INF/lib/gs-gwc-2.21.4.jar/geowebcache-geoserver-context.xml]: Invocation of init method failed; nested exception is java.security.AccessControlException: WFSM000001: Permission check failed (permission \"(\"java.io.FilePermission\" \"F:\\NN\\gis\\geoserver\\external\\gwc-layers\" \"read\")\" in code source \"null\" of \"null\")

Caused by: java.lang.RuntimeException: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘gwcCatalogConfiguration’ defined in URL [vfs:/C:/Program%20Files/NN/jboss/bin/content/geoserver.war/WEB-INF/lib/gs-gwc-2.21.4.jar/geowebcache-geoserver-context.xml]: Invocation of init method failed; nested exception is java.security.AccessControlException: WFSM000001: Permission check failed (permission \"(\"java.io.FilePermission\" \"F:\\NN\\gis\\geoserver\\external\\gwc-layers\" \"read\")\" in code source \"null\" of \"null\")

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘gwcCatalogConfiguration’ defined in URL [vfs:/C:/Program%20Files/NN/jboss/bin/content/geoserver.war/WEB-INF/lib/gs-gwc-2.21.4.jar/geowebcache-geoserver-context.xml]: Invocation of init method failed; nested exception is java.security.AccessControlException: WFSM000001: Permission check failed (permission \"(\"java.io.FilePermission\" \"F:\\NN\\gis\\geoserver\\external\\gwc-layers\" \"read\")\" in code source \"null\" of \"null\")

Caused by: java.security.AccessControlException: WFSM000001: Permission check failed (permission \"(\"java.io.FilePermission\" \"F:\\NN\\gis\\geoserver\\external\\gwc-layers\" \"read\")\" in code source \"null\" of \"null\")"}}"

Any help would be much appreciated.

Tung Pham


Geoserver-users mailing list

Please make sure you read the following two resources before posting to this list:

If you want to request a feature or an improvement, also see this: https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer

Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Jody Garnett

Thanks for checking on a supported version; too bad the recent geoserver path fixes did not help. I notice that the error is coming from GeoWebCache (available as a standalone application or as library like GeoServer uses).

You could also try increasing the logging information (you can do so by editing the data directory files prior to launch) in the hopes of seeing what exactly was trying to access F:\NN\gis\geoserver\external]gwc-layers

The issue is here GEOS-10804 - windows Java 11 changed, causing problems in the difference between between:
F:NN\gis\geoserver\external]gwc-layers (relative folder)

F:\NN\gis\geoserver\external]gwc-layers (absolute path)

Please double check your JBoss configuration (I guess). You may wish to check if JBoss had any guidance on paths when switching from Java 8 to Java 11?

If you have access to a development environment and are comfortable with Java coding you may be able to learn more in a debugger.

You are the first person to report back on Java 11 / Windows / JBoss security-manager issues:

  • You do have enough information in this email thread to report the issue to the issue tracker
  • As JBoss is a commercial environment it is not something the developer community can test easily - and is usually left to the different commercial support options available for GeoServer.
···


Jody Garnett