[Geoserver-devel] [jira] Created: (GEOS-1069) WFS POST request without service specification causes NPE

WFS POST request without service specification causes NPE
---------------------------------------------------------

                 Key: GEOS-1069
                 URL: http://jira.codehaus.org/browse/GEOS-1069
             Project: GeoServer
          Issue Type: Bug
          Components: WFS
    Affects Versions: 1.5.0
            Reporter: Andrea Aime
            Assignee: Andrea Aime

The dispatcher assumes XML requests do always contain a service="xxx" statement, whilst it's not guaranteed for service requests that aren't conformant to the WFS xml schema.

We have to either protect against the NPE or validate the request against the schema before dispatching it (this may be problematic for big WFS Transaction request, that would suffer from the NPE as every other WFS request...)

The full stack trace is:

2007-04-30 15:13:19.171::WARN: /geoserver/wfs
java.lang.NullPointerException
  at org.geoserver.request.Dispatcher.find(Dispatcher.java:84)
  at org.geoserver.request.Dispatcher.post(Dispatcher.java:280)
  at org.geoserver.request.Dispatcher.dispatch(Dispatcher.java:181)
  at org.geoserver.request.Dispatcher.handleRequestInternal(Dispatcher.java:52)
  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:445)
  at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1050)
  at org.vfny.geoserver.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:103)
  at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1041)
  at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:354)
  at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:226)
  at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:627)
  at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:141)
  at org.mortbay.jetty.Server.handle(Server.java:269)
  at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:430)
  at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:701)
  at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:617)
  at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:199)
  at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:339)
  at org.mortbay.jetty.nio.HttpChannelEndPoint.run(HttpChannelEndPoint.java:270)
  at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:475)

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