[Geoserver-users] WMS GetCapabilities Request throws a Translator Error

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:

Now I forgot the exception:

I put the exception in a Textfile.


View this message in context: Re: WMS GetCapabilities Request throws a Translator Error
Sent from the GeoServer - User mailing list archive at Nabble.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

!DSPAM:1004,45ed7416288722223018498!

--
Justin Deoliveira
The Open Planning Project
http://topp.openplans.org

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
>
> !DSPAM:1004,45ed7416288722223018498!
>

--
Justin Deoliveira
The Open Planning Project
http://topp.openplans.org

--
Thomas Zuberbuehler
http://www.zubi.li

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

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

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

--
Thomas Zuberbuehler
http://www.zubi.li

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

Justin Deoliveira ha scritto:

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?

Hum.... if the user points to an invalid data directory, what shall we do?
For sure, we should complain loudly if the directory does not exist.
What about checking its structural integrity as well? And maybe creating
the necessary folders?

Cheers
Andrea

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.) I will try to add this directory.

-Thomas

Justin Deoliveira-4 wrote:

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

-------------------------------------------------------------------------
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

--
View this message in context: http://www.nabble.com/WMS-GetCapabilities-Request-throws-a-Translator-Error-tf3355483.html#a9335650
Sent from the GeoServer - User mailing list archive at Nabble.com.

Well my opinion has always been to never die in cases like these. As you
suggest spit out a warning saying the directory does not exist, and
create it. Ideally we should still be able to start up with none of data
dir directories being around.

-Justin

Andrea Aime wrote:

Justin Deoliveira ha scritto:

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?

Hum.... if the user points to an invalid data directory, what shall we do?
For sure, we should complain loudly if the directory does not exist.
What about checking its structural integrity as well? And maybe creating
the necessary folders?

Cheers
Andrea

-------------------------------------------------------------------------
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

!DSPAM:1004,45ed985f322992081064789!

--
Justin Deoliveira
The Open Planning Project
http://topp.openplans.org

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

--
Thomas Zuberbuehler
http://www.zubi.li

Same problem but with the "plugIns" directory. Your data directory
structure should look as described here:

http://docs.codehaus.org/display/GEOSDOC/GeoServer+Data+Directory

With an actual example available here:

http://svn.codehaus.org/geoserver/branches/1.5.x/configuration/release/

-Justin

Thomas Zuberbuehler wrote:

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

--
Justin Deoliveira
The Open Planning Project
http://topp.openplans.org

Justin Deoliveira ha scritto:

Well my opinion has always been to never die in cases like these. As you
suggest spit out a warning saying the directory does not exist, and
create it. Ideally we should still be able to start up with none of data
dir directories being around.

Agreed. Can you open an issue for this? Handling it for 1.5.0 is probably a bit late, given the number of issues we already have to deal with, but would be nice to deal with it for 1.6.0
Cheers
Andrea

Can do. It is also a step in the right direction to being able to set up
mock testing.

http://jira.codehaus.org/browse/GEOS-956

-Justin

Andrea Aime wrote:

Justin Deoliveira ha scritto:

Well my opinion has always been to never die in cases like these. As you
suggest spit out a warning saying the directory does not exist, and
create it. Ideally we should still be able to start up with none of data
dir directories being around.

Agreed. Can you open an issue for this? Handling it for 1.5.0 is
probably a bit late, given the number of issues we already have to deal
with, but would be nice to deal with it for 1.6.0
Cheers
Andrea

!DSPAM:1004,45ed9b61327301527717022!

--
Justin Deoliveira
The Open Planning Project
http://topp.openplans.org

Justin, Thank you for your great help!!
You rescued my day. It works!

Regards over the ocean,
Thomas

2007/3/6, Justin Deoliveira <jdeolive@anonymised.com>:

Same problem but with the "plugIns" directory. Your data directory
structure should look as described here:

http://docs.codehaus.org/display/GEOSDOC/GeoServer+Data+Directory

With an actual example available here:

http://svn.codehaus.org/geoserver/branches/1.5.x/configuration/release/

-Justin

Thomas Zuberbuehler wrote:
> 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
>>
>

--
Justin Deoliveira
The Open Planning Project
http://topp.openplans.org

--
Thomas Zuberbuehler
http://www.zubi.li