[Geoserver-devel] [jira] Created: (GEOS-1708) NPE when making a WFS 1.0 GetFeature with a bbox but no property name

NPE when making a WFS 1.0 GetFeature with a bbox but no property name
---------------------------------------------------------------------

                 Key: GEOS-1708
                 URL: http://jira.codehaus.org/browse/GEOS-1708
             Project: GeoServer
          Issue Type: Bug
          Components: WFS
    Affects Versions: 1.6.0-RC3
            Reporter: Andrea Aime
            Assignee: Justin Deoliveira
             Fix For: 1.6.0, 1.7.0-beta1

Making the following request against 1.6.0:

{code}
<wfs:GetFeature service="WFS" version="1.0.0"
  outputFormat="GML2"
  xmlns:topp="http://www.openplans.org/topp&quot;
  xmlns:wfs="http://www.opengis.net/wfs&quot;
  xmlns:ogc="http://www.opengis.net/ogc&quot;
  xmlns:gml="http://www.opengis.net/gml&quot;
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot;
  xsi:schemaLocation="http://www.opengis.net/wfs
                      http://schemas.opengis.net/wfs/1.0.0/WFS-basic.xsd&quot;&gt;
  <wfs:Query typeName="topp:states">
    <ogc:PropertyName>topp:STATE_NAME</ogc:PropertyName>
    <ogc:PropertyName>topp:PERSONS</ogc:PropertyName>
    <ogc:Filter>
      <ogc:BBOX>
        <gml:Box srsName="http://www.opengis.net/gml/srs/epsg.xml#4326&quot;&gt;
           <gml:coordinates>-75.102613,40.212597 -72.361859,41.512517</gml:coordinates>
        </gml:Box>
      </ogc:BBOX>
   </ogc:Filter>
  </wfs:Query>
</wfs:GetFeature>
{code}

returns the following NPE:

{code}
24 gen 10:22:49 WARN [geoserver.ows] -
java.lang.RuntimeException: Parsing failed for BBOX: java.lang.NullPointerException
  at org.geotools.xml.impl.ParseExecutor.visit(ParseExecutor.java:142)
  at org.geotools.xml.impl.BindingWalker$BindingExecutionChain.execute(BindingWalker.java:197)
  at org.geotools.xml.impl.BindingWalker.walk(BindingWalker.java:163)
  at org.geotools.xml.impl.ElementHandlerImpl.endElement(ElementHandlerImpl.java:222)
  at org.geotools.xml.impl.ParserHandler.endElement(ParserHandler.java:496)
  at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
  at org.apache.xerces.impl.xs.XMLSchemaValidator.endElement(Unknown Source)
  at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source)
  at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
  at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
  at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
  at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
  at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
  at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
  at org.geotools.xml.Parser.parse(Parser.java:185)
  at org.geotools.xml.Parser.parse(Parser.java:164)
  at org.geoserver.wfs.xml.v1_0_0.WfsXmlReader.read(WfsXmlReader.java:60)
  at org.geoserver.ows.Dispatcher.parseRequestXML(Dispatcher.java:1058)
  at org.geoserver.ows.Dispatcher.dispatch(Dispatcher.java:375)
  at org.geoserver.ows.Dispatcher.handleRequestInternal(Dispatcher.java:185)
  at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:139)
  at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:44)
  at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:684)
  at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:625)
  at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:392)
  at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:357)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
  at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:459)
  at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1054)
  at org.vfny.geoserver.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)
  at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1045)
  at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:264)
  at org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:107)
  at org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:72)
  at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
  at org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:110)
  at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
  at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
  at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
  at org.acegisecurity.ui.basicauth.BasicProcessingFilter.doFilter(BasicProcessingFilter.java:178)
  at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
  at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:229)
  at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
  at org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:148)
  at org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:98)
  at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1045)
  at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:358)
  at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:231)
  at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:629)
  at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:453)
  at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:141)
  at org.mortbay.jetty.Server.handle(Server.java:303)
  at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:452)
  at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:735)
  at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:636)
  at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:203)
  at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:349)
  at org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:217)
  at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:475)
Caused by: java.lang.NullPointerException
  at org.geotools.filter.v1_0.OGCBBOXTypeBinding.parse(OGCBBOXTypeBinding.java:115)
  at org.geotools.xml.impl.ParseExecutor.visit(ParseExecutor.java:130)
  ... 59 more
{code}

Even posting the request against http://geo.openplans.org:8080/geoserver/wfs?strict=true does
not return a proper error message (the above request is invalid according to the schema...).

Now, I do believe stuff is chocking because in the past we accepted that kind of request
and used the default geometry, but I'm really in the realm of possibilities.

In any case, we should either try to comply with the request somehow, or report
that the request is invalid...

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