[Geoserver-devel] [jira] Created: (GEOS-659) GeoServer throws an exception when a LockFeature request does not include a Filter

GeoServer throws an exception when a LockFeature request does not include a Filter
----------------------------------------------------------------------------------

         Key: GEOS-659
         URL: http://jira.codehaus.org/browse/GEOS-659
     Project: GeoServer
        Type: Bug

  Components: WFS
    Versions: 1.3.0, 1.3.1
    Reporter: Richard Gould
Assigned to: Richard Gould
    Priority: Minor
     Fix For: 1.3.x

If a LockFeature request does not include a Filter (which is optional in the WFS 1.0.0 specification), GeoServer throws a NullPointerException.

Example request:
<?xml version="1.0" ?><LockFeature version="1.0.0" service="WFS" lockAction="SOME" expiry="1" xmlns="http://www.opengis.net/wfs&quot; xmlns:ogc="http://www.opengis.net/ogc&quot; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot; xsi:schemaLocation="http://www.opengis.net/wfs ../wfs/1.0.0/WFS-transaction.xsd">
<Lock typeName="topp:states"/>
</LockFeature>

GeoServer exception:

131187 [WARNING] org.vfny.geoserver.ServiceException - encountered error: java.lang.NullPointerException: getFeatureReader requires Filter: did you mean Filter.NONE?
StackTrace: java.lang.NullPointerException: getFeatureReader requires Filter: did you mean Filter.NONE?
        at org.geotools.data.AbstractDataStore.getFeatureReader(AbstractDataStore.java:317)
        at org.geotools.data.DefaultFeatureResults.reader(DefaultFeatureResults.java:147)
        at org.vfny.geoserver.wfs.responses.LockResponse.performLock(LockResponse.java:191)
        at org.vfny.geoserver.wfs.responses.LockResponse.getXmlResponse(LockResponse.java:275)
        at org.vfny.geoserver.wfs.responses.LockResponse.execute(LockResponse.java:98)
        at org.vfny.geoserver.servlets.AbstractService.doService(AbstractService.java:452)
        at org.vfny.geoserver.servlets.AbstractService.doPost(AbstractService.java:390)
        at org.vfny.geoserver.wfs.servlets.WfsDispatcher.doResponse(WfsDispatcher.java:286)
        at org.vfny.geoserver.wfs.servlets.WfsDispatcher.doPost(WfsDispatcher.java:175)
        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)

org.vfny.geoserver.wfs.WfsException: java.lang.NullPointerException: getFeatureReader requires Filter: did you mean Filter.NONE?
        at org.vfny.geoserver.wfs.WfsExceptionHandler.newServiceException(WfsExceptionHandler.java:65)
        at org.vfny.geoserver.servlets.AbstractService.sendError(AbstractService.java:767)
        at org.vfny.geoserver.servlets.AbstractService.doService(AbstractService.java:467)
        at org.vfny.geoserver.servlets.AbstractService.doPost(AbstractService.java:390)
        at org.vfny.geoserver.wfs.servlets.WfsDispatcher.doResponse(WfsDispatcher.java:286)
        at org.vfny.geoserver.wfs.servlets.WfsDispatcher.doPost(WfsDispatcher.java:175)
        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)
Caused by: java.lang.NullPointerException: getFeatureReader requires Filter: did you mean Filter.NONE?
        at org.geotools.data.AbstractDataStore.getFeatureReader(AbstractDataStore.java:317)
        at org.geotools.data.DefaultFeatureResults.reader(DefaultFeatureResults.java:147)
        at org.vfny.geoserver.wfs.responses.LockResponse.performLock(LockResponse.java:191)
        at org.vfny.geoserver.wfs.responses.LockResponse.getXmlResponse(LockResponse.java:275)
        at org.vfny.geoserver.wfs.responses.LockResponse.execute(LockResponse.java:98)
        at org.vfny.geoserver.servlets.AbstractService.doService(AbstractService.java:452)
        ... 21 more

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira