[Geoserver-devel] [jira] Created: (GEOS-933) getFeatureInfo requests with application/vnd.ogc.gml fail with a NullPointer Exception

getFeatureInfo requests with application/vnd.ogc.gml fail with a NullPointer Exception
--------------------------------------------------------------------------------------

                 Key: GEOS-933
                 URL: http://jira.codehaus.org/browse/GEOS-933
             Project: GeoServer
          Issue Type: Bug
          Components: WMS
    Affects Versions: 1.4.0
         Environment: Windows XP
            Reporter: Ian Turton
         Assigned To: Gabriel Roldán

If you try a getFeatureRequest from the testServlet the first two formats listed in the capabilities formats work fine but gml doesn't.

http://localhost:8080/geoserver/wms?bbox=-130,24,-66,50&styles=population&format=jpeg&info_format=text/html&request=GetFeatureInfo&layers=topp:states&query_layers=topp:states&width=550&height=250&x=170&y=160
works where as
http://localhost:8080/geoserver/wms?bbox=-130,24,-66,50&styles=population&format=jpeg&info_format=application/vnd.ogc.gml&request=GetFeatureInfo&layers=topp:states&query_layers=topp:states&width=550&height=250&x=170&y=160 doesn't.

Stack trace from the log file is:
1320619 [INFO] org.vfny.geoserver.servlets.AbstractService - handling request: org.vfny.geoserver.wms.requests.GetFeatu
reInfoRequest@anonymised.com
java.lang.NullPointerException
        at org.vfny.geoserver.util.Requests.getBaseUrl(Requests.java:129)
        at org.vfny.geoserver.Request.getBaseUrl(Request.java:215)
        at org.vfny.geoserver.wfs.responses.GML2FeatureResponseDelegate.prepare(GML2FeatureResponseDelegate.java:138)
        at org.vfny.geoserver.wms.responses.featureInfo.GmlFeatureInfoResponse.writeTo(GmlFeatureInfoResponse.java:107)
        at org.vfny.geoserver.wms.responses.GetFeatureInfoResponse.writeTo(GetFeatureInfoResponse.java:176)
        at org.vfny.geoserver.servlets.AbstractService.doService(AbstractService.java:594)
        at org.vfny.geoserver.servlets.AbstractService.doGet(AbstractService.java:333)
        at org.geoserver.request.Dispatcher.dispatch(Dispatcher.java:183)
        at org.geoserver.request.Dispatcher.handleRequestInternal(Dispatcher.java:58)
        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.doGet(FrameworkServlet.java:347)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
        at org.vfny.geoserver.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:122)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
        at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java
:664)
        at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
        at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
        at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
        at java.lang.Thread.run(Thread.java:595)
1320649 [INFO] org.vfny.geoserver.servlets.PartialBufferStrategy - OutputStream was successfully aborted.
1320649 [INFO] org.vfny.geoserver.servlets.AbstractService - Had an undefined error: null
org.vfny.geoserver.wms.WmsException
        at org.vfny.geoserver.wms.WmsExceptionHandler.newServiceException(WmsExceptionHandler.java:64)
        at org.vfny.geoserver.servlets.AbstractService.sendError(AbstractService.java:881)
        at org.vfny.geoserver.servlets.AbstractService.doService(AbstractService.java:622)
        at org.vfny.geoserver.servlets.AbstractService.doGet(AbstractService.java:333)
        at org.geoserver.request.Dispatcher.dispatch(Dispatcher.java:183)
        at org.geoserver.request.Dispatcher.handleRequestInternal(Dispatcher.java:58)
        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.doGet(FrameworkServlet.java:347)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
        at org.vfny.geoserver.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:122)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
        at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java
:664)
        at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
        at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
        at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
        at java.lang.Thread.run(Thread.java:595)
Caused by: java.lang.NullPointerException
        at org.vfny.geoserver.util.Requests.getBaseUrl(Requests.java:129)
        at org.vfny.geoserver.Request.getBaseUrl(Request.java:215)
        at org.vfny.geoserver.wfs.responses.GML2FeatureResponseDelegate.prepare(GML2FeatureResponseDelegate.java:138)
        at org.vfny.geoserver.wms.responses.featureInfo.GmlFeatureInfoResponse.writeTo(GmlFeatureInfoResponse.java:107)
        at org.vfny.geoserver.wms.responses.GetFeatureInfoResponse.writeTo(GetFeatureInfoResponse.java:176)
        at org.vfny.geoserver.servlets.AbstractService.doService(AbstractService.java:594)
        ... 28 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