GetFeature returns with a null pointer exception
------------------------------------------------
Key: GEOS-1025
URL: http://jira.codehaus.org/browse/GEOS-1025
Project: GeoServer
Issue Type: Bug
Components: WFS
Affects Versions: 1.6.0-alpha2
Reporter: Andrea Aime
Assigned To: Justin Deoliveira
Doing a WFS 1.1 GetFeature on current GeoServer trunk breaks with the following stack trace:
AVVERTENZA: Invalid(?) XML declaration: <wfs:G.
java.lang.RuntimeException: Parsing failed for typeName: java.lang.NullPointerException
at org.geotools.xml.impl.ParseExecutor.visit(ParseExecutor.java:144)
at org.geotools.xml.impl.BindingWalker$BindingExecutionChain.execute(BindingWalker.java:204)
at org.geotools.xml.impl.BindingWalker.walk(BindingWalker.java:163)
at org.geotools.xml.impl.BindingWalker.walk(BindingWalker.java:167)
at org.geotools.xml.impl.ElementHandlerImpl.startElement(ElementHandlerImpl.java:173)
at org.geotools.xml.impl.ParserHandler.startElement(ParserHandler.java:380)
at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(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.XML11Configuration.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:184)
at org.geoserver.wfs.xml.v1_1_0.WfsXmlReader.read(WfsXmlReader.java:53)
at org.geoserver.ows.Dispatcher.parseRequestXML(Dispatcher.java:975)
at org.geoserver.ows.Dispatcher.dispatch(Dispatcher.java:364)
at org.geoserver.ows.Dispatcher.handleRequestInternal(Dispatcher.java:197)
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:108)
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.bio.SocketConnector$Connection.run(SocketConnector.java:208)
at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:475)
Caused by: java.lang.NullPointerException
at org.geoserver.wfs.xml.v1_1_0.TypeNameListTypeBinding.parse(TypeNameListTypeBinding.java:82)
at org.geotools.xml.impl.ParseExecutor.visit(ParseExecutor.java:130)
... 42 more
where the request is the sample wfs 1.1 request in the release configuration
<wfs:GetFeature service="WFS" version="1.1.0"
xmlns:topp="http://www.openplans.org/topp"
xmlns:wfs="http://www.opengis.net/wfs"
xmlns:ogc="http://www.opengis.net/ogc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.opengis.net/wfs
http://schemas.opengis.net/wfs/1.1.0/wfs.xsd">
<wfs:Query typeName="topp:states">
</wfs:Query>
</wfs:GetFeature>
I can reproduce this both on standard and wfsv configuration.
WFS 1.0 GetFeature works fine instead.
--
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