Applying a WFS datastore causes NullPointerException

Description

When hitting 'Apply' after you have created a new feature type that is on a WFS data store, a null pointer exception is thrown:

org.vfny.geoserver.wfs.WfsException: java.util.NoSuchElementException: Could not locate FeatureTypeConfig 'topp:states'
at org.vfny.geoserver.wfs.WfsExceptionHandler.newServiceException(WfsExceptionHandler.java:65)
at org.vfny.geoserver.servlets.AbstractService.sendError(AbstractService.java:749)
at org.vfny.geoserver.servlets.AbstractService.doService(AbstractService.java:461)
at org.vfny.geoserver.servlets.AbstractService.doGet(AbstractService.java:276)
at org.vfny.geoserver.wfs.servlets.WfsDispatcher.doResponse(WfsDispatcher.java:284)
at org.vfny.geoserver.wfs.servlets.WfsDispatcher.doGet(WfsDispatcher.java:213)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:358)
at org.mortbay.jetty.servlet.WebApplicationHandler$Chain.doFilter(WebApplicationHandler.java:342)
at org.vfny.geoserver.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:122)
at org.mortbay.jetty.servlet.WebApplicationHandler$Chain.doFilter(WebApplicationHandler.java:334)
at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:286)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:567)
at org.mortbay.http.HttpContext.handle(HttpContext.java:1807)
at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:525)
at org.mortbay.http.HttpContext.handle(HttpContext.java:1757)
at org.mortbay.http.HttpServer.service(HttpServer.java:879)
at org.mortbay.http.HttpConnection.service(HttpConnection.java:790)
at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:961)
at org.mortbay.http.HttpConnection.handle(HttpConnection.java:807)
at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:197)
at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:276)
at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:511)
Caused by: java.util.NoSuchElementException: Could not locate FeatureTypeConfig 'topp:states'
at org.vfny.geoserver.global.Data.getFeatureTypeInfo(Data.java:850)
at org.vfny.geoserver.wfs.responses.DescribeResponse.getPrefix(DescribeResponse.java:503)
at org.vfny.geoserver.wfs.responses.DescribeResponse.allSameType(DescribeResponse.java:477)
at org.vfny.geoserver.wfs.responses.DescribeResponse.generateTypes(DescribeResponse.java:173)
at org.vfny.geoserver.wfs.responses.DescribeResponse.execute(DescribeResponse.java:97)
at org.vfny.geoserver.servlets.AbstractService.doService(AbstractService.java:449)
... 21 more
Feb 22, 2006 2:48:51 PM org.geotools.xml.handlers.xsi.RootHandler getHandler
WARNING: Starting schema with ServiceExceptionReport element.
java.lang.NullPointerException
at org.geotools.data.wfs.WFSDataStore.getSchemaGet(WFSDataStore.java:392)
at org.geotools.data.wfs.WFSDataStore.getSchema(WFSDataStore.java:293)
at org.vfny.geoserver.global.Data.loadFeatureTypes(Data.java:345)
at org.vfny.geoserver.global.Data.load(Data.java:154)
at org.vfny.geoserver.action.UpdateGSAction.updateGeoserver(UpdateGSAction.java:71)
at org.vfny.geoserver.action.UpdateGSAction.execute(UpdateGSAction.java:48)
at org.vfny.geoserver.action.ConfigAction.execute(ConfigAction.java:98)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:358)
at org.mortbay.jetty.servlet.WebApplicationHandler$Chain.doFilter(WebApplicationHandler.java:342)
at org.vfny.geoserver.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:122)
at org.mortbay.jetty.servlet.WebApplicationHandler$Chain.doFilter(WebApplicationHandler.java:334)
at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:286)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:567)
at org.mortbay.http.HttpContext.handle(HttpContext.java:1807)
at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:525)
at org.mortbay.http.HttpContext.handle(HttpContext.java:1757)
at org.mortbay.http.HttpServer.service(HttpServer.java:879)
at org.mortbay.http.HttpConnection.service(HttpConnection.java:790)
at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:961)
at org.mortbay.http.HttpConnection.handle(HttpConnection.java:807)
at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:197)
at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:276)
at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:511)

This has only been tested when the WFS datastore is on the same server (it is hitting itself).

Environment

None

Activity

Show:
codehaus
April 10, 2015, 4:23 PM

CodeHaus Comment From: bowens - Time: Wed, 22 Feb 2006 21:54:33 -0600
---------------------
<p>It works with fewer errors when you aren't targetting the same geoserver instance. Setting up two reduces the errors and it all works. There is just one problem left with the mappreview stuff that I will fix (bad file names with the namespace using a colon).</p>

codehaus
April 10, 2015, 4:23 PM

CodeHaus Comment From: bowens - Time: Thu, 23 Feb 2006 00:03:59 -0600
---------------------
<p>The map preview issue was solved and the direcotries and info.xml files write out correctly now.</p>

<p>The URLs are encoded using URLEncoder to change:

my_wfs_topp:states

into

my_wfs_topp%3Astates</p>

<p>so the directories and files can be writen to the file system.</p>

Assignee

Unassigned

Reporter

codehaus

Triage

None

Fix versions

Affects versions

None

Priority

High
Configure