[Geoserver-users] GeoServer >=2.11 not starting with SecurityManager on Tomcat

Hi,

we have to use GeoServer with enabled SecurityManager and had no problem with this including GeoServer Version 2.10.

Since version 2.11 in this situation geoserver startup fails. Logging entries let us suppose there is a wrong configuration in catalina.policy

But this would be the right (and it works with geoserver 2.10):

permission java.io.FilePermission “${catalina.base}/-”, “read,write,delete”;

and even

the same with “<>” makes no difference.

An interesting fact is: When starting the first time with an geoserver.war without an datadir, geoserver starts normal, creates the default datadir with an default content. But after an restart – then datadir is already here – geoserver will not come up again with the following log messages. There is mentioned a file named “… simple_roads.xml.xml” – but I suppose, the double “.xml.xml” is a wrong logging information. Of course I tryed with renamed file.

When not using the SecurityManager there is no problem…

Has anyone an idea how to get this work?

Regards,

Stefan

Tomcat 8.0.41

Java 1.8.0_111

Windows 7

GeoServer 2.11…, 2.12… (tested geoserver out of the box without own configurations)

from catalina log:

SCHWERWIEGEND [localhost-startStop-1] org.apache.catalina.core.StandardContext.startInternal Context [/geoserver2-12-1] startup failed due to previous errors

from localhost.log:

SCHWERWIEGEND [localhost-startStop-1] org.apache.catalina.core.StandardContext.listenerStart Exception sending context initialized event to listener instance of class org.geoserver.platform.GeoServerContextLoaderListener

org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘GWCGeoServerRESTConfigurationProvider’ defined in URL [jar:file:/Q:/Programme2/Apache%20Software%20Foundation/Tomcat%208.0/webapps/geoserver2-12-1/WEB-INF/lib/gs-gwc-2.12.1.jar!/geowebcache-geoserver-context.xml]: Cannot resolve reference to bean ‘catalog’ while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘localWorkspaceCatalog’ defined in URL [jar:file:/Q:/Programme2/Apache%20Software%20Foundation/Tomcat%208.0/webapps/geoserver2-12-1/WEB-INF/lib/gs-main-2.12.1.jar!/applicationContext.xml]: Cannot resolve reference to bean ‘advertisedCatalog’ while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘advertisedCatalog’ defined in URL [jar:file:/Q:/Programme2/Apache%20Software%20Foundation/Tomcat%208.0/webapps/geoserver2-12-1/WEB-INF/lib/gs-main-2.12.1.jar!/applicationContext.xml]: Cannot resolve reference to bean ‘secureCatalog’ while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘accessRulesDao’ defined in URL [jar:file:/Q:/Programme2/Apache%20Software%20Foundation/Tomcat%208.0/webapps/geoserver2-12-1/WEB-INF/lib/gs-main-2.12.1.jar!/applicationSecurityContext.xml]: Cannot resolve reference to bean ‘rawCatalog’ while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘rawCatalog’ defined in URL [jar:file:/Q:/Programme2/Apache%20Software%20Foundation/Tomcat%208.0/webapps/geoserver2-12-1/WEB-INF/lib/gs-main-2.12.1.jar!/applicationContext.xml]: Initialization of bean failed; nested exception is java.lang.RuntimeException: java.security.AccessControlException: access denied (“java.io.FilePermission” “Q:\Programme2\Apache Software Foundation\Tomcat 8.0\webapps\geoserver2-12-1\data\styles\simple_roads.xml.xml” “read”)

at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:359)

at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:108)

at org.springframework.beans.factory.support.ConstructorResolver.resolveConstructorArguments(ConstructorResolver.java:648)

at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:145)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1193)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1095)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:513)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)

at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)

at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)

at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)

at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)

at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:761)

at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:866)

at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:542)

at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:443)

at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:325)

at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:107)

at org.geoserver.platform.GeoServerContextLoaderListener.contextInitialized(GeoServerContextLoaderListener.java:23)

at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4853)

at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5314)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)

at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:753)

at org.apache.catalina.core.ContainerBase.access$000(ContainerBase.java:131)

at org.apache.catalina.core.ContainerBase$PrivilegedAddChild.run(ContainerBase.java:153)

at org.apache.catalina.core.ContainerBase$PrivilegedAddChild.run(ContainerBase.java:143)

at java.security.AccessController.doPrivileged(Native Method)

at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:727)

at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)

at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:940)

at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1816)

at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)

at java.util.concurrent.FutureTask.run(Unknown Source)

at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

at java.lang.Thread.run(Unknown Source)

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘localWorkspaceCatalog’ defined in URL [jar:file:/Q:/Programme2/Apache%20Software%20Foundation/Tomcat%208.0/webapps/geoserver2-12-1/WEB-INF/lib/gs-main-2.12.1.jar!/applicationContext.xml]: Cannot resolve reference to bean ‘advertisedCatalog’ while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘advertisedCatalog’ defined in URL [jar:file:/Q:/Programme2/Apache%20Software%20Foundation/Tomcat%208.0/webapps/geoserver2-12-1/WEB-INF/lib/gs-main-2.12.1.jar!/applicationContext.xml]: Cannot resolve reference to bean ‘secureCatalog’ while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘accessRulesDao’ defined in URL [jar:file:/Q:/Programme2/Apache%20Software%20Foundation/Tomcat%208.0/webapps/geoserver2-12-1/WEB-INF/lib/gs-main-2.12.1.jar!/applicationSecurityContext.xml]: Cannot resolve reference to bean ‘rawCatalog’ while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘rawCatalog’ defined in URL [jar:file:/Q:/Programme2/Apache%20Software%20Foundation/Tomcat%208.0/webapps/geoserver2-12-1/WEB-INF/lib/gs-main-2.12.1.jar!/applicationContext.xml]: Initialization of bean failed; nested exception is java.lang.RuntimeException: java.security.AccessControlException: access denied (“java.io.FilePermission” “Q:\Programme2\Apache Software Foundation\Tomcat 8.0\webapps\geoserver2-12-1\data\styles\simple_roads.xml.xml” “read”)

at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:359)

at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:108)

at org.springframework.beans.factory.support.ConstructorResolver.resolveConstructorArguments(ConstructorResolver.java:648)

at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:145)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1193)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1095)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:513)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)

at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)

at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)

at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)

at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)

at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:351)

… 35 more

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘advertisedCatalog’ defined in URL [jar:file:/Q:/Programme2/Apache%20Software%20Foundation/Tomcat%208.0/webapps/geoserver2-12-1/WEB-INF/lib/gs-main-2.12.1.jar!/applicationContext.xml]: Cannot resolve reference to bean ‘secureCatalog’ while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘accessRulesDao’ defined in URL [jar:file:/Q:/Programme2/Apache%20Software%20Foundation/Tomcat%208.0/webapps/geoserver2-12-1/WEB-INF/lib/gs-main-2.12.1.jar!/applicationSecurityContext.xml]: Cannot resolve reference to bean ‘rawCatalog’ while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘rawCatalog’ defined in URL [jar:file:/Q:/Programme2/Apache%20Software%20Foundation/Tomcat%208.0/webapps/geoserver2-12-1/WEB-INF/lib/gs-main-2.12.1.jar!/applicationContext.xml]: Initialization of bean failed; nested exception is java.lang.RuntimeException: java.security.AccessControlException: access denied (“java.io.FilePermission” “Q:\Programme2\Apache Software Foundation\Tomcat 8.0\webapps\geoserver2-12-1\data\styles\simple_roads.xml.xml” “read”)

at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:359)

at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:108)

at org.springframework.beans.factory.support.ConstructorResolver.resolveConstructorArguments(ConstructorResolver.java:648)

at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:145)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1193)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1095)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:513)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)

at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)

at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)

at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)

at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)

at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:351)

… 47 more

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘accessRulesDao’ defined in URL [jar:file:/Q:/Programme2/Apache%20Software%20Foundation/Tomcat%208.0/webapps/geoserver2-12-1/WEB-INF/lib/gs-main-2.12.1.jar!/applicationSecurityContext.xml]: Cannot resolve reference to bean ‘rawCatalog’ while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘rawCatalog’ defined in URL [jar:file:/Q:/Programme2/Apache%20Software%20Foundation/Tomcat%208.0/webapps/geoserver2-12-1/WEB-INF/lib/gs-main-2.12.1.jar!/applicationContext.xml]: Initialization of bean failed; nested exception is java.lang.RuntimeException: java.security.AccessControlException: access denied (“java.io.FilePermission” “Q:\Programme2\Apache Software Foundation\Tomcat 8.0\webapps\geoserver2-12-1\data\styles\simple_roads.xml.xml” “read”)

at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:359)

at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:108)

at org.springframework.beans.factory.support.ConstructorResolver.resolveConstructorArguments(ConstructorResolver.java:648)

at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:145)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1193)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1095)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:513)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)

at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)

at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)

at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)

at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)

at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:296)

at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)

at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:351)

… 59 more

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘rawCatalog’ defined in URL [jar:file:/Q:/Programme2/Apache%20Software%20Foundation/Tomcat%208.0/webapps/geoserver2-12-1/WEB-INF/lib/gs-main-2.12.1.jar!/applicationContext.xml]: Initialization of bean failed; nested exception is java.lang.RuntimeException: java.security.AccessControlException: access denied (“java.io.FilePermission” “Q:\Programme2\Apache Software Foundation\Tomcat 8.0\webapps\geoserver2-12-1\data\styles\simple_roads.xml.xml” “read”)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:564)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)

at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)

at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)

at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)

at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)

at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:351)

… 73 more

Caused by: java.lang.RuntimeException: java.security.AccessControlException: access denied (“java.io.FilePermission” “Q:\Programme2\Apache Software Foundation\Tomcat 8.0\webapps\geoserver2-12-1\data\styles\simple_roads.xml.xml” “read”)

at org.geoserver.config.GeoServerLoader.postProcessBeforeInitialization(GeoServerLoader.java:270)

at org.geoserver.config.GeoServerLoaderProxy.postProcessBeforeInitialization(GeoServerLoaderProxy.java:59)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:409)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1620)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:555)

… 79 more

Caused by: java.security.AccessControlException: access denied (“java.io.FilePermission” “Q:\Programme2\Apache Software Foundation\Tomcat 8.0\webapps\geoserver2-12-1\data\styles\simple_roads.xml.xml” “read”)

at java.security.AccessControlContext.checkPermission(Unknown Source)

at java.security.AccessController.checkPermission(Unknown Source)

at java.lang.SecurityManager.checkPermission(Unknown Source)

at java.lang.SecurityManager.checkRead(Unknown Source)

at sun.nio.fs.WindowsPath.checkRead(Unknown Source)

at sun.nio.fs.WindowsFileAttributeViews$Basic.readAttributes(Unknown Source)

at sun.nio.fs.WindowsFileAttributeViews$Basic.readAttributes(Unknown Source)

at sun.nio.fs.WindowsFileSystemProvider.readAttributes(Unknown Source)

at java.nio.file.Files.readAttributes(Unknown Source)

at org.geoserver.platform.resource.FileSystemResourceStore$FileSystemResource.getType(FileSystemResourceStore.java:434)

at org.geoserver.platform.resource.Resources.exists(Resources.java:52)

at org.geoserver.config.GeoServerLoader.lambda$loadStyles$2(GeoServerLoader.java:872)

at org.geoserver.config.AsynchResourceIterator.lambda$new$0(AsynchResourceIterator.java:97)

at java.util.stream.ReferencePipeline$2$1.accept(Unknown Source)

at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(Unknown Source)

at java.util.stream.AbstractPipeline.copyInto(Unknown Source)

at java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)

at java.util.stream.ReduceOps$ReduceTask.doLeaf(Unknown Source)

at java.util.stream.ReduceOps$ReduceTask.doLeaf(Unknown Source)

at java.util.stream.AbstractTask.compute(Unknown Source)

at java.util.concurrent.CountedCompleter.exec(Unknown Source)

at java.util.concurrent.ForkJoinTask.doExec(Unknown Source)

at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(Unknown Source)

at java.util.concurrent.ForkJoinPool.runWorker(Unknown Source)

at java.util.concurrent.ForkJoinWorkerThread.run(Unknown Source)

Do you have the lines from your catalina.policy with respect to file access?

java.lang.RuntimeException: java.security.AccessControlException: access denied (“java.io.FilePermission” “Q:\Programme2\Apache Software Foundation\Tomcat 8.0\webapps\geoserver2-12-1\data\styles\simple_roads.xml.xml” “read”)

I assume that would be covered by “${catalina.base}/-”, are you sure it should not be “${catalina.base}*/-” ?

···

On 24 January 2018 at 07:40, <Stefan.Mueller@anonymised.com> wrote:

Hi,

we have to use GeoServer with enabled SecurityManager and had no problem with this including GeoServer Version 2.10.

Since version 2.11 in this situation geoserver startup fails. Logging entries let us suppose there is a wrong configuration in catalina.policy

But this would be the right (and it works with geoserver 2.10):

permission java.io.FilePermission “${catalina.base}/-”, “read,write,delete”;

and even

the same with “<>” makes no difference.

An interesting fact is: When starting the first time with an geoserver.war without an datadir, geoserver starts normal, creates the default datadir with an default content. But after an restart – then datadir is already here – geoserver will not come up again with the following log messages. There is mentioned a file named “… simple_roads.xml.xml” – but I suppose, the double “.xml.xml” is a wrong logging information. Of course I tryed with renamed file.

When not using the SecurityManager there is no problem…

Has anyone an idea how to get this work?

Regards,

Stefan

Tomcat 8.0.41

Java 1.8.0_111

Windows 7

GeoServer 2.11…, 2.12… (tested geoserver out of the box without own configurations)

from catalina log:

SCHWERWIEGEND [localhost-startStop-1] org.apache.catalina.core.StandardContext.startInternal Context [/geoserver2-12-1] startup failed due to previous errors

from localhost.log:

SCHWERWIEGEND [localhost-startStop-1] org.apache.catalina.core.StandardContext.listenerStart Exception sending context initialized event to listener instance of class org.geoserver.platform.GeoServerContextLoaderListener

org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘GWCGeoServerRESTConfigurationProvider’ defined in URL [jar:file:/Q:/Programme2/Apache%20Software%20Foundation/Tomcat%208.0/webapps/geoserver2-12-1/WEB-INF/lib/gs-gwc-2.12.1.jar!/geowebcache-geoserver-context.xml]: Cannot resolve reference to bean ‘catalog’ while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘localWorkspaceCatalog’ defined in URL [jar:file:/Q:/Programme2/Apache%20Software%20Foundation/Tomcat%208.0/webapps/geoserver2-12-1/WEB-INF/lib/gs-main-2.12.1.jar!/applicationContext.xml]: Cannot resolve reference to bean ‘advertisedCatalog’ while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘advertisedCatalog’ defined in URL [jar:file:/Q:/Programme2/Apache%20Software%20Foundation/Tomcat%208.0/webapps/geoserver2-12-1/WEB-INF/lib/gs-main-2.12.1.jar!/applicationContext.xml]: Cannot resolve reference to bean ‘secureCatalog’ while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘accessRulesDao’ defined in URL [jar:file:/Q:/Programme2/Apache%20Software%20Foundation/Tomcat%208.0/webapps/geoserver2-12-1/WEB-INF/lib/gs-main-2.12.1.jar!/applicationSecurityContext.xml]: Cannot resolve reference to bean ‘rawCatalog’ while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘rawCatalog’ defined in URL [jar:file:/Q:/Programme2/Apache%20Software%20Foundation/Tomcat%208.0/webapps/geoserver2-12-1/WEB-INF/lib/gs-main-2.12.1.jar!/applicationContext.xml]: Initialization of bean failed; nested exception is java.lang.RuntimeException: java.security.AccessControlException: access denied (“java.io.FilePermission” “Q:\Programme2\Apache Software Foundation\Tomcat 8.0\webapps\geoserver2-12-1\data\styles\simple_roads.xml.xml” “read”)

at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:359)

at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:108)

at org.springframework.beans.factory.support.ConstructorResolver.resolveConstructorArguments(ConstructorResolver.java:648)

at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:145)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1193)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1095)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:513)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)

at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)

at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)

at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)

at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)

at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:761)

at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:866)

at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:542)

at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:443)

at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:325)

at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:107)

at org.geoserver.platform.GeoServerContextLoaderListener.contextInitialized(GeoServerContextLoaderListener.java:23)

at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4853)

at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5314)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)

at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:753)

at org.apache.catalina.core.ContainerBase.access$000(ContainerBase.java:131)

at org.apache.catalina.core.ContainerBase$PrivilegedAddChild.run(ContainerBase.java:153)

at org.apache.catalina.core.ContainerBase$PrivilegedAddChild.run(ContainerBase.java:143)

at java.security.AccessController.doPrivileged(Native Method)

at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:727)

at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)

at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:940)

at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1816)

at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)

at java.util.concurrent.FutureTask.run(Unknown Source)

at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

at java.lang.Thread.run(Unknown Source)

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘localWorkspaceCatalog’ defined in URL [jar:file:/Q:/Programme2/Apache%20Software%20Foundation/Tomcat%208.0/webapps/geoserver2-12-1/WEB-INF/lib/gs-main-2.12.1.jar!/applicationContext.xml]: Cannot resolve reference to bean ‘advertisedCatalog’ while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘advertisedCatalog’ defined in URL [jar:file:/Q:/Programme2/Apache%20Software%20Foundation/Tomcat%208.0/webapps/geoserver2-12-1/WEB-INF/lib/gs-main-2.12.1.jar!/applicationContext.xml]: Cannot resolve reference to bean ‘secureCatalog’ while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘accessRulesDao’ defined in URL [jar:file:/Q:/Programme2/Apache%20Software%20Foundation/Tomcat%208.0/webapps/geoserver2-12-1/WEB-INF/lib/gs-main-2.12.1.jar!/applicationSecurityContext.xml]: Cannot resolve reference to bean ‘rawCatalog’ while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘rawCatalog’ defined in URL [jar:file:/Q:/Programme2/Apache%20Software%20Foundation/Tomcat%208.0/webapps/geoserver2-12-1/WEB-INF/lib/gs-main-2.12.1.jar!/applicationContext.xml]: Initialization of bean failed; nested exception is java.lang.RuntimeException: java.security.AccessControlException: access denied (“java.io.FilePermission” “Q:\Programme2\Apache Software Foundation\Tomcat 8.0\webapps\geoserver2-12-1\data\styles\simple_roads.xml.xml” “read”)

at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:359)

at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:108)

at org.springframework.beans.factory.support.ConstructorResolver.resolveConstructorArguments(ConstructorResolver.java:648)

at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:145)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1193)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1095)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:513)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)

at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)

at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)

at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)

at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)

at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:351)

… 35 more

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘advertisedCatalog’ defined in URL [jar:file:/Q:/Programme2/Apache%20Software%20Foundation/Tomcat%208.0/webapps/geoserver2-12-1/WEB-INF/lib/gs-main-2.12.1.jar!/applicationContext.xml]: Cannot resolve reference to bean ‘secureCatalog’ while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘accessRulesDao’ defined in URL [jar:file:/Q:/Programme2/Apache%20Software%20Foundation/Tomcat%208.0/webapps/geoserver2-12-1/WEB-INF/lib/gs-main-2.12.1.jar!/applicationSecurityContext.xml]: Cannot resolve reference to bean ‘rawCatalog’ while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘rawCatalog’ defined in URL [jar:file:/Q:/Programme2/Apache%20Software%20Foundation/Tomcat%208.0/webapps/geoserver2-12-1/WEB-INF/lib/gs-main-2.12.1.jar!/applicationContext.xml]: Initialization of bean failed; nested exception is java.lang.RuntimeException: java.security.AccessControlException: access denied (“java.io.FilePermission” “Q:\Programme2\Apache Software Foundation\Tomcat 8.0\webapps\geoserver2-12-1\data\styles\simple_roads.xml.xml” “read”)

at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:359)

at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:108)

at org.springframework.beans.factory.support.ConstructorResolver.resolveConstructorArguments(ConstructorResolver.java:648)

at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:145)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1193)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1095)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:513)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)

at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)

at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)

at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)

at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)

at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:351)

… 47 more

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘accessRulesDao’ defined in URL [jar:file:/Q:/Programme2/Apache%20Software%20Foundation/Tomcat%208.0/webapps/geoserver2-12-1/WEB-INF/lib/gs-main-2.12.1.jar!/applicationSecurityContext.xml]: Cannot resolve reference to bean ‘rawCatalog’ while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘rawCatalog’ defined in URL [jar:file:/Q:/Programme2/Apache%20Software%20Foundation/Tomcat%208.0/webapps/geoserver2-12-1/WEB-INF/lib/gs-main-2.12.1.jar!/applicationContext.xml]: Initialization of bean failed; nested exception is java.lang.RuntimeException: java.security.AccessControlException: access denied (“java.io.FilePermission” “Q:\Programme2\Apache Software Foundation\Tomcat 8.0\webapps\geoserver2-12-1\data\styles\simple_roads.xml.xml” “read”)

at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:359)

at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:108)

at org.springframework.beans.factory.support.ConstructorResolver.resolveConstructorArguments(ConstructorResolver.java:648)

at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:145)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1193)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1095)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:513)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)

at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)

at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)

at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)

at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)

at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:296)

at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)

at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:351)

… 59 more

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘rawCatalog’ defined in URL [jar:file:/Q:/Programme2/Apache%20Software%20Foundation/Tomcat%208.0/webapps/geoserver2-12-1/WEB-INF/lib/gs-main-2.12.1.jar!/applicationContext.xml]: Initialization of bean failed; nested exception is java.lang.RuntimeException: java.security.AccessControlException: access denied (“java.io.FilePermission” “Q:\Programme2\Apache Software Foundation\Tomcat 8.0\webapps\geoserver2-12-1\data\styles\simple_roads.xml.xml” “read”)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:564)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)

at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)

at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)

at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)

at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)

at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:351)

… 73 more

Caused by: java.lang.RuntimeException: java.security.AccessControlException: access denied (“java.io.FilePermission” “Q:\Programme2\Apache Software Foundation\Tomcat 8.0\webapps\geoserver2-12-1\data\styles\simple_roads.xml.xml” “read”)

at org.geoserver.config.GeoServerLoader.postProcessBeforeInitialization(GeoServerLoader.java:270)

at org.geoserver.config.GeoServerLoaderProxy.postProcessBeforeInitialization(GeoServerLoaderProxy.java:59)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:409)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1620)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:555)

… 79 more

Caused by: java.security.AccessControlException: access denied (“java.io.FilePermission” “Q:\Programme2\Apache Software Foundation\Tomcat 8.0\webapps\geoserver2-12-1\data\styles\simple_roads.xml.xml” “read”)

at java.security.AccessControlContext.checkPermission(Unknown Source)

at java.security.AccessController.checkPermission(Unknown Source)

at java.lang.SecurityManager.checkPermission(Unknown Source)

at java.lang.SecurityManager.checkRead(Unknown Source)

at sun.nio.fs.WindowsPath.checkRead(Unknown Source)

at sun.nio.fs.WindowsFileAttributeViews$Basic.readAttributes(Unknown Source)

at sun.nio.fs.WindowsFileAttributeViews$Basic.readAttributes(Unknown Source)

at sun.nio.fs.WindowsFileSystemProvider.readAttributes(Unknown Source)

at java.nio.file.Files.readAttributes(Unknown Source)

at org.geoserver.platform.resource.FileSystemResourceStore$FileSystemResource.getType(FileSystemResourceStore.java:434)

at org.geoserver.platform.resource.Resources.exists(Resources.java:52)

at org.geoserver.config.GeoServerLoader.lambda$loadStyles$2(GeoServerLoader.java:872)

at org.geoserver.config.AsynchResourceIterator.lambda$new$0(AsynchResourceIterator.java:97)

at java.util.stream.ReferencePipeline$2$1.accept(Unknown Source)

at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(Unknown Source)

at java.util.stream.AbstractPipeline.copyInto(Unknown Source)

at java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)

at java.util.stream.ReduceOps$ReduceTask.doLeaf(Unknown Source)

at java.util.stream.ReduceOps$ReduceTask.doLeaf(Unknown Source)

at java.util.stream.AbstractTask.compute(Unknown Source)

at java.util.concurrent.CountedCompleter.exec(Unknown Source)

at java.util.concurrent.ForkJoinTask.doExec(Unknown Source)

at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(Unknown Source)

at java.util.concurrent.ForkJoinPool.runWorker(Unknown Source)

at java.util.concurrent.ForkJoinWorkerThread.run(Unknown Source)


Check out the vibrant tech community on one of the world’s most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot


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@anonymised.com.382…sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users


Jody Garnett

Hi Jody,

thank you for your quick response!

I tried “${catalina.base}*/-” – but with no change of the behaviour.

Here the lines in my current catalina.policy concerning FileAccess:

// These permissions apply to javac

grant codeBase “file:${java.home}/lib/-” {

permission java.security.AllPermission;

};

// These permissions apply to all shared system extensions

grant codeBase “file:${java.home}/jre/lib/ext/-” {

permission java.security.AllPermission;

};

// Common-Classloader

grant codeBase “file:${catalina.home}/-”

{

permission java.security.AllPermission;

};

grant {

permission java.io.FilePermission “${catalina.base}/-”, “read,write,delete”;

permission java.io.FilePermission “${catalina.home}/lib/-”, “read”;

permission java.io.FilePermission “${java.home}/lib/-”, “read”;

}

regards,

Stefan

···

Do you have the lines from your catalina.policy with respect to file access?

java.lang.RuntimeException: java.security.AccessControlException: access denied (“java.io.FilePermission” “Q:\Programme2\Apache Software Foundation\Tomcat 8.0\webapps\geoserver2-12-1\data\styles\simple_roads.xml.xml” “read”)

I assume that would be covered by “${catalina.base}/-”, are you sure it should not be “${catalina.base}*/-” ?

Jody Garnett

On 24 January 2018 at 07:40, <Stefan.Mueller@…8671…> wrote:

Hi,

we have to use GeoServer with enabled SecurityManager and had no problem with this including GeoServer Version 2.10.

Since version 2.11 in this situation geoserver startup fails. Logging entries let us suppose there is a wrong configuration in catalina.policy

But this would be the right (and it works with geoserver 2.10):

permission java.io.FilePermission “${catalina.base}/-”, “read,write,delete”;

and even

the same with “<>” makes no difference.

An interesting fact is: When starting the first time with an geoserver.war without an datadir, geoserver starts normal, creates the default datadir with an default content. But after an restart – then datadir is already here – geoserver will not come up again with the following log messages. There is mentioned a file named “… simple_roads.xml.xml” – but I suppose, the double “.xml.xml” is a wrong logging information. Of course I tryed with renamed file.

When not using the SecurityManager there is no problem…

Has anyone an idea how to get this work?

Regards,

Stefan

Tomcat 8.0.41

Java 1.8.0_111

Windows 7

GeoServer 2.11…, 2.12… (tested geoserver out of the box without own configurations)

from catalina log:

SCHWERWIEGEND [localhost-startStop-1] org.apache.catalina.core.StandardContext.startInternal Context [/geoserver2-12-1] startup failed due to previous errors

from localhost.log:

SCHWERWIEGEND [localhost-startStop-1] org.apache.catalina.core.StandardContext.listenerStart Exception sending context initialized event to listener instance of class org.geoserver.platform.GeoServerContextLoaderListener

org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘GWCGeoServerRESTConfigurationProvider’ defined in URL [jar:file:/Q:/Programme2/Apache%20Software%20Foundation/Tomcat%208.0/webapps/geoserver2-12-1/WEB-INF/lib/gs-gwc-2.12.1.jar!/geowebcache-geoserver-context.xml]: Cannot resolve reference to bean ‘catalog’ while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘localWorkspaceCatalog’ defined in URL [jar:file:/Q:/Programme2/Apache%20Software%20Foundation/Tomcat%208.0/webapps/geoserver2-12-1/WEB-INF/lib/gs-main-2.12.1.jar!/applicationContext.xml]: Cannot resolve reference to bean ‘advertisedCatalog’ while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘advertisedCatalog’ defined in URL [jar:file:/Q:/Programme2/Apache%20Software%20Foundation/Tomcat%208.0/webapps/geoserver2-12-1/WEB-INF/lib/gs-main-2.12.1.jar!/applicationContext.xml]: Cannot resolve reference to bean ‘secureCatalog’ while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘accessRulesDao’ defined in URL [jar:file:/Q:/Programme2/Apache%20Software%20Foundation/Tomcat%208.0/webapps/geoserver2-12-1/WEB-INF/lib/gs-main-2.12.1.jar!/applicationSecurityContext.xml]: Cannot resolve reference to bean ‘rawCatalog’ while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘rawCatalog’ defined in URL [jar:file:/Q:/Programme2/Apache%20Software%20Foundation/Tomcat%208.0/webapps/geoserver2-12-1/WEB-INF/lib/gs-main-2.12.1.jar!/applicationContext.xml]: Initialization of bean failed; nested exception is java.lang.RuntimeException: java.security.AccessControlException: access denied (“java.io.FilePermission” “Q:\Programme2\Apache Software Foundation\Tomcat 8.0\webapps\geoserver2-12-1\data\styles\simple_roads.xml.xml” “read”)

at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:359)

at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:108)

at org.springframework.beans.factory.support.ConstructorResolver.resolveConstructorArguments(ConstructorResolver.java:648)

at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:145)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1193)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1095)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:513)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)

at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)

at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)

at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)

at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)

at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:761)

at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:866)

at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:542)

at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:443)

at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:325)

at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:107)

at org.geoserver.platform.GeoServerContextLoaderListener.contextInitialized(GeoServerContextLoaderListener.java:23)

at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4853)

at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5314)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)

at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:753)

at org.apache.catalina.core.ContainerBase.access$000(ContainerBase.java:131)

at org.apache.catalina.core.ContainerBase$PrivilegedAddChild.run(ContainerBase.java:153)

at org.apache.catalina.core.ContainerBase$PrivilegedAddChild.run(ContainerBase.java:143)

at java.security.AccessController.doPrivileged(Native Method)

at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:727)

at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)

at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:940)

at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1816)

at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)

at java.util.concurrent.FutureTask.run(Unknown Source)

at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

at java.lang.Thread.run(Unknown Source)

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘localWorkspaceCatalog’ defined in URL [jar:file:/Q:/Programme2/Apache%20Software%20Foundation/Tomcat%208.0/webapps/geoserver2-12-1/WEB-INF/lib/gs-main-2.12.1.jar!/applicationContext.xml]: Cannot resolve reference to bean ‘advertisedCatalog’ while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘advertisedCatalog’ defined in URL [jar:file:/Q:/Programme2/Apache%20Software%20Foundation/Tomcat%208.0/webapps/geoserver2-12-1/WEB-INF/lib/gs-main-2.12.1.jar!/applicationContext.xml]: Cannot resolve reference to bean ‘secureCatalog’ while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘accessRulesDao’ defined in URL [jar:file:/Q:/Programme2/Apache%20Software%20Foundation/Tomcat%208.0/webapps/geoserver2-12-1/WEB-INF/lib/gs-main-2.12.1.jar!/applicationSecurityContext.xml]: Cannot resolve reference to bean ‘rawCatalog’ while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘rawCatalog’ defined in URL [jar:file:/Q:/Programme2/Apache%20Software%20Foundation/Tomcat%208.0/webapps/geoserver2-12-1/WEB-INF/lib/gs-main-2.12.1.jar!/applicationContext.xml]: Initialization of bean failed; nested exception is java.lang.RuntimeException: java.security.AccessControlException: access denied (“java.io.FilePermission” “Q:\Programme2\Apache Software Foundation\Tomcat 8.0\webapps\geoserver2-12-1\data\styles\simple_roads.xml.xml” “read”)

at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:359)

at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:108)

at org.springframework.beans.factory.support.ConstructorResolver.resolveConstructorArguments(ConstructorResolver.java:648)

at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:145)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1193)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1095)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:513)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)

at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)

at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)

at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)

at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)

at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:351)

… 35 more

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘advertisedCatalog’ defined in URL [jar:file:/Q:/Programme2/Apache%20Software%20Foundation/Tomcat%208.0/webapps/geoserver2-12-1/WEB-INF/lib/gs-main-2.12.1.jar!/applicationContext.xml]: Cannot resolve reference to bean ‘secureCatalog’ while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘accessRulesDao’ defined in URL [jar:file:/Q:/Programme2/Apache%20Software%20Foundation/Tomcat%208.0/webapps/geoserver2-12-1/WEB-INF/lib/gs-main-2.12.1.jar!/applicationSecurityContext.xml]: Cannot resolve reference to bean ‘rawCatalog’ while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘rawCatalog’ defined in URL [jar:file:/Q:/Programme2/Apache%20Software%20Foundation/Tomcat%208.0/webapps/geoserver2-12-1/WEB-INF/lib/gs-main-2.12.1.jar!/applicationContext.xml]: Initialization of bean failed; nested exception is java.lang.RuntimeException: java.security.AccessControlException: access denied (“java.io.FilePermission” “Q:\Programme2\Apache Software Foundation\Tomcat 8.0\webapps\geoserver2-12-1\data\styles\simple_roads.xml.xml” “read”)

at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:359)

at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:108)

at org.springframework.beans.factory.support.ConstructorResolver.resolveConstructorArguments(ConstructorResolver.java:648)

at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:145)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1193)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1095)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:513)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)

at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)

at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)

at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)

at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)

at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:351)

… 47 more

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘accessRulesDao’ defined in URL [jar:file:/Q:/Programme2/Apache%20Software%20Foundation/Tomcat%208.0/webapps/geoserver2-12-1/WEB-INF/lib/gs-main-2.12.1.jar!/applicationSecurityContext.xml]: Cannot resolve reference to bean ‘rawCatalog’ while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘rawCatalog’ defined in URL [jar:file:/Q:/Programme2/Apache%20Software%20Foundation/Tomcat%208.0/webapps/geoserver2-12-1/WEB-INF/lib/gs-main-2.12.1.jar!/applicationContext.xml]: Initialization of bean failed; nested exception is java.lang.RuntimeException: java.security.AccessControlException: access denied (“java.io.FilePermission” “Q:\Programme2\Apache Software Foundation\Tomcat 8.0\webapps\geoserver2-12-1\data\styles\simple_roads.xml.xml” “read”)

at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:359)

at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:108)

at org.springframework.beans.factory.support.ConstructorResolver.resolveConstructorArguments(ConstructorResolver.java:648)

at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:145)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1193)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1095)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:513)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)

at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)

at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)

at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)

at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)

at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:296)

at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)

at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:351)

… 59 more

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘rawCatalog’ defined in URL [jar:file:/Q:/Programme2/Apache%20Software%20Foundation/Tomcat%208.0/webapps/geoserver2-12-1/WEB-INF/lib/gs-main-2.12.1.jar!/applicationContext.xml]: Initialization of bean failed; nested exception is java.lang.RuntimeException: java.security.AccessControlException: access denied (“java.io.FilePermission” “Q:\Programme2\Apache Software Foundation\Tomcat 8.0\webapps\geoserver2-12-1\data\styles\simple_roads.xml.xml” “read”)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:564)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)

at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)

at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)

at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)

at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)

at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:351)

… 73 more

Caused by: java.lang.RuntimeException: java.security.AccessControlException: access denied (“java.io.FilePermission” “Q:\Programme2\Apache Software Foundation\Tomcat 8.0\webapps\geoserver2-12-1\data\styles\simple_roads.xml.xml” “read”)

at org.geoserver.config.GeoServerLoader.postProcessBeforeInitialization(GeoServerLoader.java:270)

at org.geoserver.config.GeoServerLoaderProxy.postProcessBeforeInitialization(GeoServerLoaderProxy.java:59)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:409)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1620)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:555)

… 79 more

Caused by: java.security.AccessControlException: access denied (“java.io.FilePermission” “Q:\Programme2\Apache Software Foundation\Tomcat 8.0\webapps\geoserver2-12-1\data\styles\simple_roads.xml.xml” “read”)

at java.security.AccessControlContext.checkPermission(Unknown Source)

at java.security.AccessController.checkPermission(Unknown Source)

at java.lang.SecurityManager.checkPermission(Unknown Source)

at java.lang.SecurityManager.checkRead(Unknown Source)

at sun.nio.fs.WindowsPath.checkRead(Unknown Source)

at sun.nio.fs.WindowsFileAttributeViews$Basic.readAttributes(Unknown Source)

at sun.nio.fs.WindowsFileAttributeViews$Basic.readAttributes(Unknown Source)

at sun.nio.fs.WindowsFileSystemProvider.readAttributes(Unknown Source)

at java.nio.file.Files.readAttributes(Unknown Source)

at org.geoserver.platform.resource.FileSystemResourceStore$FileSystemResource.getType(FileSystemResourceStore.java:434)

at org.geoserver.platform.resource.Resources.exists(Resources.java:52)

at org.geoserver.config.GeoServerLoader.lambda$loadStyles$2(GeoServerLoader.java:872)

at org.geoserver.config.AsynchResourceIterator.lambda$new$0(AsynchResourceIterator.java:97)

at java.util.stream.ReferencePipeline$2$1.accept(Unknown Source)

at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(Unknown Source)

at java.util.stream.AbstractPipeline.copyInto(Unknown Source)

at java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)

at java.util.stream.ReduceOps$ReduceTask.doLeaf(Unknown Source)

at java.util.stream.ReduceOps$ReduceTask.doLeaf(Unknown Source)

at java.util.stream.AbstractTask.compute(Unknown Source)

at java.util.concurrent.CountedCompleter.exec(Unknown Source)

at java.util.concurrent.ForkJoinTask.doExec(Unknown Source)

at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(Unknown Source)

at java.util.concurrent.ForkJoinPool.runWorker(Unknown Source)

at java.util.concurrent.ForkJoinWorkerThread.run(Unknown Source)


Check out the vibrant tech community on one of the world’s most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot


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

Hi,
comments inline.

On Wed, Jan 24, 2018 at 4:40 PM, <Stefan.Mueller@anonymised.com> wrote:

Caused by: java.security.AccessControlException: access denied
("java.io.FilePermission" "Q:\Programme2\Apache Software Foundation\Tomcat
8.0\webapps\geoserver2-12-1\data\styles\simple_roads.xml.xml" "read")

            at java.security.AccessControlContext.checkPermission(Unknown
Source)

            at java.security.AccessController.checkPermission(Unknown
Source)

            at java.lang.SecurityManager.checkPermission(Unknown Source)

            at java.lang.SecurityManager.checkRead(Unknown Source)

            at sun.nio.fs.WindowsPath.checkRead(Unknown Source)

            at sun.nio.fs.WindowsFileAttributeViews$Basic.readAttributes(Unknown
Source)

            at sun.nio.fs.WindowsFileAttributeViews$Basic.readAttributes(Unknown
Source)

            at sun.nio.fs.WindowsFileSystemProvider.readAttributes(Unknown
Source)

            at java.nio.file.Files.readAttributes(Unknown Source)

            at org.geoserver.platform.resource.FileSystemResourceStore$
FileSystemResource.getType(FileSystemResourceStore.java:434)

            at org.geoserver.platform.resource.Resources.exists(
Resources.java:52)

            at org.geoserver.config.GeoServerLoader.lambda$
loadStyles$2(GeoServerLoader.java:872)

            at org.geoserver.config.AsynchResourceIterator.lambda$
new$0(AsynchResourceIterator.java:97)

            at java.util.stream.ReferencePipeline$2$1.accept(Unknown
Source)

This code section is new as of GeoServer 2.11, provides much faster data
directory load times (on Linux at least, where it was developed and tested,
no core
developers works on Windows anymore, the ones that do won't even make the
effort of keeping the build up an running):
https://github.com/geoserver/geoserver/wiki/GSIP-155
As usual we asked people to test the 2.11-beta release (11 months ago as of
now), none reported a similar problem.

I have vague memory on that check, it's not invalid logging but an actual
check for a .xml.xml file, it was already there in the
style loading code and was kept. However the way the code checks for its
existence changed, so maybe that's what's triggering
this issue, it may be that in a secured environment trying to access a non
existing file triggers an AccessControlException
instead of a NoSuchFileException that the code is ready to handle (checking
the file existence before accessing its attribute
would annihilate a significant chunk of the GSIP-155 speedup unfortunately,
that has already been tested).

While I don't believe any developer will setup a dev env on a Windows
machine with a secured tomcat just to check this issue, a blind fix
could be performed to also catch the security exception, and you could test
if that works or not off a nightly build?
I'd suggest you open a ticket here with details:
https://osgeo-org.atlassian.net/projects/GEOS/summary

Cheers
Andrea

==
GeoServer Professional Services from the experts! Visit http://goo.gl/it488V
for more information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via di Montramito 3/A
55054 Massarosa (LU)
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

AVVERTENZE AI SENSI DEL D.Lgs. 196/2003

Le informazioni contenute in questo messaggio di posta elettronica e/o
nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il
loro utilizzo è consentito esclusivamente al destinatario del messaggio,
per le finalità indicate nel messaggio stesso. Qualora riceviate questo
messaggio senza esserne il destinatario, Vi preghiamo cortesemente di
darcene notizia via e-mail e di procedere alla distruzione del messaggio
stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso,
divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od
utilizzarlo per finalità diverse, costituisce comportamento contrario ai
principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for
the attention and use of the named addressee(s) and may be confidential or
proprietary in nature or covered by the provisions of privacy act
(Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection
Code).Any use not in accord with its purpose, any disclosure, reproduction,
copying, distribution, or either dissemination, either whole or partial, is
strictly forbidden except previous formal approval of the named
addressee(s). If you are not the intended recipient, please contact
immediately the sender by telephone, fax or e-mail and delete the
information in this message that has been received in error. The sender
does not give any warranty or accept liability as the content, accuracy or
completeness of sent messages and accepts no responsibility for changes
made after they were sent or for other risks which arise as a result of
e-mail transmission, viruses, etc.

Hi Andrea,

thank you for this information!

So I will open a ticket.

Just for information how we run into this situation. We normally use Version 2.10 but we have a poor image quality on a new layer and the order to fix it quickly. We found out, that only a new GeoServer Version with an old JDBC Mosaic-Plugin here makes a good result – of course we know that this is nothing to keep an we will report this with all details – for our moment in hurry we tried to deploy our workaround. At this way we found out, that this is an issue of GeoServer without any plugin or configuration.

Our normal machines are running with linux and there we discovered the problem. But on my local windows machine I can reproduce the situation.

Thank you very much!

Regards,

Stefan

···

Hi,

comments inline.

On Wed, Jan 24, 2018 at 4:40 PM, <Stefan.Mueller@…8671…> wrote:

Caused by: java.security.AccessControlException: access denied (“java.io.FilePermission” “Q:\Programme2\Apache Software Foundation\Tomcat 8.0\webapps\geoserver2-12-1\data\styles\simple_roads.xml.xml” “read”)

at java.security.AccessControlContext.checkPermission(Unknown Source)

at java.security.AccessController.checkPermission(Unknown Source)

at java.lang.SecurityManager.checkPermission(Unknown Source)

at java.lang.SecurityManager.checkRead(Unknown Source)

at sun.nio.fs.WindowsPath.checkRead(Unknown Source)

at sun.nio.fs.WindowsFileAttributeViews$Basic.readAttributes(Unknown Source)

at sun.nio.fs.WindowsFileAttributeViews$Basic.readAttributes(Unknown Source)

at sun.nio.fs.WindowsFileSystemProvider.readAttributes(Unknown Source)

at java.nio.file.Files.readAttributes(Unknown Source)

at org.geoserver.platform.resource.FileSystemResourceStore$FileSystemResource.getType(FileSystemResourceStore.java:434)

at org.geoserver.platform.resource.Resources.exists(Resources.java:52)

at org.geoserver.config.GeoServerLoader.lambda$loadStyles$2(GeoServerLoader.java:872)

at org.geoserver.config.AsynchResourceIterator.lambda$new$0(AsynchResourceIterator.java:97)

at java.util.stream.ReferencePipeline$2$1.accept(Unknown Source)

This code section is new as of GeoServer 2.11, provides much faster data directory load times (on Linux at least, where it was developed and tested, no core

developers works on Windows anymore, the ones that do won’t even make the effort of keeping the build up an running):

https://github.com/geoserver/geoserver/wiki/GSIP-155

As usual we asked people to test the 2.11-beta release (11 months ago as of now), none reported a similar problem.

I have vague memory on that check, it’s not invalid logging but an actual check for a .xml.xml file, it was already there in the

style loading code and was kept. However the way the code checks for its existence changed, so maybe that’s what’s triggering

this issue, it may be that in a secured environment trying to access a non existing file triggers an AccessControlException

instead of a NoSuchFileException that the code is ready to handle (checking the file existence before accessing its attribute

would annihilate a significant chunk of the GSIP-155 speedup unfortunately, that has already been tested).

While I don’t believe any developer will setup a dev env on a Windows machine with a secured tomcat just to check this issue, a blind fix

could be performed to also catch the security exception, and you could test if that works or not off a nightly build?

I’d suggest you open a ticket here with details: https://osgeo-org.atlassian.net/projects/GEOS/summary

Cheers

Andrea

==
GeoServer Professional Services from the experts! Visit http://goo.gl/it488V for more information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via di Montramito 3/A
55054 Massarosa (LU)
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

AVVERTENZE AI SENSI DEL D.Lgs. 196/2003

Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo è consentito esclusivamente al destinatario del messaggio, per le finalità indicate nel messaggio stesso. Qualora riceviate questo messaggio senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail e di procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse, costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for the attention and use of the named addressee(s) and may be confidential or proprietary in nature or covered by the provisions of privacy act (Legislative Decree June, 30 2003, no.196 - Italy’s New Data Protection Code).Any use not in accord with its purpose, any disclosure, reproduction, copying, distribution, or either dissemination, either whole or partial, is strictly forbidden except previous formal approval of the named addressee(s). If you are not the intended recipient, please contact immediately the sender by telephone, fax or e-mail and delete the information in this message that has been received in error. The sender does not give any warranty or accept liability as the content, accuracy or completeness of sent messages and accepts no responsibility for changes made after they were sent or for other risks which arise as a result of e-mail transmission, viruses, etc.