Same problem but with the "plugIns" directory. Your data directory
structure should look as described here:
The GEOSERVER_DATA_DIRECTORY is set to
/Users/Zubi/Documents/Eisenhut Informatik AG/AdminTool/Eclipse
workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/webapps/geoserver5/data
Unfortunately there is not a "featureTypes" directory. Why not? (With
official releases from website there are an automatically created
"featureTypes" directory.)
When I added this directory manually then I get new exception:
java.lang.NullPointerException
at
org.vfny.geoserver.global.GeoValidator.loadPlugins(GeoValidator.java:92)
at org.vfny.geoserver.global.GeoValidator.<init>(GeoValidator.java:60)
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:274)
at
org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:100)
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)
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.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:134)
at
org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:230)
at
org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:156)
at
org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:48)
at
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3827)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4343)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:789)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)
at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478)
at
org.apache.catalina.core.StandardService.start(StandardService.java:480)
at
org.apache.catalina.core.StandardServer.start(StandardServer.java:2313)
at org.apache.catalina.startup.Catalina.start(Catalina.java:556)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:287)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:425)
-Thomas
2007/3/6, Justin Deoliveira <jdeolive@anonymised.com>:
Well from what I can tell this is happening because the featureTypes
directory does not exist. On server starup you should get a message
saying what the GEOSERVER_DATA_DIRECTORY is set to. Is there a
"featureTypes" directory under the directory it reports?
-Justin
Thomas Zuberbuehler wrote:
> I forgot to write. This exception on startup I get also before your
> changes. I get this exception only with a build from svn.
>
> 2007/3/6, Thomas Zuberbuehler <tzuberbuehler@anonymised.com>:
>> Yes, sometimes. In this case I get GeoServer 1.5 from svn and import
>> the geoserver.war to Eclipse. With the build from website I do not
>> have problems. With the your modified version from svn I get following
>> exception:
>>
>> SCHWERWIEGEND: Context initialization failed
>> org.springframework.beans.factory.BeanCreationException: Error
>> creating bean with name 'validation' defined in URL
>>
[jar:file:/Users/Zubi/Documents/Eisenhut%20Informatik%20AG/AdminTool/Eclipse%20Workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/webapps/geoserver5/WEB-INF/lib/validation-1.5.0-RC1.jar!/applicationContext.xml]:
>>
>> Can't resolve reference to bean 'config' while setting property
>> 'constructor argument'; nested exception is
>> org.springframework.beans.factory.BeanCreationException: Error
>> creating bean with name 'config' defined in URL
>>
[jar:file:/Users/Zubi/Documents/Eisenhut%20Informatik%20AG/AdminTool/Eclipse%20Workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/webapps/geoserver5/WEB-INF/lib/main-1.5.0-RC1.jar!/applicationContext.xml]:
>>
>> Initialization of bean failed; nested exception is
>> org.springframework.beans.factory.BeanInitializationException: Error
>> creating xml config reader; nested exception is
>> org.vfny.geoserver.global.ConfigurationException:
>> java.lang.NullPointerException
>> org.springframework.beans.factory.BeanCreationException: Error
>> creating bean with name 'config' defined in URL
>>
[jar:file:/Users/Zubi/Documents/Eisenhut%20Informatik%20AG/AdminTool/Eclipse%20Workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/webapps/geoserver5/WEB-INF/lib/main-1.5.0-RC1.jar!/applicationContext.xml]:
>>
>> Initialization of bean failed; nested exception is
>> org.springframework.beans.factory.BeanInitializationException: Error
>> creating xml config reader; nested exception is
>> org.vfny.geoserver.global.ConfigurationException:
>> java.lang.NullPointerException
>> org.springframework.beans.factory.BeanInitializationException: Error
>> creating xml config reader; nested exception is
>> org.vfny.geoserver.global.ConfigurationException:
>> java.lang.NullPointerException
>> org.vfny.geoserver.global.ConfigurationException:
>> java.lang.NullPointerException
>> at
>>
org.vfny.geoserver.global.xml.XMLConfigReader.loadCatalog(XMLConfigReader.java:363)
>>
>> at
>>
org.vfny.geoserver.global.xml.XMLConfigReader.load(XMLConfigReader.java:195)
>>
>> at
>>
org.vfny.geoserver.global.xml.XMLConfigReader.<init>(XMLConfigReader.java:153)
>>
>> at
>> org.vfny.geoserver.global.Config.setApplicationContext(Config.java:51)
>> 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.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:176)
>>
>> 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.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:275)
>>
>> at
>>
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:318)
>>
>> at
>>
org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:134)
>>
>> at
>>
org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:230)
>>
>> at
>>
org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:156)
>>
>> at
>>
org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:48)
>>
>> at
>>
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3827)
>>
>> at
>>
org.apache.catalina.core.StandardContext.start(StandardContext.java:4343)
>> at
>> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)
>> at
>> org.apache.catalina.core.StandardHost.start(StandardHost.java:789)
>> at
>> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)
>> at
>> org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478)
>> at
>>
org.apache.catalina.core.StandardService.start(StandardService.java:480)
>> at
>>
org.apache.catalina.core.StandardServer.start(StandardServer.java:2313)
>> at
org.apache.catalina.startup.Catalina.start(Catalina.java:556)
>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> at
>>
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>
>> at
>>
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>
>> at java.lang.reflect.Method.invoke(Method.java:324)
>> at
>> org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:287)
>> at
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:425)
>> Caused by: java.lang.NullPointerException
>> at
>>
org.vfny.geoserver.global.xml.XMLConfigReader.loadFeatureTypes(XMLConfigReader.java:1271)
>>
>> at
>>
org.vfny.geoserver.global.xml.XMLConfigReader.loadCatalog(XMLConfigReader.java:360)
>>
>> ... 36 more
>>
>> 2007/3/6, Justin Deoliveira <jdeolive@anonymised.com>:
>> > Hmm, since our xml config is by no means simple trying to debug this
>> one
>> > is far from worth it. I am going to commit a fix to just check
for null
>> > in the capabilities transformer. Especially since the wcs and wfs
>> > capabilities already do it.
>> >
>> > Are you working from svn Thomas?
>> >
>> > -Justin
>> >
>> > Thomas Zuberbuehler wrote:
>> > > Hi Justin
>> > >
>> > > I get the DataDTO object (dataDTO) with the XMLConfigReader, call
>> > > following code and write the changes with help of
XMLConfigWriter to
>> > > filesystem.
>> > >
>> > > <code>
>> > > Map fts = dataDTO.getFeaturesTypes();
>> > > fts.put((dataStoreID + ":::" + featureTypeName), featureType);
>> > > dataDTO.setFeaturesTypes(fts);
>> > > </code>
>> > >
>> > > I reload the GeoServer catalog with a connection to
>> > > ".../admin/loadFromXML.do" as like described at GeoServer
homepage. I
>> > > make this unattractive workaround because I use a simple Servlet
>> > > without Spring and Struts.
>> > >
>> > > The servlet works aside described bug. The feature types will
added
>> > > without any exception and errors. And they can displayed with
>> > > MapBuilder as well. And when I edit the added feature types (only
>> > > press submit) the WMS GetCapabilities request works too.
>> > >
>> > > Regards, Thomas
>> > >
>> > > 2007/3/6, Justin Deoliveira <jdeolive@anonymised.com>:
>> > >> Hi Thomas,
>> > >>
>> > >> Can you be more specific on how you are saving to XML and
>> reloading the
>> > >> catalog. I think what is happening is you just have a featureType
>> with
>> > >> no keywords, and null is creeping in along the lines. Depending
>> on if
>> > >> you are using the exact same code to reload the catalog that
>> GeoServer
>> > >> does on startup, this case should be handled as XMlConfigReader
>> returns
>> > >> an empty list when it finds no keywords.
>> > >>
>> > >> Regardless of that, I think the capabilities transformer should
>> just do
>> > >> a null check since its good practice anyways.
>> > >>
>> > >> -Justin
>> > >>
>> > >>
>> > >> Thomas Zuberbuehler wrote:
>> > >>> Hi
>> > >>>
>> > >>> I wrote a Servlet to create new FeatureTypes on GeoServer. This
>> > >>> servlet runs (separetely) on GeoServer itself. This works great.
>> But
>> > >>> after I added new FeatureTypes and send a WMS GetCapabilities
>> Request
>> > >>> to GeoServer I get a Translator Error. Does anyone know why?
>> > >>>
>> > >>> I think the (at the end of this mail) added excecption must be
>> > >>> something todo with following code.
>> > >>>
>> > >>> <code>
>> > >>> FeatureTypeInfoDTO featureType = new FeatureTypeInfoDTO();
>> > >>> // ...
>> > >>>
>> > >>> String tmp = request.getParameter("keywords").split(",");
>> > >>>
>> > >>> if (tmp != null && tmp.length > 0)
>> > >>> for (int i=0; i<tmp.length; i++)
>> > >>> featureType.addKeyword(tmp[i]);
>> > >>>
>> > >>> //... save to XML and reload GeoServer catalog
>> > >>> </code>
>> > >>>
>> > >>> Sorry if this post receive you perhaps two times. Nabble.com
had a
>> > >>> problem and I got a timeout so I don't know if this message is
>> really
>> > >>> posted.
>> > >>>
>> > >>> Thank you!
>> > >>> Regards, Thomas
>> > >>>
>> > >>> I get following Exception:
>> > >>>
>> > >>>
>>
-------------------------------------------------------------------------
>> > >>> Take Surveys. Earn Cash. Influence the Future of IT
>> > >>> Join SourceForge.net's Techsay panel and you'll get the chance
>> to share your
>> > >>> opinions on IT & business topics through brief surveys-and earn
>> cash
>> > >>>
>>
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>> > >>> _______________________________________________
>> > >>> Geoserver-users mailing list
>> > >>> Geoserver-users@lists.sourceforge.net
>> > >>> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>> > >>>
>> > >>>
>> > >>>
>> > >>
>> > >> --
>> > >> Justin Deoliveira
>> > >> The Open Planning Project
>> > >> http://topp.openplans.org
>> > >>
>> > >
>> > >
>> >
>> >
>> > --
>> > Justin Deoliveira
>> > The Open Planning Project
>> > http://topp.openplans.org
>> >
>>
>>
>> --
>> Thomas Zuberbuehler
>> http://www.zubi.li
>>
>
>
--
Justin Deoliveira
The Open Planning Project
http://topp.openplans.org