[Geoserver-users] GetFeatureInfo to Geoserver

Hello all, I have a very simple client application that I am using to host a few vector layers. I used to be able to, prior to Geoserver 1.7.5, be able to specify multiple layers (features) in the QUERY_LAYERS parameter. Now when I add even more than one to the query I get back:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>

Which is very vauge, and this is what I get in the logs:

org.vfny.geoserver.wms.WmsException
at org.vfny.geoserver.wms.responses.featureInfo.AbstractFeatureInfoResponse.execute(AbstractFeatureInfoResponse.java:410)
at org.vfny.geoserver.wms.responses.featureInfo.GetFeatureInfoDelegate.execute(GetFeatureInfoDelegate.java:145)
at org.vfny.geoserver.wms.responses.featureInfo.GetFeatureInfoDelegate.execute(GetFeatureInfoDelegate.java:94)
at org.vfny.geoserver.wms.responses.GetFeatureInfoResponse.execute(GetFeatureInfoResponse.java:97)
at org.geoserver.ows.adapters.ResponseAdapter.getMimeType(ResponseAdapter.java:48)
at org.geoserver.ows.Dispatcher.response(Dispatcher.java:699)
at org.geoserver.ows.Dispatcher.handleRequestInternal(Dispatcher.java:216)
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:707)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
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:163)
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.ContextHandlerCollection.handle(ContextHandlerCollection.java:206)
at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
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.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:450)
Caused by: java.lang.NullPointerException
at org.vfny.geoserver.wms.responses.featureInfo.AbstractFeatureInfoResponse.getActiveRules(AbstractFeatureInfoResponse.java:438)
at org.vfny.geoserver.wms.responses.featureInfo.AbstractFeatureInfoResponse.execute(AbstractFeatureInfoResponse.java:245)
… 55 more

This is my query that fails:

http://localhost:8000/geoserver/wms?REQUEST=GetFeatureInfo&EXCEPTIONS=application%2Fvnd.ogc.se_xml&BBOX=-77.882455%2C39.066564%2C-76.902023%2C39.874194&X=444&Y=174&INFO_FORMAT=text%2Fhtml&QUERY_LAYERS=shape%3Amd_frederick_parcels_Parcels_Dist%2Cshape%3Amd_frederick_schools_Schools&FEATURE_COUNT=50&Layers=shape%3Amd_frederick_parcels_Parcels_Dist&Styles=&Srs=EPSG%3A4326&WIDTH=800&HEIGHT=659&format=image%2Fpng

Thanks!

web http://www.hyxspace.com
aim hyx1138

Robert Hicks ha scritto:

Hello all, I have a very simple client application that I am using to host a few vector layers. I used to be able to, prior to Geoserver 1.7.5, be able to specify multiple layers (features) in the QUERY_LAYERS parameter. Now when I add even more than one to the query I get back:

There is something going on with the styles. A valid GetFeatureInfo request requires the styles=... parameter, but I see you added it...
the only other way I can see things go wrong is that one of the layers
your requesting has no default style associated to it?

Cheers
Andrea

--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.

I checked both and they do have a default style assigned in the feature type. These are styles with some special icons specified in the sld but they come up independently in their own map preview demos. I did try changing the one with the icons back to just ‘point’ and it still failed with an Internal Server Error.

On Fri, Sep 18, 2009 at 9:10 AM, Andrea Aime <aaime@anonymised.com> wrote:

Robert Hicks ha scritto:

Hello all, I have a very simple client application that I am using to host a few vector layers. I used to be able to, prior to Geoserver 1.7.5, be able to specify multiple layers (features) in the QUERY_LAYERS parameter. Now when I add even more than one to the query I get back:

There is something going on with the styles. A valid GetFeatureInfo request requires the styles=… parameter, but I see you added it…
the only other way I can see things go wrong is that one of the layers
your requesting has no default style associated to it?

Cheers
Andrea


Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.


web http://www.hyxspace.com
aim hyx1138

Robert Hicks ha scritto:

I checked both and they do have a default style assigned in the feature type. These are styles with some special icons specified in the sld but they come up independently in their own map preview demos. I did try changing the one with the icons back to just 'point' and it still failed with an Internal Server Error.

Do styles have anything else specific? Scale dependencies maybe?
http://gridlock.openplans.org/geoserver/1.7.x/

Can you try out with a nightly build and see what error you get back?

Cheers
Andrea

--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.

On Fri, Sep 18, 2009 at 9:10 AM, Andrea Aime <aaime@anonymised.com> wrote:

Robert Hicks ha scritto:

Hello all, I have a very simple client application that I am using to
host a few vector layers. I used to be able to, prior to Geoserver
1.7.5, be able to specify multiple layers (features) in the QUERY_LAYERS
parameter. Now when I add even more than one to the query I get back:

There is something going on with the styles. A valid GetFeatureInfo
request requires the styles=... parameter, but I see you added it...
the only other way I can see things go wrong is that one of the layers
your requesting has no default style associated to it?

No this is the same problem I found - you need to name all the query
layers in the layers parameter or GeoServer throws an unhelpful error.

Ian
--
Ian Turton

Sent from State College, Pennsylvania, United States

Ian Turton ha scritto:

On Fri, Sep 18, 2009 at 9:10 AM, Andrea Aime <aaime@anonymised.com> wrote:

Robert Hicks ha scritto:

Hello all, I have a very simple client application that I am using to
host a few vector layers. I used to be able to, prior to Geoserver
1.7.5, be able to specify multiple layers (features) in the QUERY_LAYERS
parameter. Now when I add even more than one to the query I get back:

There is something going on with the styles. A valid GetFeatureInfo
request requires the styles=... parameter, but I see you added it...
the only other way I can see things go wrong is that one of the layers
your requesting has no default style associated to it?

No this is the same problem I found - you need to name all the query
layers in the layers parameter or GeoServer throws an unhelpful error.

Aah, duh, right, I forgot what the exact cause was, thanks for reminding
me. Yeah, the query_layers argument should be a subset of the layers
one

Cheers
Andrea

--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.

Yup, I checked out the new build and got a much better error message:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>

QUERY_LAYERS contains layers not cited in LAYERS. It should be a proper subset of those instead

Thanks, for your help guys!

On Fri, Sep 18, 2009 at 10:37 AM, Andrea Aime <aaime@anonymised.com.> wrote:

Ian Turton ha scritto:

On Fri, Sep 18, 2009 at 9:10 AM, Andrea Aime <aaime@anonymised.com> wrote:

Robert Hicks ha scritto:

Hello all, I have a very simple client application that I am using to
host a few vector layers. I used to be able to, prior to Geoserver
1.7.5, be able to specify multiple layers (features) in the QUERY_LAYERS
parameter. Now when I add even more than one to the query I get back:

There is something going on with the styles. A valid GetFeatureInfo
request requires the styles=… parameter, but I see you added it…
the only other way I can see things go wrong is that one of the layers
your requesting has no default style associated to it?

No this is the same problem I found - you need to name all the query
layers in the layers parameter or GeoServer throws an unhelpful error.

Aah, duh, right, I forgot what the exact cause was, thanks for reminding
me. Yeah, the query_layers argument should be a subset of the layers
one

Cheers
Andrea


Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.


web http://www.hyxspace.com
aim hyx1138

My simple application gives me the following error
"QUERY_LAYERS contains layers not cited in LAYERS. It should be a proper
subset of those instead". Yes, i do not want to query all layers so under
the 'layers' parameter under 'get feature info' i skipped adding a layer.
What should be the correct approach? How can i get rid of the error message?

Thanks

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/GetFeatureInfo-to-Geoserver-tp3802214p5147541.html
Sent from the GeoServer - User mailing list archive at Nabble.com.