REST request to get coverages metadata in json format

View: New views
2 Messages — Rating Filter:   Alert me  

REST request to get coverages metadata in json format

by Tobia Di Pisa :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

some days ago I have opened a JIRA in order to report a problem in GeoServer.

I have found a bug in GeoServer REST request to get coverages metadata in json format.

If I send the following request:

http://localhost:8080/geoserver/rest/workspaces/nurc/coveragestores/mosaic/coverages/mosaic.json

GeoServer produces an exception as the following:

28 ott 18:33:45 ERROR [/geoserver] - Exception intercepted
com.thoughtworks.xstream.io.StreamException:  : null
       at com.thoughtworks.xstream.io.xml.StaxWriter.setValue(StaxWriter.java:122)
       at com.thoughtworks.xstream.converters.SingleValueConverterWrapper.marshal(SingleValueConverterWrapper.java:45)
       at com.thoughtworks.xstream.core.TreeMarshaller.convert(TreeMarshaller.java:86)
       at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:78)
       at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:63)
       at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.writeItem(AbstractCollectionConverter.java:64)
       at com.thoughtworks.xstream.converters.collections.MapConverter.marshal(MapConverter.java:58)
       at com.thoughtworks.xstream.core.TreeMarshaller.convert(TreeMarshaller.java:86)
       at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:78)
       at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.marshallField(AbstractReflectionConverter.java:157)
       at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter$2.writeField(AbstractReflectionConverter.java:148)
       at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter$2.visit(AbstractReflectionConverter.java:118)
       at org.geoserver.config.util.XStreamPersister$CustomReflectionProvider$VisitorWrapper.visit(XStreamPersister.java:469)
       at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:129)
       at org.geoserver.config.util.XStreamPersister$CustomReflectionProvider.visitSerializableFields(XStreamPersister.java:445)
       at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.doMarshal(AbstractReflectionConverter.java:100)
       at org.geoserver.config.util.XStreamPersister$AbstractReflectionConverter.doMarshal(XStreamPersister.java:1027)
       at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.marshal(AbstractReflectionConverter.java:58)
       at com.thoughtworks.xstream.core.TreeMarshaller.convert(TreeMarshaller.java:86)
       at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:78)
       at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:63)
       at com.thoughtworks.xstream.core.TreeMarshaller.start(TreeMarshaller.java:98)
       at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.marshal(AbstractTreeMarshallingStrategy.java:38)
       at com.thoughtworks.xstream.XStream.marshal(XStream.java:837)
       at com.thoughtworks.xstream.XStream.marshal(XStream.java:826)
       at com.thoughtworks.xstream.XStream.toXML(XStream.java:801)
       at org.geoserver.config.util.XStreamPersister.save(XStreamPersister.java:396)
       at org.geoserver.catalog.rest.AbstractCatalogResource$2.write(AbstractCatalogResource.java:66)
       at org.geoserver.rest.format.StreamDataFormat$1.write(StreamDataFormat.java:48)
       at com.noelios.restlet.http.HttpServerCall.writeResponseBody(HttpServerCall.java:342)
       at com.noelios.restlet.http.HttpServerCall.sendResponse(HttpServerCall.java:306)
       at com.noelios.restlet.ext.servlet.ServletCall.sendResponse(ServletCall.java:306)
       at com.noelios.restlet.http.HttpServerConverter.commit(HttpServerConverter.java:90)
       at com.noelios.restlet.ext.servlet.ServletConverter.service(ServletConverter.java:130)
       at org.geoserver.rest.RESTDispatcher.handleRequestInternal(RESTDispatcher.java:79)
       at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
       at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
       at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:875)
       at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:809)
       at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:571)
       at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:501)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
       at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
       at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1093)
       at org.vfny.geoserver.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)
       at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
       at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:265)
       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:275)
       at org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:124)
       at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
       at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
       at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
       at org.acegisecurity.ui.basicauth.BasicProcessingFilter.doFilter(BasicProcessingFilter.java:174)
       at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
       at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
       at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
       at org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:149)
       at org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:98)
       at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
       at org.geoserver.filters.LoggingFilter.doFilter(LoggingFilter.java:73)
       at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
       at org.geoserver.filters.ReverseProxyFilter.doFilter(ReverseProxyFilter.java:183)
       at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
       at org.geoserver.filters.GZIPFilter.doFilter(GZIPFilter.java:41)
       at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
       at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)
       at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
       at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
       at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:726)
       at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
       at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
       at org.mortbay.jetty.Server.handle(Server.java:324)
       at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
       at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:828)
       at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514)
       at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
       at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
       at org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228)
       at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:450)
Caused by: javax.xml.stream.XMLStreamException
       at org.codehaus.jettison.mapped.MappedXMLStreamWriter.writeCharacters(MappedXMLStreamWriter.java:171)
       at com.thoughtworks.xstream.io.xml.StaxWriter.setValue(StaxWriter.java:119)
       ... 81 more

... and the .json file results empty.

I think that this problem can depend on the presence of NaN values.

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Geoserver-users mailing list
Geoserver-users@...
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Re: REST request to get coverages metadata in json format

by Justin Deoliveira-6 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Yikes, confirmed. Thanks for the bug report. This will be fixed for 2.0.1.

-Justin

Tobia Di Pisa wrote:

> Hi,
>
> some days ago I have opened a JIRA in order to report a problem in
> GeoServer.
>
> I have found a bug in GeoServer REST request to get coverages metadata
> in json format.
>
> If I send the following request:
>
> http://localhost:8080/geoserver/rest/workspaces/nurc/coveragestores/mosaic/coverages/mosaic.json
>
> GeoServer produces an exception as the following:
>
> 28 ott 18:33:45 ERROR [/geoserver] - Exception intercepted
> com.thoughtworks.xstream.io.StreamException:  : null
>        at
> com.thoughtworks.xstream.io.xml.StaxWriter.setValue(StaxWriter.java:122)
>        at
> com.thoughtworks.xstream.converters.SingleValueConverterWrapper.marshal(SingleValueConverterWrapper.java:45)
>        at
> com.thoughtworks.xstream.core.TreeMarshaller.convert(TreeMarshaller.java:86)
>        at
> com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:78)
>        at
> com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:63)
>        at
> com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.writeItem(AbstractCollectionConverter.java:64)
>        at
> com.thoughtworks.xstream.converters.collections.MapConverter.marshal(MapConverter.java:58)
>        at
> com.thoughtworks.xstream.core.TreeMarshaller.convert(TreeMarshaller.java:86)
>        at
> com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:78)
>        at
> com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.marshallField(AbstractReflectionConverter.java:157)
>        at
> com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter$2.writeField(AbstractReflectionConverter.java:148)
>        at
> com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter$2.visit(AbstractReflectionConverter.java:118)
>        at
> org.geoserver.config.util.XStreamPersister$CustomReflectionProvider$VisitorWrapper.visit(XStreamPersister.java:469)
>        at
> com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:129)
>        at
> org.geoserver.config.util.XStreamPersister$CustomReflectionProvider.visitSerializableFields(XStreamPersister.java:445)
>        at
> com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.doMarshal(AbstractReflectionConverter.java:100)
>        at
> org.geoserver.config.util.XStreamPersister$AbstractReflectionConverter.doMarshal(XStreamPersister.java:1027)
>        at
> com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.marshal(AbstractReflectionConverter.java:58)
>        at
> com.thoughtworks.xstream.core.TreeMarshaller.convert(TreeMarshaller.java:86)
>        at
> com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:78)
>        at
> com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:63)
>        at
> com.thoughtworks.xstream.core.TreeMarshaller.start(TreeMarshaller.java:98)
>        at
> com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.marshal(AbstractTreeMarshallingStrategy.java:38)
>        at com.thoughtworks.xstream.XStream.marshal(XStream.java:837)
>        at com.thoughtworks.xstream.XStream.marshal(XStream.java:826)
>        at com.thoughtworks.xstream.XStream.toXML(XStream.java:801)
>        at
> org.geoserver.config.util.XStreamPersister.save(XStreamPersister.java:396)
>        at
> org.geoserver.catalog.rest.AbstractCatalogResource$2.write(AbstractCatalogResource.java:66)
>        at
> org.geoserver.rest.format.StreamDataFormat$1.write(StreamDataFormat.java:48)
>        at
> com.noelios.restlet.http.HttpServerCall.writeResponseBody(HttpServerCall.java:342)
>        at
> com.noelios.restlet.http.HttpServerCall.sendResponse(HttpServerCall.java:306)
>        at
> com.noelios.restlet.ext.servlet.ServletCall.sendResponse(ServletCall.java:306)
>        at
> com.noelios.restlet.http.HttpServerConverter.commit(HttpServerConverter.java:90)
>        at
> com.noelios.restlet.ext.servlet.ServletConverter.service(ServletConverter.java:130)
>        at
> org.geoserver.rest.RESTDispatcher.handleRequestInternal(RESTDispatcher.java:79)
>        at
> org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
>        at
> org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
>        at
> org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:875)
>        at
> org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:809)
>        at
> org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:571)
>        at
> org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:501)
>        at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
>        at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>        at
> org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
>        at
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1093)
>        at
> org.vfny.geoserver.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)
>        at
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
>        at
> org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:265)
>        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:275)
>        at
> org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:124)
>        at
> org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
>        at
> org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
>        at
> org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
>        at
> org.acegisecurity.ui.basicauth.BasicProcessingFilter.doFilter(BasicProcessingFilter.java:174)
>        at
> org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
>        at
> org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
>        at
> org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
>        at
> org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:149)
>        at
> org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:98)
>        at
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
>        at
> org.geoserver.filters.LoggingFilter.doFilter(LoggingFilter.java:73)
>        at
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
>        at
> org.geoserver.filters.ReverseProxyFilter.doFilter(ReverseProxyFilter.java:183)
>        at
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
>        at org.geoserver.filters.GZIPFilter.doFilter(GZIPFilter.java:41)
>        at
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
>        at
> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)
>        at
> org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
>        at
> org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
>        at
> org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:726)
>        at
> org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
>        at
> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
>        at org.mortbay.jetty.Server.handle(Server.java:324)
>        at
> org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
>        at
> org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:828)
>        at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514)
>        at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
>        at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
>        at
> org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228)
>        at
> org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:450)
> Caused by: javax.xml.stream.XMLStreamException
>        at
> org.codehaus.jettison.mapped.MappedXMLStreamWriter.writeCharacters(MappedXMLStreamWriter.java:171)
>        at
> com.thoughtworks.xstream.io.xml.StaxWriter.setValue(StaxWriter.java:119)
>        ... 81 more
>
> ... and the .json file results empty.
>
> I think that this problem can depend on the presence of NaN values.
>
>
> ------------------------------------------------------------------------
>
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay
> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
> http://p.sf.net/sfu/devconference
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Geoserver-users mailing list
> Geoserver-users@...
> https://lists.sourceforge.net/lists/listinfo/geoserver-users

--
Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Geoserver-users mailing list
Geoserver-users@...
https://lists.sourceforge.net/lists/listinfo/geoserver-users