GeoServerFactoryIteratorProvider causes NPE during coverage loading
-------------------------------------------------------------------
Key: GEOS-1551
URL: http://jira.codehaus.org/browse/GEOS-1551
Project: GeoServer
Issue Type: Bug
Components: Configuration
Reporter: Andrea Aime
Assignee: Justin Deoliveira
Fix For: 1.7.0-beta1
Having the GeoServerFactoryIteratorProvider around causes an NPE while trying to unit test coverages, this is due to the fact that the coverage loading process trigger the geotools spi before the rest of the application context has done loading.
Given that the above class seems to play no active role in the current build I commented it out of the application context. A better solution should be looked for.
The actual exception occurring is:
{code}
AVVERTENZA: Skipped misconfigured coverage C:\progetti\geoserver\src\trunkClean\geoserver\community\wcs111\.\target\mock15894data\coverages\DEM\info.xml
org.vfny.geoserver.global.ConfigurationException: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'wcs111ServiceTarget' defined in URL [file:/C:/progetti/geoserver/src/trunkClean/geoserver/community/wcs111/target/classes/applicationContext.xml]: Can't resolve reference to bean 'wcs' while setting property 'constructor argument'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'wcs' defined in URL [file:/C:/progetti/geoserver/src/trunkClean/geoserver/wcs/target/classes/applicationContext.xml]: Can't resolve reference to bean 'data' while setting property 'constructor argument'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'data' defined in URL [file:/C:/progetti/geoserver/src/trunkClean/geoserver/main/target/classes/applicationContext.xml]: Can't resolve reference to bean 'geoServer' while setting property 'constructor argument'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'geoServer' defined in URL [file:/C:/progetti/geoserver/src/trunkClean/geoserver/main/target/classes/applicationContext.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.FatalBeanException: Could not instantiate class [org.vfny.geoserver.global.GeoServer]; constructor threw exception; nested exception is java.lang.NullPointerException: null
at org.vfny.geoserver.global.xml.XMLConfigReader.loadCoverageDTOFromXML(XMLConfigReader.java:2003)
at org.vfny.geoserver.global.xml.XMLConfigReader.loadCoverage(XMLConfigReader.java:1765)
at org.vfny.geoserver.global.xml.XMLConfigReader.loadCoverages(XMLConfigReader.java:1718)
at org.vfny.geoserver.global.xml.XMLConfigReader.loadCatalog(XMLConfigReader.java:390)
at org.vfny.geoserver.global.xml.XMLConfigReader.load(XMLConfigReader.java:217)
at org.vfny.geoserver.global.xml.XMLConfigReader.<init>(XMLConfigReader.java:171)
at org.vfny.geoserver.global.Config.setApplicationContext(Config.java:90)
at org.springframework.context.support.ApplicationContextAwareProcessor.postProcessBeforeInitialization(ApplicationContextAwareProcessor.java:84)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:248)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:362)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:226)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:147)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:275)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:318)
at org.geoserver.test.GeoServerTestSupport.setUp(GeoServerTestSupport.java:99)
at junit.framework.TestCase.runBare(TestCase.java:125)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'wcs111ServiceTarget' defined in URL [file:/C:/progetti/geoserver/src/trunkClean/geoserver/community/wcs111/target/classes/applicationContext.xml]: Can't resolve reference to bean 'wcs' while setting property 'constructor argument'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'wcs' defined in URL [file:/C:/progetti/geoserver/src/trunkClean/geoserver/wcs/target/classes/applicationContext.xml]: Can't resolve reference to bean 'data' while setting property 'constructor argument'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'data' defined in URL [file:/C:/progetti/geoserver/src/trunkClean/geoserver/main/target/classes/applicationContext.xml]: Can't resolve reference to bean 'geoServer' while setting property 'constructor argument'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'geoServer' defined in URL [file:/C:/progetti/geoserver/src/trunkClean/geoserver/main/target/classes/applicationContext.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.FatalBeanException: Could not instantiate class [org.vfny.geoserver.global.GeoServer]; constructor threw exception; nested exception is java.lang.NullPointerException: null
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:180)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:105)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.resolveConstructorArguments(AbstractAutowireCapableBeanFactory.java:713)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:611)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:329)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:226)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:147)
at org.springframework.aop.framework.ProxyFactoryBean.freshTargetSource(ProxyFactoryBean.java:485)
at org.springframework.aop.framework.ProxyFactoryBean.setBeanFactory(ProxyFactoryBean.java:218)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:358)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:226)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:147)
at org.springframework.beans.factory.support.AbstractBeanFactory.getType(AbstractBeanFactory.java:342)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.isBeanTypeMatch(DefaultListableBeanFactory.java:249)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:144)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:198)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:192)
at org.springframework.context.support.AbstractApplicationContext.getBeansOfType(AbstractApplicationContext.java:606)
at org.geoserver.platform.GeoServerExtensions.extensions(GeoServerExtensions.java:72)
at org.geoserver.platform.GeoServerExtensions.extensions(GeoServerExtensions.java:89)
at org.geoserver.platform.GeoServerFactoryIteratorProvider.iterator(GeoServerFactoryIteratorProvider.java:23)
at org.geotools.factory.FactoryRegistry.register(FactoryRegistry.java:986)
at org.geotools.factory.FactoryRegistry.synchronizeIteratorProviders(FactoryRegistry.java:976)
at org.geotools.factory.FactoryRegistry.getServiceProvider(FactoryRegistry.java:236)
at org.geotools.factory.FactoryCreator.getServiceProvider(FactoryCreator.java:120)
at org.geotools.referencing.ReferencingFactoryFinder.getFactory(ReferencingFactoryFinder.java:215)
at org.geotools.referencing.ReferencingFactoryFinder.getCRSFactory(ReferencingFactoryFinder.java:306)
at org.geotools.referencing.CRS.parseWKT(CRS.java:440)
at org.vfny.geoserver.global.xml.XMLConfigReader.loadCoverageDTOFromXML(XMLConfigReader.java:1864)
... 27 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'wcs' defined in URL [file:/C:/progetti/geoserver/src/trunkClean/geoserver/wcs/target/classes/applicationContext.xml]: Can't resolve reference to bean 'data' while setting property 'constructor argument'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'data' defined in URL [file:/C:/progetti/geoserver/src/trunkClean/geoserver/main/target/classes/applicationContext.xml]: Can't resolve reference to bean 'geoServer' while setting property 'constructor argument'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'geoServer' defined in URL [file:/C:/progetti/geoserver/src/trunkClean/geoserver/main/target/classes/applicationContext.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.FatalBeanException: Could not instantiate class [org.vfny.geoserver.global.GeoServer]; constructor threw exception; nested exception is java.lang.NullPointerException: null
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:180)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:105)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.resolveConstructorArguments(AbstractAutowireCapableBeanFactory.java:713)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:611)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:329)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:226)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:147)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:176)
... 55 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'data' defined in URL [file:/C:/progetti/geoserver/src/trunkClean/geoserver/main/target/classes/applicationContext.xml]: Can't resolve reference to bean 'geoServer' while setting property 'constructor argument'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'geoServer' defined in URL [file:/C:/progetti/geoserver/src/trunkClean/geoserver/main/target/classes/applicationContext.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.FatalBeanException: Could not instantiate class [org.vfny.geoserver.global.GeoServer]; constructor threw exception; nested exception is java.lang.NullPointerException: null
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:180)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:105)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.resolveConstructorArguments(AbstractAutowireCapableBeanFactory.java:713)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:611)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:329)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:226)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:147)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:176)
... 62 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'geoServer' defined in URL [file:/C:/progetti/geoserver/src/trunkClean/geoserver/main/target/classes/applicationContext.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.FatalBeanException: Could not instantiate class [org.vfny.geoserver.global.GeoServer]; constructor threw exception; nested exception is java.lang.NullPointerException: null
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:370)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:226)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:147)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:176)
... 69 more
Caused by: org.springframework.beans.FatalBeanException: Could not instantiate class [org.vfny.geoserver.global.GeoServer]; constructor threw exception; nested exception is java.lang.NullPointerException: null
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:115)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:75)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:669)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:329)
... 72 more
Caused by: java.lang.NullPointerException
at org.vfny.geoserver.global.Config.getGeoServer(Config.java:124)
at org.vfny.geoserver.global.GeoServer.<init>(GeoServer.java:129)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:100)
... 75 more
{code}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira