GeoTools
  1. GeoTools
  2. GEOT-4086

GetFeatureInfo on app-schema based WMS layer fails

    Details

    • Type: Bug Bug
    • Status: Resolved Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: app-schema plugin
    • Labels:
      None

      Description

      A working Geoserver WMS layer has been configured based on the GeoSciML Thematic View application schema.

      While this schema conforms to the GML SF-0 profile (it is a 'simple features' schema) is has been configued using app-schema to ensure that the underlying layer is a feature type from a schema, rather than a crude delivery of a database table.

      Configuration files at:
      http://geology.data.vic.gov.au/svn/repository1/services/wfs-testbed/4.0/geoserver/config/workspaces/gsmltv
      A working Geoserver WMS layer has been configured based on the GeoSciML Thematic View application schema.

      While this schema conforms to the GML SF-0 profile (it is a 'simple features' schema) is has been configued using app-schema to ensure that the underlying layer is a feature type from a schema, rather than a crude delivery of a database table.

      Configuration files at:
      http://geology.data.vic.gov.au/svn/repository1/services/wfs-testbed/4.0/geoserver/config/workspaces/gsmltv

      Sample data at:
      http://geology.data.vic.gov.au/svn/repository1/services/wfs-testbed/4.0/working/geosciml-tv-testbed-sample-data.txt

      The service returns layers, and successfully applies SLDs to the features, but when a GetFeatureInfo request is sent to the server (in this case from uDig) the following exception is thrown:

      04 Jul 16:11:19 INFO [geoserver.wms] -
      Request: getMap
      Time = []
      Filter = null
      Format = image/png
      Buffer = 0
      Width = 1354
      Angle = 0.0
      Height = 625
      Exceptions = application/vnd.ogc.se_xml
      Filters = null
      Tiled = false
      Palette = null
      SRS = EPSG:4283
      Legend = false
      Styles = [StyleImpl[ name=geology-stratigraphy]]
      Layers = [org.geoserver.wms.MapLayerInfo@a0ee375e]
      MaxFeatures = null
      Bbox = ReferencedEnvelope[143.26402677620965 : 145.2819565987734, -37.47355835932895 : -36.54209149145285]
      FormatOptions = {}
      CQLFilter = null
      Elevation = []
      FeatureId = null
      RemoteOwsType = null
      RemoteOwsURL = null
      Sld = null
      SldBody = null
      StartIndex = null
      ViewParams = null
      Crs = GEOGCS["GDA94",
      DATUM["Geocentric Datum of Australia 1994",
      SPHEROID["GRS 1980", 6378137.0, 298.257222101, AUTHORITY["EPSG","7019"]],
      TOWGS84[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
      AUTHORITY["EPSG","6283"]],
      PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]],
      UNIT["degree", 0.017453292519943295],
      AXIS["Geodetic longitude", EAST],
      AXIS["Geodetic latitude", NORTH],
      AUTHORITY["EPSG","4283"]]
      Env = {}
      BgColor = java.awt.Color[r=255,g=255,b=255]
      Transparent = true
      FeatureVersion = null
      ValidateSchema = false
      SldVersion = null
      TilesOrigin = null
      KMScore = 40
      KMattr = true
      Version = 1.1.1
      Request = GetMap
      Get = true
      RawKvp =

      {BBOX=143.26402677620965,-37.47355835932895,145.2819565987734,-36.54209149145285, TRANSPARENT=TRUE, EXCEPTIONS=application/vnd.ogc.se_xml, VERSION=1.1.1, FORMAT=image/png, SERVICE=WMS, HEIGHT=625, REQUEST=GetMap, LAYERS=gsmltv:GeologicUnitView, STYLES=geology-stratigraphy, WIDTH=1354, SRS=EPSG:4283}

      BaseUrl = http://d00109:8082/geosciml-testbed/
      RequestCharset = UTF-8
      04 Jul 16:11:25 INFO [geoserver.wms] -
      Request: getServiceInfo
      04 Jul 16:11:25 ERROR [geoserver.ows] -
      org.geoserver.platform.ServiceException: Internal error occurred
      at org.geoserver.wms.GetFeatureInfo.execute(GetFeatureInfo.java:187)
      at org.geoserver.wms.GetFeatureInfo.run(GetFeatureInfo.java:126)
      at org.geoserver.wms.DefaultWebMapService.getFeatureInfo(DefaultWebMapService.java:370)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
      at org.geoserver.ows.util.RequestObjectLogger.invoke(RequestObjectLogger.java:54)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
      at $Proxy367.getFeatureInfo(Unknown Source)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.geoserver.ows.Dispatcher.execute(Dispatcher.java:630)
      at org.geoserver.ows.Dispatcher.handleRequestInternal(Dispatcher.java:234)
      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:790)
      at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719)
      at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644)
      at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:549)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.geoserver.filters.ThreadLocalsCleanupFilter.doFilter(ThreadLocalsCleanupFilter.java:23)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:74)
      at org.geoserver.filters.SpringDelegatingFilter.doFilter(SpringDelegatingFilter.java:45)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.geoserver.platform.AdvancedDispatchFilter.doFilter(AdvancedDispatchFilter.java:49)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.vfny.geoserver.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:109)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:368)
      at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109)
      at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
      at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
      at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:97)
      at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
      at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:78)
      at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
      at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:177)
      at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
      at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:79)
      at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
      at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:169)
      at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237)
      at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.geoserver.filters.LoggingFilter.doFilter(LoggingFilter.java:71)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.geoserver.filters.ReverseProxyFilter.doFilter(ReverseProxyFilter.java:183)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.geoserver.filters.GZIPFilter.doFilter(GZIPFilter.java:41)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.geoserver.filters.SessionDebugFilter.doFilter(SessionDebugFilter.java:46)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      at org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:394)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
      at java.lang.Thread.run(Thread.java:619)
      Caused by: java.lang.IllegalArgumentException: The provided feature collection contains complex features, cannot be bridged to a simple one
      at org.geotools.data.DataUtilities.simple(DataUtilities.java:1242)
      at org.geoserver.wms.GetFeatureInfo.identifyVectorLayer(GetFeatureInfo.java:482)
      at org.geoserver.wms.GetFeatureInfo.execute(GetFeatureInfo.java:239)
      at org.geoserver.wms.GetFeatureInfo.execute(GetFeatureInfo.java:183)
      ... 82 more
      Sample data at:
      http://geology.data.vic.gov.au/svn/repository1/services/wfs-testbed/4.0/working/geosciml-tv-testbed-sample-data.txt

      The service returns layers, and successfully applies SLDs to the features, but when a GetFeatureInfo request is sent to the server (in this case from uDig) the following exception is thrown:

      04 Jul 16:11:19 INFO [geoserver.wms] -
      Request: getMap
      Time = []
      Filter = null
      Format = image/png
      Buffer = 0
      Width = 1354
      Angle = 0.0
      Height = 625
      Exceptions = application/vnd.ogc.se_xml
      Filters = null
      Tiled = false
      Palette = null
      SRS = EPSG:4283
      Legend = false
      Styles = [StyleImpl[ name=geology-stratigraphy]]
      Layers = [org.geoserver.wms.MapLayerInfo@a0ee375e]
      MaxFeatures = null
      Bbox = ReferencedEnvelope[143.26402677620965 : 145.2819565987734, -37.47355835932895 : -36.54209149145285]
      FormatOptions = {}
      CQLFilter = null
      Elevation = []
      FeatureId = null
      RemoteOwsType = null
      RemoteOwsURL = null
      Sld = null
      SldBody = null
      StartIndex = null
      ViewParams = null
      Crs = GEOGCS["GDA94",
      DATUM["Geocentric Datum of Australia 1994",
      SPHEROID["GRS 1980", 6378137.0, 298.257222101, AUTHORITY["EPSG","7019"]],
      TOWGS84[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
      AUTHORITY["EPSG","6283"]],
      PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]],
      UNIT["degree", 0.017453292519943295],
      AXIS["Geodetic longitude", EAST],
      AXIS["Geodetic latitude", NORTH],
      AUTHORITY["EPSG","4283"]]
      Env = {}
      BgColor = java.awt.Color[r=255,g=255,b=255]
      Transparent = true
      FeatureVersion = null
      ValidateSchema = false
      SldVersion = null
      TilesOrigin = null
      KMScore = 40
      KMattr = true
      Version = 1.1.1
      Request = GetMap
      Get = true
      RawKvp =

      {BBOX=143.26402677620965,-37.47355835932895,145.2819565987734,-36.54209149145285, TRANSPARENT=TRUE, EXCEPTIONS=application/vnd.ogc.se_xml, VERSION=1.1.1, FORMAT=image/png, SERVICE=WMS, HEIGHT=625, REQUEST=GetMap, LAYERS=gsmltv:GeologicUnitView, STYLES=geology-stratigraphy, WIDTH=1354, SRS=EPSG:4283}

      BaseUrl = http://d00109:8082/geosciml-testbed/
      RequestCharset = UTF-8
      04 Jul 16:11:25 INFO [geoserver.wms] -
      Request: getServiceInfo
      04 Jul 16:11:25 ERROR [geoserver.ows] -
      org.geoserver.platform.ServiceException: Internal error occurred
      at org.geoserver.wms.GetFeatureInfo.execute(GetFeatureInfo.java:187)
      at org.geoserver.wms.GetFeatureInfo.run(GetFeatureInfo.java:126)
      at org.geoserver.wms.DefaultWebMapService.getFeatureInfo(DefaultWebMapService.java:370)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
      at org.geoserver.ows.util.RequestObjectLogger.invoke(RequestObjectLogger.java:54)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
      at $Proxy367.getFeatureInfo(Unknown Source)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.geoserver.ows.Dispatcher.execute(Dispatcher.java:630)
      at org.geoserver.ows.Dispatcher.handleRequestInternal(Dispatcher.java:234)
      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:790)
      at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719)
      at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644)
      at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:549)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.geoserver.filters.ThreadLocalsCleanupFilter.doFilter(ThreadLocalsCleanupFilter.java:23)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:74)
      at org.geoserver.filters.SpringDelegatingFilter.doFilter(SpringDelegatingFilter.java:45)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.geoserver.platform.AdvancedDispatchFilter.doFilter(AdvancedDispatchFilter.java:49)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.vfny.geoserver.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:109)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:368)
      at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109)
      at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
      at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
      at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:97)
      at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
      at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:78)
      at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
      at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:177)
      at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
      at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:79)
      at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
      at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:169)
      at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237)
      at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.geoserver.filters.LoggingFilter.doFilter(LoggingFilter.java:71)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.geoserver.filters.ReverseProxyFilter.doFilter(ReverseProxyFilter.java:183)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.geoserver.filters.GZIPFilter.doFilter(GZIPFilter.java:41)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.geoserver.filters.SessionDebugFilter.doFilter(SessionDebugFilter.java:46)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      at org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:394)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
      at java.lang.Thread.run(Thread.java:619)
      Caused by: java.lang.IllegalArgumentException: The provided feature collection contains complex features, cannot be bridged to a simple one
      at org.geotools.data.DataUtilities.simple(DataUtilities.java:1242)
      at org.geoserver.wms.GetFeatureInfo.identifyVectorLayer(GetFeatureInfo.java:482)
      at org.geoserver.wms.GetFeatureInfo.execute(GetFeatureInfo.java:239)
      at org.geoserver.wms.GetFeatureInfo.execute(GetFeatureInfo.java:183)
      ... 82 more

        Activity

        Hide
        Niels Charlier added a comment -
        Rini Angreani wrote :

        The problem is in GetFeatureInfo.identifyVectorLayer():
        // see if we can include the rule filters as well, if too many we'll do them in
        // memory
                Filter postFilter = Filter.INCLUDE;
                Filter rulesFilters = buildRulesFilter(ff, rules);
                if (!(rulesFilters instanceof Or)
                        || (rulesFilters instanceof Or && ((Or) rulesFilters).getChildren().size() <= 20)) {
                    getFInfoFilter = ff.and(getFInfoFilter, rulesFilters);
                } else {
                    postFilter = rulesFilters;
                }
        ...

        and then:

        if (!Filter.INCLUDE.equals(postFilter)) {
                    match = DataUtilities.simple(new FilteringFeatureCollection(match, postFilter));
        }

        So basically if the style has > 20 rules with filters, it will try to do it in the memory, but this part of the code that does it in memory only supports simple features.
        The style being used in this case has > 20 rules with filters (http://gsv-ws.dpi.vic.gov.au/svn/repository1/services/wxs-testbed/4.0/geoserver/config-250k/styles/geology-stratigraphy.sld).
        The fix is simple, to add a check for ComplexFeatureType for the schema to avoid this logic.
        Show
        Niels Charlier added a comment - Rini Angreani wrote : The problem is in GetFeatureInfo.identifyVectorLayer(): // see if we can include the rule filters as well, if too many we'll do them in // memory         Filter postFilter = Filter.INCLUDE;         Filter rulesFilters = buildRulesFilter(ff, rules);         if (!(rulesFilters instanceof Or)                 || (rulesFilters instanceof Or && ((Or) rulesFilters).getChildren().size() <= 20)) {             getFInfoFilter = ff.and(getFInfoFilter, rulesFilters);         } else {             postFilter = rulesFilters;         } ... and then: if (!Filter.INCLUDE.equals(postFilter)) {             match = DataUtilities.simple(new FilteringFeatureCollection(match, postFilter)); } So basically if the style has > 20 rules with filters, it will try to do it in the memory, but this part of the code that does it in memory only supports simple features. The style being used in this case has > 20 rules with filters ( http://gsv-ws.dpi.vic.gov.au/svn/repository1/services/wxs-testbed/4.0/geoserver/config-250k/styles/geology-stratigraphy.sld ). The fix is simple, to add a check for ComplexFeatureType for the schema to avoid this logic.
        Hide
        Niels Charlier added a comment -
        geoserver patch for issue , includes changes in wms and test in app-schema-test
        Show
        Niels Charlier added a comment - geoserver patch for issue , includes changes in wms and test in app-schema-test
        Hide
        Niels Charlier added a comment - - edited
        Rini's analysis was right, but I also have a problem with this line:

        DataUtilities.simple(new FilteringFeatureCollection(match, postFilter));

        This is a cast or conversion to simple features, assuming that you get a simple feature type. These kind of assumptions need to go away for app-schema compatibility. It also isn't necessary in this case, there is no reason why a FilteringFeatureCollection cannot be returned (I confirmed that all tests pass), this is probably old code from when everything was still relying on simple features.

        However, after simply removing the 'simple' method call and directly returning the FilteringFC, the error was fixed but I still decided to cancel out the post-filtering for non simple feature types ( so app-schema resources). App-schema deals with filtering itself, and post-filters can be deadly slow if it's a non-joining configuration. I think Ideally, all featuresources should make their own decisions on post-filtering and pre-filtering, based on whether their are two many filters etc... for that specific datasource type. But just in case, I left the logic in there for simple features.
        Show
        Niels Charlier added a comment - - edited Rini's analysis was right, but I also have a problem with this line: DataUtilities.simple(new FilteringFeatureCollection(match, postFilter)); This is a cast or conversion to simple features, assuming that you get a simple feature type. These kind of assumptions need to go away for app-schema compatibility. It also isn't necessary in this case, there is no reason why a FilteringFeatureCollection cannot be returned (I confirmed that all tests pass), this is probably old code from when everything was still relying on simple features. However, after simply removing the 'simple' method call and directly returning the FilteringFC, the error was fixed but I still decided to cancel out the post-filtering for non simple feature types ( so app-schema resources). App-schema deals with filtering itself, and post-filters can be deadly slow if it's a non-joining configuration. I think Ideally, all featuresources should make their own decisions on post-filtering and pre-filtering, based on whether their are two many filters etc... for that specific datasource type. But just in case, I left the logic in there for simple features.
        Hide
        Niels Charlier added a comment -
        Andrea, can you check wms part and approve if okay
        Show
        Niels Charlier added a comment - Andrea, can you check wms part and approve if okay
        Hide
        Andrea Aime added a comment -
        Ticket in the wrong project, should have been GeoSerer
        Show
        Andrea Aime added a comment - Ticket in the wrong project, should have been GeoSerer
        Hide
        Andrea Aime added a comment -
        About the patch, you're missing a parenthesis, it should be:

        {code}
        if (featureSource.getSchema() instanceof SimpleFeatureType && !((rulesFilters instanceof Or)
                         || (rulesFilters instanceof Or && ((Or) rulesFilters).getChildren().size() <= 20))) {
        {code}

        The logic seems also flipped. If you want to pass down a very large filter fully to the app-schema module
        the test should probably be:
        {code}
        if (!(featureSource.getSchema() instanceof SimpleFeatureType) || !(rulesFilters instanceof Or)
                         || (rulesFilters instanceof Or && ((Or) rulesFilters).getChildren().size() <= 20)) {
        {code}

        Mind, the 20 filters limit is there for a reason, some databases will choke if the query generated is too large,
        and for a GetFeatureInfo the spatial filter should be the dominant one anyways (since we are retrieving
        a very small area). The only case where that is not true is someone allowing a bazillion features to be
        painted one on top of the other, which is a problem in itself for GetMap too.

        If post-filters being deadly slow is probably just yet another confirmation that in memory complex feature
        representation and management is poor, post filters on simple feature are normally rather fast.
        Show
        Andrea Aime added a comment - About the patch, you're missing a parenthesis, it should be: {code} if (featureSource.getSchema() instanceof SimpleFeatureType && !((rulesFilters instanceof Or)                  || (rulesFilters instanceof Or && ((Or) rulesFilters).getChildren().size() <= 20))) { {code} The logic seems also flipped. If you want to pass down a very large filter fully to the app-schema module the test should probably be: {code} if (!(featureSource.getSchema() instanceof SimpleFeatureType) || !(rulesFilters instanceof Or)                  || (rulesFilters instanceof Or && ((Or) rulesFilters).getChildren().size() <= 20)) { {code} Mind, the 20 filters limit is there for a reason, some databases will choke if the query generated is too large, and for a GetFeatureInfo the spatial filter should be the dominant one anyways (since we are retrieving a very small area). The only case where that is not true is someone allowing a bazillion features to be painted one on top of the other, which is a problem in itself for GetMap too. If post-filters being deadly slow is probably just yet another confirmation that in memory complex feature representation and management is poor, post filters on simple feature are normally rather fast.
        Hide
        Niels Charlier added a comment -
        Okay, you are right about the boolean logic mix-up. The second version you wrote is the one it should be.

        I understand that the 20 rules thing is there for a reason, but like you said "some databases will choke if the query generated is too large"
        I think ideally it should be a class who is aware of the capabilities of the particular database being used that decides on prefiltering or postfiltering. The DataSource will make decisions on prefilters and postfilters and ideally it should also know when the amount of filters is too high and it should be done by post-filtering rather than pre-filtering. I don't think this theoretically should be decided on by wms or wfs.

        In the case of app-schema, it has its own filtering systems (depending on whether you have nonjoining or joining configuration), postfiltering is mainly deadly because you load a lot of information from tables that is not necessary because you could have already decided that the feature does not need to be loaded on information you already have from another table. So it is not the memory complex feature representation that is the problem, but the amount of unnecessary SQL queries it would otherwise do. This is why app-schema has its own filtering systems.

        So the best compromise I see is, turning this off for non simple features... Like you wrote in your second version
        Show
        Niels Charlier added a comment - Okay, you are right about the boolean logic mix-up. The second version you wrote is the one it should be. I understand that the 20 rules thing is there for a reason, but like you said "some databases will choke if the query generated is too large" I think ideally it should be a class who is aware of the capabilities of the particular database being used that decides on prefiltering or postfiltering. The DataSource will make decisions on prefilters and postfilters and ideally it should also know when the amount of filters is too high and it should be done by post-filtering rather than pre-filtering. I don't think this theoretically should be decided on by wms or wfs. In the case of app-schema, it has its own filtering systems (depending on whether you have nonjoining or joining configuration), postfiltering is mainly deadly because you load a lot of information from tables that is not necessary because you could have already decided that the feature does not need to be loaded on information you already have from another table. So it is not the memory complex feature representation that is the problem, but the amount of unnecessary SQL queries it would otherwise do. This is why app-schema has its own filtering systems. So the best compromise I see is, turning this off for non simple features... Like you wrote in your second version
        Hide
        Niels Charlier added a comment -
        Andrea,Thank you for your help.
        Please review the updated patch.

        I am sorry about the geotools-geoserver mix-up, I don't seem to be able to change it now.
        Show
        Niels Charlier added a comment - Andrea,Thank you for your help. Please review the updated patch. I am sorry about the geotools-geoserver mix-up, I don't seem to be able to change it now.
        Hide
        Niels Charlier added a comment -
        Updated test with validateget as per Rini's request
        Show
        Niels Charlier added a comment - Updated test with validateget as per Rini's request
        Hide
        Andrea Aime added a comment -
        Patch looks good, I did not try to apply it, but if the patch does not break other tests please go ahead and commit it
        Show
        Andrea Aime added a comment - Patch looks good, I did not try to apply it, but if the patch does not break other tests please go ahead and commit it
        Hide
        Niels Charlier added a comment -
        Thx for approval.
        Geoserver Committed r16892
        Show
        Niels Charlier added a comment - Thx for approval. Geoserver Committed r16892

          People

          • Assignee:
            Andrea Aime
            Reporter:
            Niels Charlier
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: