Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Latest 2.6.x Geoserver Build Fails #1

Open
smesdaghi opened this issue Sep 11, 2015 · 2 comments
Open

Latest 2.6.x Geoserver Build Fails #1

smesdaghi opened this issue Sep 11, 2015 · 2 comments
Labels

Comments

@smesdaghi
Copy link
Member

when war is being loaded, it fails. It turns out to be related to the geonode extension due to a recent change in 2.6.x or one of its dependancies. disabling the ext by removing the complied classes for this extension and removing the corresponding files in the data folder will let geoserver load.

----------------- catalina.out
Sep 10, 2015 9:16:20 PM org.geoserver.platform.GeoServerExtensions extensions
WARNING: bean lookup error
java.lang.IllegalStateException: BeanFactory not initialized or already closed - call 'refresh' before accessing beans via the ApplicationContext
        at org.springframework.context.support.AbstractRefreshableApplicationContext.getBeanFactory(AbstractRefreshableApplicationContext.java:172)
        at org.springframework.context.support.AbstractApplicationContext.getBeanNamesForType(AbstractApplicationContext.java:1162)
        at org.geoserver.platform.GeoServerExtensions.extensions(GeoServerExtensions.java:135)
        at org.geoserver.platform.GeoServerExtensions.bean(GeoServerExtensions.java:321)
        at org.geoserver.platform.GeoServerExtensions.bean(GeoServerExtensions.java:304)
        at org.vfny.geoserver.crs.GeoserverWKTOperationFactory.getDefinitionsURL(GeoserverWKTOperationFactory.java:44)
        at org.geotools.referencing.factory.epsg.CoordinateOperationFactoryUsingWKT.createBackingStore(CoordinateOperationFactoryUsingWKT.java:178)
        at org.geotools.referencing.factory.DeferredAuthorityFactory.getBackingStore(DeferredAuthorityFactory.java:133)
        at org.geotools.referencing.factory.BufferedAuthorityFactory.isAvailable(BufferedAuthorityFactory.java:235)
        at org.geotools.referencing.factory.DeferredAuthorityFactory.isAvailable(DeferredAuthorityFactory.java:119)
        at org.geotools.factory.FactoryRegistry.isAvailable(FactoryRegistry.java:667)
        at org.geotools.factory.FactoryRegistry.isAcceptable(FactoryRegistry.java:501)
        at org.geotools.factory.FactoryRegistry$1.filter(FactoryRegistry.java:192)
        at javax.imageio.spi.FilterIterator.advance(ServiceRegistry.java:810)
        at javax.imageio.spi.FilterIterator.<init>(ServiceRegistry.java:804)
        at javax.imageio.spi.ServiceRegistry.getServiceProviders(ServiceRegistry.java:508)
        at org.geotools.factory.FactoryRegistry.getServiceProviders(FactoryRegistry.java:197)
        at org.geotools.referencing.ReferencingFactoryFinder.getFactories(ReferencingFactoryFinder.java:180)
        at org.geotools.referencing.ReferencingFactoryFinder.getCoordinateOperationAuthorityFactories(ReferencingFactoryFinder.java:489)
        at org.geoserver.GeoserverInitStartupListener.contextDestroyed(GeoserverInitStartupListener.java:250)
        at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:5014)
        at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5659)
        at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:160)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:632)
        at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1073)
        at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1857)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
        at java.util.concurrent.FutureTask.run(FutureTask.java:262)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
--------------- std err out:
Sep 11, 2015 7:55:18 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class org.geoserver.platform.GeoServerContextLoaderListener
org.springframework.beans.factory.BeanCreationException: Error occured reading security configuration; nested exception is java.lang.RuntimeException: Failed to initialize GeoNode settings
        at org.geoserver.security.GeoServerSecurityManager.onApplicationEvent(GeoServerSecurityManager.java:353)
        at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:97)
        at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:327)
        at org.geoserver.platform.GeoServerContextLoaderListener.contextInitialized(GeoServerContextLoaderListener.java:26)
        at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4973)
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5467)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:632)
        at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1073)
        at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1857)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
        at java.util.concurrent.FutureTask.run(FutureTask.java:262)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:744)
Caused by: java.lang.RuntimeException: Failed to initialize GeoNode settings
        at org.geonode.security.GeoNodeSecurityProvider.init(GeoNodeSecurityProvider.java:79)
        at org.geoserver.security.GeoServerSecurityManager.onApplicationEvent(GeoServerSecurityManager.java:350)
        ... 16 more
Caused by: org.geoserver.config.util.SecureXStream$ForbiddenClassExceptionEx: Unauthorized class found, see logs for more details on how to handle it: org.geonode.security.GeoNodeAuthFilt$
        at org.geoserver.config.util.SecureXStream$DetailedSecurityExceptionWrapper.realClass(SecureXStream.java:173)
        at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
        at com.thoughtworks.xstream.mapper.CachingMapper.realClass(CachingMapper.java:47)
        at com.thoughtworks.xstream.core.util.HierarchicalStreams.readClassType(HierarchicalStreams.java:29)
        at com.thoughtworks.xstream.core.TreeUnmarshaller.start(TreeUnmarshaller.java:133)
        at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.unmarshal(AbstractTreeMarshallingStrategy.java:32)
        at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1185)
        at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1169)
        at com.thoughtworks.xstream.XStream.fromXML(XStream.java:1049)
        at org.geoserver.config.util.XStreamPersister.load(XStreamPersister.java:587)
        at org.geoserver.security.GeoServerSecurityManager.loadConfigFile(GeoServerSecurityManager.java:2753)
        at org.geoserver.security.GeoServerSecurityManager.loadConfigFile(GeoServerSecurityManager.java:2765)
        at org.geoserver.security.GeoServerSecurityManager$HelperBase.loadConfig(GeoServerSecurityManager.java:2809)
        at org.geoserver.security.GeoServerSecurityManager$HelperBase.loadConfig(GeoServerSecurityManager.java:2816)
        at org.geoserver.security.GeoServerSecurityManager$FilterHelper.load(GeoServerSecurityManager.java:3281)
        at org.geoserver.security.GeoServerSecurityManager.loadFilter(GeoServerSecurityManager.java:1454)
        at org.geoserver.security.GeoServerSecurityFilterChainProxy.lookupFilter(GeoServerSecurityFilterChainProxy.java:246)
        at org.geoserver.security.validation.SecurityConfigValidator.validateRequestFilterChain(SecurityConfigValidator.java:229)
        at org.geoserver.security.validation.SecurityConfigValidator.validateManagerConfig(SecurityConfigValidator.java:162)
        at org.geoserver.security.GeoServerSecurityManager.saveSecurityConfig(GeoServerSecurityManager.java:1563)
        at org.geonode.security.GeoNodeSecurityProvider.configureChains(GeoNodeSecurityProvider.java:144)
        at org.geonode.security.GeoNodeSecurityProvider.configureGeoNodeSecurity(GeoNodeSecurityProvider.java:98)
        at org.geonode.security.GeoNodeSecurityProvider.init(GeoNodeSecurityProvider.java:75)
        ... 17 more
Caused by: com.thoughtworks.xstream.security.ForbiddenClassException: org.geonode.security.GeoNodeAuthFilterConfig
        at com.thoughtworks.xstream.security.NoTypePermission.allows(NoTypePermission.java:26)
        at com.thoughtworks.xstream.mapper.SecurityMapper.realClass(SecurityMapper.java:74)
        at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
        at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
        at org.geoserver.config.util.SecureXStream$DetailedSecurityExceptionWrapper.realClass(SecureXStream.java:150)
        ... 39 more

Sep 11, 2015 7:55:18 PM org.apache.catalina.core.ApplicationContext log
INFO: Closing Spring root WebApplicationContext
@smesdaghi smesdaghi added the bug label Sep 11, 2015
@smesdaghi
Copy link
Member Author

this pull request is what cause the problem: geoserver/geoserver#1208
adding

    <context-param>
       <param-name>GEOSERVER_XSTREAM_WHITELIST</param-name>
        <param-value>org.geonode.security.GeoNodeAuthFilterConfig; org.geonode.security.GeoNodeAnonymousAuthFilterConfig</param-value>
    </context-param>

causes the following instead:

SEVERE: Exception sending context initialized event to listener instance of class org.geoserver.platform.GeoServerContextLoaderListener
org.springframework.beans.factory.BeanCreationException: Error occured reading security configuration; nested exception is java.lang.RuntimeException: Failed to initialize GeoNode$
        at org.geoserver.security.GeoServerSecurityManager.onApplicationEvent(GeoServerSecurityManager.java:353)
        at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:97)
        at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:327)
        at org.geoserver.platform.GeoServerContextLoaderListener.contextInitialized(GeoServerContextLoaderListener.java:26)
        at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4973)
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5467)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:632)
        at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1073)
        at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1857)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
        at java.util.concurrent.FutureTask.run(FutureTask.java:262)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:744)
Caused by: java.lang.RuntimeException: Failed to initialize GeoNode settings
        at org.geonode.security.GeoNodeSecurityProvider.init(GeoNodeSecurityProvider.java:79)
        at org.geoserver.security.GeoServerSecurityManager.onApplicationEvent(GeoServerSecurityManager.java:350)
        ... 16 more
Caused by: org.geoserver.security.validation.SecurityConfigException: Authentication provider geonodeAuthProvider already exists
        at org.geoserver.security.validation.SecurityConfigValidator.createSecurityException(SecurityConfigValidator.java:541)
        at org.geoserver.security.validation.SecurityConfigValidator.validateAddNamedService(SecurityConfigValidator.java:300)
        at org.geoserver.security.validation.SecurityConfigValidator.validateAddAuthProvider(SecurityConfigValidator.java:335)
        at org.geoserver.security.GeoServerSecurityManager.saveAuthenticationProvider(GeoServerSecurityManager.java:1313)
        at org.geonode.security.GeoNodeSecurityProvider.addServices(GeoNodeSecurityProvider.java:108)
        at org.geonode.security.GeoNodeSecurityProvider.configureGeoNodeSecurity(GeoNodeSecurityProvider.java:97)
        at org.geonode.security.GeoNodeSecurityProvider.init(GeoNodeSecurityProvider.java:75)
        ... 17 more

@smesdaghi
Copy link
Member Author

whitelisting in conjunction with removing data.security filters did the trick. will have to register these types programmatically but for now web.xml changes does is fine: ROGUE-JCTD/rogue-cookbook@c704c7e

changes will have to be done similar to:
smithkm/geoserver@0945cd6
or other commits around the time the pull request was made.

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

No branches or pull requests

1 participant