[Geoserver-devel] [jira] Created: (GEOS-2211) WFS_getFeature-1.1.xml throws NullPointer exception

WFS_getFeature-1.1.xml throws NullPointer exception
----------------------------------------------------

                 Key: GEOS-2211
                 URL: http://jira.codehaus.org/browse/GEOS-2211
             Project: GeoServer
          Issue Type: Bug
          Components: PostGIS, WFS
    Affects Versions: 1.6.4
         Environment: Mac OS X running in tomcat 6.0.18 using Java 1.5.0_13 against postgis-1.3.3 on postgresql 8.3.1
            Reporter: Nick Palmer
            Assignee: Andrea Aime

When doing a WFS_getFeature-1.1 request I get a NullPointerException

Steps to Reproduce:
Install geoserver.war from 1.6.4 release into tomcat and deploy.
Add a new namespace.
Add a new postgis datastore in that namespace.
Create a view with an oid and geometry column with a POINT in the geometry column. I have a single row in that view.

Create a new feature set against the view.

Go to Demo and select Demo Request: i.e. /geoserver/demoRequest.do
Select WFS_getFeature-1.1.xml
Delete the filter from the query and change the feature set to be the one you just created.

That is, the request is:
<wfs:GetFeature service="WFS" version="1.1.0"
  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:xsi="http://www.w3.org/2001/XMLSchema-instance&quot;
  xsi:schemaLocation="http://www.opengis.net/wfs
                      http://schemas.opengis.net/wfs/1.1.0/wfs.xsd&quot;&gt;
  <wfs:Query typeName="namespace:feature">
    </wfs:Query>
</wfs:GetFeature>

This results in the following in the logs:

10 Sep 18:01:33 DEBUG [org.geotools.data.jdbc] - About to execute query: SELECT "oid", encode(asBinary(force_2d("geom"),'XDR'),'base64') FROM "public"."feature" LIMIT 1000000
10 Sep 18:01:33 DEBUG [org.geotools.xml] - _Feature is abstract
10 Sep 18:01:33 WARN [org.geoserver.ows] -
java.lang.NullPointerException
        at org.geotools.gml2.FeaturePropertyExtractor.properties(FeaturePropertyExtractor.java:60)
        at org.geotools.xml.Encoder.encode(Encoder.java:724)
        at org.geotools.xml.Encoder.encode(Encoder.java:471)
        at org.geoserver.wfs.xml.GML3OutputFormat.write(GML3OutputFormat.java:123)
        at org.geoserver.wfs.WFSGetFeatureOutputFormat.write(WFSGetFeatureOutputFormat.java:137)
        at org.geoserver.ows.Dispatcher.response(Dispatcher.java:629)
        at org.geoserver.ows.Dispatcher.handleRequestInternal(Dispatcher.java:192)
        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:637)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.vfny.geoserver.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.geoserver.filters.ReverseProxyFilter.doFilter(ReverseProxyFilter.java:170)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.geoserver.filters.LoggingFilter.doFilter(LoggingFilter.java:73)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.geoserver.filters.GZIPFilter.doFilter(GZIPFilter.java:47)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        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.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
        at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:354)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
        at java.lang.Thread.run(Thread.java:637)

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