GeoServer启用GeoWebCache时的一个错误

2012-03-18 21:16:01,537 INFO [jdbc.JDBCMBWrapper] - MetaStore database is version 120
2012-03-18 21:16:01,584 INFO [config.XMLConfiguration] - No configuration directory was specified, using /root/geoserver/webapps/geoserver/WEB-INF/classes/geowebcache.xml
2012-03-18 21:16:01,584 INFO [config.XMLConfiguration] - Found configuration file in /root/geoserver/webapps/geoserver/WEB-INF/classes
2012-03-18 21:16:01,590 INFO [config.XMLConfiguration] - Updating configuration from 1.2.2 to 1.2.4
2012-03-18 21:16:02,163 INFO [config.XMLConfiguration] - cvc-elt.1: 找不到元素 'gwcConfiguration' 的声明。
2012-03-18 21:16:02,164 INFO [config.XMLConfiguration] - Will try to use configuration anyway.
2012-03-18 21:16:02,193 INFO [storage.StorageBroker] - Destroying StorageBroker
2012-03-18 21:16:03,291 INFO [geoserver.catalog] - Disposing datastore 'DataStoreInfoImpl-42b02764:1339fb150a6:-8000'
2012-03-18 21:16:03,291 INFO [geoserver.catalog] - Disposing datastore 'DataStoreInfoImpl--29c72c3:13399168f85:-7fe5'
2012-03-18 21:16:03,291 INFO [geoserver.catalog] - Disposing datastore 'DataStoreInfoImpl--29c72c3:13399168f85:-8000'
2012-03-18 21:16:03,292 INFO [geoserver.catalog] - Disposing datastore 'DataStoreInfoImpl--29c72c3:13399168f85:-7fe8'
2012-03-18 21:16:03,292 INFO [geoserver.catalog] - Disposing datastore 'DataStoreInfoImpl--4a4c52cb:1339e3a78c0:-7ff5'
2012-03-18 21:16:03,292 INFO [geoserver.catalog] - Disposing datastore 'DataStoreInfoImpl--29c72c3:13399168f85:-7fdc'
2012-03-18 21:16:03,292 INFO [geoserver.catalog] - Disposing datastore 'DataStoreInfoImpl--29c72c3:13399168f85:-7ffd'
2012-03-18 21:16:03,292 INFO [geoserver.catalog] - Disposing datastore 'DataStoreInfoImpl--5dc7e5d8:1339fbb096b:-8000'
2012-03-18 21:16:03,292 INFO [geoserver.catalog] - Disposing datastore 'DataStoreInfoImpl-21e9141:1339dcaf505:-7fe2'
2012-03-18 21:16:03,293 INFO [geoserver.catalog] - Disposing datastore 'DataStoreInfoImpl--29c72c3:13399168f85:-7fee'
2012-03-18 21:16:03,293 INFO [geoserver.catalog] - Disposing datastore 'DataStoreInfoImpl--29c72c3:13399168f85:-7ffa'
2012-03-18 21:16:03,293 INFO [geoserver.catalog] - Disposing datastore 'DataStoreInfoImpl--29c72c3:13399168f85:-7ff1'
2012-03-18 21:16:03,293 INFO [geoserver.catalog] - Disposing datastore 'DataStoreInfoImpl--29c72c3:13399168f85:-7ff7'
2012-03-18 21:16:03,293 INFO [geoserver.catalog] - Disposing datastore 'DataStoreInfoImpl--29c72c3:13399168f85:-7feb'
2012-03-18 21:16:03,293 INFO [geoserver.catalog] - Disposing datastore 'DataStoreInfoImpl--29c72c3:13399168f85:-7fdf'
2012-03-18 21:16:03,295 ERROR [context.ContextLoader] - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'GWCCapabilitiesHomePageProvider' defined in URL [jar:file:/root/geoserver/webapps/geoserver/WEB-INF/lib/web-gwc-2.1.2.jar!/applicationContext.xml]: Cannot resolve reference to bean 'gwcFacade' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'gwcFacade' defined in URL [jar:file:/root/geoserver/webapps/geoserver/WEB-INF/lib/gwc-2.1.2.jar!/geowebcache-geoserver-context.xml]: Cannot resolve reference to bean 'gwcTLDispatcher' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'gwcTLDispatcher' defined in URL [jar:file:/root/geoserver/webapps/geoserver/WEB-INF/lib/gwc-2.1.2.jar!/geowebcache-core-context.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.geowebcache.layer.TileLayerDispatcher]: Constructor threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'gwcXmlConfig' defined in URL [jar:file:/root/geoserver/webapps/geoserver/WEB-INF/lib/gwc-2.1.2.jar!/geowebcache-core-context.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.geowebcache.config.XMLConfiguration]: Constructor threw exception; nested exception is com.thoughtworks.xstream.converters.ConversionException: Cannot construct org.geowebcache.grid.SRS as it does not have a no-args constructor : Cannot construct org.geowebcache.grid.SRS as it does not have a no-args constructor
---- Debugging information ----
message : Cannot construct org.geowebcache.grid.SRS as it does not have a no-args constructor
cause-exception : com.thoughtworks.xstream.converters.reflection.ObjectAccessException
cause-message : Cannot construct org.geowebcache.grid.SRS as it does not have a no-args constructor
class : org.geowebcache.config.GeoWebCacheConfiguration
required-type : org.geowebcache.grid.SRS
-------------------------------
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:275)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:104)
at org.springframework.beans.factory.support.ConstructorResolver.resolveConstructorArguments(ConstructorResolver.java:495)
at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:162)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:925)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:835)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:440)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
at java.security.AccessController.doPrivileged(Native Method)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:221)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:729)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:381)
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)
at org.geoserver.platform.GeoServerContextLoaderListener.contextInitialized(GeoServerContextLoaderListener.java:18)
at org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:540)
at org.mortbay.jetty.servlet.Context.startContext(Context.java:135)
at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1220)
at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:510)
at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:448)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152)
at org.mortbay.jetty.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:156)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
at org.mortbay.jetty.Server.doStart(Server.java:222)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
at org.mortbay.xml.XmlConfiguration.main(XmlConfiguration.java:977)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.mortbay.start.Main.invokeMain(Main.java:183)
at org.mortbay.start.Main.start(Main.java:497)
at org.mortbay.start.Main.main(Main.java:115)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'gwcFacade' defined in URL [jar:file:/root/geoserver/webapps/geoserver/WEB-INF/lib/gwc-2.1.2.jar!/geowebcache-geoserver-context.xml]: Cannot resolve reference to bean 'gwcTLDispatcher' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'gwcTLDispatcher' defined in URL [jar:file:/root/geoserver/webapps/geoserver/WEB-INF/lib/gwc-2.1.2.jar!/geowebcache-core-context.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.geowebcache.layer.TileLayerDispatcher]: Constructor threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'gwcXmlConfig' defined in URL [jar:file:/root/geoserver/webapps/geoserver/WEB-INF/lib/gwc-2.1.2.jar!/geowebcache-core-context.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.geowebcache.config.XMLConfiguration]: Constructor threw exception; nested exception is com.thoughtworks.xstream.converters.ConversionException: Cannot construct org.geowebcache.grid.SRS as it does not have a no-args constructor : Cannot construct org.geowebcache.grid.SRS as it does not have a no-args constructor
---- Debugging information ----
Cannot construct org.geowebcache.grid.SRS as it does not have a no-args constructor
message : Cannot construct org.geowebcache.grid.SRS as it does not have a no-args constructor
cause-exception : com.thoughtworks.xstream.converters.reflection.ObjectAccessException
cause-message : Cannot construct org.geowebcache.grid.SRS as it does not have a no-args constructor
class : org.geowebcache.config.GeoWebCacheConfiguration
required-type : org.geowebcache.grid.SRS
-------------------------------
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:275)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:104)
at org.springframework.beans.factory.support.ConstructorResolver.resolveConstructorArguments(ConstructorResolver.java:495)
at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:162)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:925)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:835)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:440)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
at java.security.AccessController.doPrivileged(Native Method)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:221)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:269)
... 43 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'gwcTLDispatcher' defined in URL [jar:file:/root/geoserver/webapps/geoserver/WEB-INF/lib/gwc-2.1.2.jar!/geowebcache-core-context.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.geowebcache.layer.TileLayerDispatcher]: Constructor threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'gwcXmlConfig' defined in URL [jar:file:/root/geoserver/webapps/geoserver/WEB-INF/lib/gwc-2.1.2.jar!/geowebcache-core-context.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.geowebcache.config.XMLConfiguration]: Constructor threw exception; nested exception is com.thoughtworks.xstream.converters.ConversionException: Cannot construct org.geowebcache.grid.SRS as it does not have a no-args constructor : Cannot construct org.geowebcache.grid.SRS as it does not have a no-args constructor
---- Debugging information ----
message : Cannot construct org.geowebcache.grid.SRS as it does not have a no-args constructor
cause-exception : com.thoughtworks.xstream.converters.reflection.ObjectAccessException
cause-message : Cannot construct org.geowebcache.grid.SRS as it does not have a no-args constructor
class : org.geowebcache.config.GeoWebCacheConfiguration
required-type : org.geowebcache.grid.SRS
-------------------------------
at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:254)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:925)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:835)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:440)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
at java.security.AccessController.doPrivileged(Native Method)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:221)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:269)
... 58 more
Caused by: org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.geowebcache.layer.TileLayerDispatcher]: Constructor threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'gwcXmlConfig' defined in URL [jar:file:/root/geoserver/webapps/geoserver/WEB-INF/lib/gwc-2.1.2.jar!/geowebcache-core-context.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.geowebcache.config.XMLConfiguration]: Constructor threw exception; nested exception is com.thoughtworks.xstream.converters.ConversionException: Cannot construct org.geowebcache.grid.SRS as it does not have a no-args constructor : Cannot construct org.geowebcache.grid.SRS as it does not have a no-args constructor
---- Debugging information ----
message : Cannot construct org.geowebcache.grid.SRS as it does not have a no-args constructor
cause-exception : com.thoughtworks.xstream.converters.reflection.ObjectAccessException
cause-message : Cannot construct org.geowebcache.grid.SRS as it does not have a no-args constructor
class : org.geowebcache.config.GeoWebCacheConfiguration
required-type : org.geowebcache.grid.SRS
-------------------------------
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:115)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:87)
at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:248)
... 70 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'gwcXmlConfig' defined in URL [jar:file:/root/geoserver/webapps/geoserver/WEB-INF/lib/gwc-2.1.2.jar!/geowebcache-core-context.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.geowebcache.config.XMLConfiguration]: Constructor threw exception; nested exception is com.thoughtworks.xstream.converters.ConversionException: Cannot construct org.geowebcache.grid.SRS as it does not have a no-args constructor : Cannot construct org.geowebcache.grid.SRS as it does not have a no-args constructor
---- Debugging information ----
message : Cannot construct org.geowebcache.grid.SRS as it does not have a no-args constructor
cause-exception : com.thoughtworks.xstream.converters.reflection.ObjectAccessException
cause-message : Cannot construct org.geowebcache.grid.SRS as it does not have a no-args constructor
class : org.geowebcache.config.GeoWebCacheConfiguration
required-type : org.geowebcache.grid.SRS
-------------------------------
at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:254)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:925)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:835)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:440)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
at java.security.AccessController.doPrivileged(Native Method)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:221)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:881)
at org.geowebcache.GeoWebCacheExtensions.extensions(GeoWebCacheExtensions.java:110)
at org.geowebcache.GeoWebCacheExtensions.extensions(GeoWebCacheExtensions.java:130)
at org.geowebcache.layer.TileLayerDispatcher.reInit(TileLayerDispatcher.java:109)
at org.geowebcache.layer.TileLayerDispatcher.<init>(TileLayerDispatcher.java:59)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:100)
... 72 more
Caused by: org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.geowebcache.config.XMLConfiguration]: Constructor threw exception; nested exception is com.thoughtworks.xstream.converters.ConversionException: Cannot construct org.geowebcache.grid.SRS as it does not have a no-args constructor : Cannot construct org.geowebcache.grid.SRS as it does not have a no-args constructor
---- Debugging information ----
message : Cannot construct org.geowebcache.grid.SRS as it does not have a no-args constructor
cause-exception : com.thoughtworks.xstream.converters.reflection.ObjectAccessException
cause-message : Cannot construct org.geowebcache.grid.SRS as it does not have a no-args constructor
class : org.geowebcache.config.GeoWebCacheConfiguration
required-type : org.geowebcache.grid.SRS
-------------------------------
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:115)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:87)
at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:248)
... 93 more
Caused by: com.thoughtworks.xstream.converters.ConversionException: Cannot construct org.geowebcache.grid.SRS as it does not have a no-args constructor : Cannot construct org.geowebcache.grid.SRS as it does not have a no-args constructor
---- Debugging information ----
message : Cannot construct org.geowebcache.grid.SRS as it does not have a no-args constructor
cause-exception : com.thoughtworks.xstream.converters.reflection.ObjectAccessException
cause-message : Cannot construct org.geowebcache.grid.SRS as it does not have a no-args constructor
class : org.geowebcache.config.GeoWebCacheConfiguration
required-type : org.geowebcache.grid.SRS
-------------------------------
at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:89)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:76)
at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshallField(AbstractReflectionConverter.java:246)
at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.doUnmarshal(AbstractReflectionConverter.java:218)
at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshal(AbstractReflectionConverter.java:162)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:82)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:76)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:60)
at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.readItem(AbstractCollectionConverter.java:71)
at com.thoughtworks.xstream.converters.collections.CollectionConverter.populateCollection(CollectionConverter.java:68)
at com.thoughtworks.xstream.converters.collections.CollectionConverter.unmarshal(CollectionConverter.java:61)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:82)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:76)
at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshallField(AbstractReflectionConverter.java:246)
at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.doUnmarshal(AbstractReflectionConverter.java:218)
at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshal(AbstractReflectionConverter.java:162)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:82)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:76)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:60)
at com.thoughtworks.xstream.core.TreeUnmarshaller.start(TreeUnmarshaller.java:137)
at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.unmarshal(AbstractTreeMarshallingStrategy.java:33)
at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:923)
at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:899)
at org.geowebcache.config.XMLConfiguration.loadConfiguration(XMLConfiguration.java:366)
at org.geowebcache.config.XMLConfiguration.<init>(XMLConfiguration.java:178)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:100)
... 95 more
Caused by: com.thoughtworks.xstream.converters.reflection.ObjectAccessException: Cannot construct org.geowebcache.grid.SRS as it does not have a no-args constructor
at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.newInstance(PureJavaReflectionProvider.java:71)
at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.instantiateNewInstance(AbstractReflectionConverter.java:308)
at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshal(AbstractReflectionConverter.java:161)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:82)
... 124 more

[color=red]错误由于jdk7使用xstream 1.3时出错,只要把xstream换成1.4就可以在jdk7使用了。当然也可以把jdk7改成jdk6。[/color]
<think>好的,用户想了解GeoServer的安装配置及使用方法。首先,我需要回顾一下用户提供的参考资料,确保信息准确。用户给出的引用1到4都涉及GeoServer的安装步骤、常见问题以及配置CORS的方法。接下来,我需要按照系统指令的要求,结构清晰地分步骤回答,同生成相关问题。 首先,安装GeoServer的步骤通常包括Java环境安装、下载GeoServer、部署到Tomcat或使用独立版本,启动服务,然后进行数据发布。根据引用2,GeoServer一个基于Java Web的项目,因此需要先安装Java。引用1提到下载和安装Java是第一步,接着是GeoServer的安装和部署。引用3提到JDK的安装与配置,以及可能遇到的问题,比如页面不到或端口占用。这些都需要在回答中涵盖,并给出解决方法。 然后,配置方面,引用4提到了配置CORS,这是跨域资源共享的设置,可能需要在反向代理中进行。用户可能需要了解如何通过Nginx配置代理,确保GeoServer可以跨域访问。 接下来是使用方法,比如发布数据源、创建图层、设置样式以及服务配置,这些步骤在引用1中有简要说明,需要详细展开,确保用户能够一步步操作。 另外,常见问题部分需要整理引用3中的问题,如页面不到可能是路径错误,503或404错误可能与Tomcat配置有关,端口占用需要检查8080端口,启动闪退可能与Java环境有关。这些都需要逐一解释解决方法。 生成相关问题需要考虑用户可能的后续疑问,比如性能优化、数据源支持、安全配置、与其他工具的集成等。需要确保问题覆盖安装、配置、使用和故障排除的各个方面。 最后,检查是否符合系统级指令:数学公式是否正确使用,LaTeX语法正确,使用中文,结构清晰,引用标识正确添加。同,回答要分步骤,帮助用户逐步解决问题,确保信息真实可靠,引用正确。</think>### GeoServer 安装配置及使用方法 #### **一、安装准备** 1. **安装Java环境** GeoServer依赖Java运行环境(JDK 8或更高版本)。 - 下载JDK:访问[Oracle官网](https://www.oracle.com/java/)或OpenJDK。 - 配置环境变量:设置`JAVA_HOME`为JDK安装路径,并将`$JAVA_HOME/bin`加入系统`PATH`[^2][^3]。 2. **选择安装方式** GeoServer支持多种安装方式: - **独立版本**:直接运行可执行文件(推荐新手使用)[^1]。 - **WAR包部署**:将`geoserver.war`部署到Tomcat等Web服务器(适合开发者)。 --- #### **二、安装步骤** 1. **独立版本安装** - 下载GeoServer独立安装包(如`geoserver-2.x.x-bin.zip`)。 - 解压到目标目录,运行`bin/startup.sh`(Linux)或`bin/startup.bat`(Windows)。 - 默认访问地址:`http://localhost:8080/geoserver`,用户名/密码为`admin/geoserver`。 2. **WAR包部署(Tomcat)** - 安装Tomcat并启动服务。 - 将`geoserver.war`复制到Tomcat的`webapps`目录,自动解压部署。 - 访问地址:`http://localhost:8080/geoserver`[^3]。 --- #### **三、配置与优化** 1. **端口修改** 若端口冲突(如8080被占用),修改Tomcat的`conf/server.xml`或GeoServer的`etc/jetty.xml`[^3]。 2. **跨域配置(CORS)** 在Nginx或Apache中添加以下配置: ```nginx location /geoserver { proxy_pass http://localhost:8080/geoserver; add_header 'Access-Control-Allow-Origin' '*'; } ``` 或修改GeoServer的`WEB-INF/web.xml`启用CORS过滤器[^4]。 3. **数据目录配置** 默认数据目录为`data_dir`,可通过`GEOSERVER_DATA_DIR`环境变量自定义路径。 --- #### **四、基本使用** 1. **发布数据** - **数据源**:支持Shapefile、PostGIS、GeoTIFF等格式。 - **步骤**:登录GeoServer控制台 → “数据” → “新增数据存储” → 配置连接参数 → 发布图层。 2. **创建地图样式** 使用SLD(Styled Layer Descriptor)或CSS样式语言定义图层渲染规则。 3. **服务配置** - **WMS/WFS服务**:通过“服务”菜单配置输出格式、坐标系等参数。 - **缓存优化**:启用GWC(GeoWebCache)提升瓦片地图性能。 --- #### **五、常见问题解决** 1. **页面不到(404)** - 检查Tomcat是否成功部署WAR包,或独立版本是否正常启动。 2. **端口占用或启动失败** - 使用`netstat -ano`查占用端口的进程并终止。 3. **权限问题** - 确保GeoServer数据目录有读写权限。 ---
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值