Discussion:
[Geoserver-users] ImageMosaic NetCDF
冷月残风
2016-01-20 07:15:44 UTC
Permalink
Hi:
I create a ImageMosaic of NetCDF and usage of PostGIS to store the mosaic indexes. It's throw error when I request by WMS. I'm use Geoserver2.8. But it's ok when I use it in Geoserver2.7.

20 Ò»ÔÂ 14:53:29 DEBUG [geotools.jdbc] - 1 = POLYGON ((47.0213483866426 7.676591150301974, 47.0213483866426 60.3703638031369, 164.58891543782 60.3703638031369, 164.58891543782 7.676591150301974, 47.0213483866426 7.676591150301974))
20 Ò»ÔÂ 14:53:29 DEBUG [gce.imagemosaic] - Trying to resolve path:
type:ABSOLUTE
parentLocation:file:/D:/BpLccMosaic/


20 Ò»ÔÂ 14:53:29 DEBUG [gce.imagemosaic] - File found D:\LccNc\20160101_cmaq_d1.nc
20 Ò»ÔÂ 14:53:29 DEBUG [gce.arcgrid] - ArcGridFormatFactory is availaible.
20 Ò»ÔÂ 14:53:29 TRACE [geotools.factory] - ENTRY (GridCoverageFactory)
20 Ò»ÔÂ 14:53:29 TRACE [geotools.factory] - RETURN (GridCoverageFactory): found implementation GridCoverageFactory.
20 Ò»ÔÂ 14:53:29 DEBUG [gce.gtopo30] - Unrecognized file (file extension doesn't match)
java.io.IOException: Unrecognized file (file extension doesn't match)
at org.geotools.gce.gtopo30.GTopo30Reader.<init>(GTopo30Reader.java:231)
at org.geotools.gce.gtopo30.GTopo30Reader.<init>(GTopo30Reader.java:161)
at org.geotools.gce.gtopo30.GTopo30Format.accepts(GTopo30Format.java:177)
at org.geotools.coverage.grid.io.GridFormatFinder.findFormats(GridFormatFinder.java:188)
at org.geotools.coverage.grid.io.GridFormatFinder.findFormat(GridFormatFinder.java:236)
at org.geotools.gce.imagemosaic.GranuleDescriptor.init(GranuleDescriptor.java:327)
at org.geotools.gce.imagemosaic.GranuleDescriptor.<init>(GranuleDescriptor.java:660)
at org.geotools.gce.imagemosaic.catalog.CachingDataStoreGranuleCatalog$1.visit(CachingDataStoreGranuleCatalog.java:176)
at org.geotools.data.store.ContentFeatureSource.accepts(ContentFeatureSource.java:802)
at org.geotools.data.store.ContentFeatureCollection.accepts(ContentFeatureCollection.java:129)
at org.geotools.gce.imagemosaic.catalog.CachingDataStoreGranuleCatalog.getGranuleDescriptors(CachingDataStoreGranuleCatalog.java:158)
at org.geotools.gce.imagemosaic.RasterManager.getGranuleDescriptors(RasterManager.java:1173)
at org.geotools.gce.imagemosaic.RasterLayerResponse.prepareResponse(RasterLayerResponse.java:1308)
at org.geotools.gce.imagemosaic.RasterLayerResponse.processRequest(RasterLayerResponse.java:1203)
at org.geotools.gce.imagemosaic.RasterLayerResponse.createResponse(RasterLayerResponse.java:1169)
at org.geotools.gce.imagemosaic.RasterManager.read(RasterManager.java:1163)
at org.geotools.gce.imagemosaic.ImageMosaicReader.read(ImageMosaicReader.java:871)
at org.geotools.gce.imagemosaic.ImageMosaicReader.read(ImageMosaicReader.java:850)
at org.geoserver.catalog.SingleGridCoverage2DReader.read(SingleGridCoverage2DReader.java:149)
at org.geoserver.catalog.CoverageDimensionCustomizerReader.read(CoverageDimensionCustomizerReader.java:229)
at org.geoserver.catalog.CoverageDimensionCustomizerReader.read(CoverageDimensionCustomizerReader.java:219)
at org.geotools.renderer.lite.gridcoverage2d.GridCoverageReaderHelper.readSingleCoverage(GridCoverageReaderHelper.java:511)
at org.geotools.renderer.lite.gridcoverage2d.GridCoverageReaderHelper.readCoverageInEnvelope(GridCoverageReaderHelper.java:298)
at org.geotools.renderer.lite.gridcoverage2d.GridCoverageReaderHelper.readCoverages(GridCoverageReaderHelper.java:203)
at org.geotools.renderer.lite.gridcoverage2d.GridCoverageRenderer.renderImage(GridCoverageRenderer.java:800)
at org.geotools.renderer.lite.gridcoverage2d.GridCoverageRenderer.renderImage(GridCoverageRenderer.java:768)
at org.geoserver.wms.map.RenderedImageMapOutputFormat.directRasterRender(RenderedImageMapOutputFormat.java:947)
at org.geoserver.wms.map.RenderedImageMapOutputFormat.produceMap(RenderedImageMapOutputFormat.java:342)
at org.geoserver.wms.map.RenderedImageMapOutputFormat.produceMap(RenderedImageMapOutputFormat.java:259)
at org.geoserver.wms.map.RenderedImageMapOutputFormat.produceMap(RenderedImageMapOutputFormat.java:132)
at org.geoserver.wms.GetMap.executeInternal(GetMap.java:505)
at org.geoserver.wms.GetMap.run(GetMap.java:249)
at org.geoserver.wms.GetMap.run(GetMap.java:119)
at org.geoserver.wms.DefaultWebMapService.getMap(DefaultWebMapService.java:320)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:319)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
at org.geoserver.kml.WebMapServiceKmlInterceptor.invoke(WebMapServiceKmlInterceptor.java:34)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.geoserver.gwc.wms.CacheSeedingWebMapService.invoke(CacheSeedingWebMapService.java:62)
at org.geoserver.gwc.wms.CacheSeedingWebMapService.invoke(CacheSeedingWebMapService.java:36)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.geoserver.gwc.wms.CachingWebMapService.invoke(CachingWebMapService.java:80)
at org.geoserver.gwc.wms.CachingWebMapService.invoke(CachingWebMapService.java:55)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.geoserver.ows.util.RequestObjectLogger.invoke(RequestObjectLogger.java:55)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
at com.sun.proxy.$Proxy73.getMap(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.geoserver.ows.Dispatcher.execute(Dispatcher.java:845)
at org.geoserver.ows.Dispatcher.handleRequestInternal(Dispatcher.java:275)
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:923)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882)
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:778)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:654)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1320)
at org.geoserver.filters.ThreadLocalsCleanupFilter.doFilter(ThreadLocalsCleanupFilter.java:28)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1291)
at org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:75)
at org.geoserver.wms.animate.AnimatorFilter.doFilter(AnimatorFilter.java:71)
at org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:71)
at org.geoserver.filters.SpringDelegatingFilter.doFilter(SpringDelegatingFilter.java:46)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1291)
at org.geoserver.platform.AdvancedDispatchFilter.doFilter(AdvancedDispatchFilter.java:50)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1291)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:311)
at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:69)
at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:116)
at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:73)
at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:92)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:69)
at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113)
at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:73)
at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:92)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
at org.geoserver.security.filter.GeoServerAnonymousAuthenticationFilter.doFilter(GeoServerAnonymousAuthenticationFilter.java:54)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:69)
at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:150)
at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:73)
at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:92)
at org.geoserver.security.filter.GeoServerBasicAuthenticationFilter.doFilter(GeoServerBasicAuthenticationFilter.java:83)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:69)
at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)
at org.geoserver.security.filter.GeoServerSecurityContextPersistenceFilter$1.doFilter(GeoServerSecurityContextPersistenceFilter.java:53)
at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:73)
at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:92)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:173)
at org.geoserver.security.GeoServerSecurityFilterChainProxy.doFilter(GeoServerSecurityFilterChainProxy.java:135)
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1291)
at org.geoserver.filters.LoggingFilter.doFilter(LoggingFilter.java:87)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1291)
at org.geoserver.filters.GZIPFilter.doFilter(GZIPFilter.java:42)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1291)
at org.geoserver.filters.SessionDebugFilter.doFilter(SessionDebugFilter.java:48)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1291)
at org.geoserver.filters.FlushSafeFilter.doFilter(FlushSafeFilter.java:44)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1291)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1291)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:443)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:532)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:227)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1044)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:372)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:189)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:978)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255)
at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
at org.eclipse.jetty.server.Server.handle(Server.java:369)
at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:486)
at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:933)
at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:995)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:644)
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:668)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
at java.lang.Thread.run(Unknown Source)
20 Ò»ÔÂ 14:53:29 DEBUG [gce.arcgrid] - Creating a new ArcGriFormat.
20 Ò»ÔÂ 14:53:29 DEBUG [io.netcdf] - Provided URL is a file
20 Ò»ÔÂ 14:53:29 DEBUG [imageio.netcdf] - Found a valid FileImageInputStream
20 Ò»ÔÂ 14:53:29 DEBUG [imageio.netcdf] - File successfully opened
20 Ò»ÔÂ 14:53:29 DEBUG [geotools.jdbc] - CREATE CONNECTION
20 Ò»ÔÂ 14:53:29 DEBUG [geotools.jdbc] - CLOSE CONNECTION
20 Ò»ÔÂ 14:53:29 WARN [netcdf.NetCDFFormat] - Unable to connect
org.geotools.data.DataSourceException: Unable to connect
at org.geotools.coverage.io.netcdf.NetCDFReader.<init>(NetCDFReader.java:158)
at org.geotools.coverage.io.netcdf.NetCDFFormat.getReader(NetCDFFormat.java:95)
at org.geotools.gce.imagemosaic.GranuleDescriptor.init(GranuleDescriptor.java:335)
at org.geotools.gce.imagemosaic.GranuleDescriptor.<init>(GranuleDescriptor.java:660)
at org.geotools.gce.imagemosaic.catalog.CachingDataStoreGranuleCatalog$1.visit(CachingDataStoreGranuleCatalog.java:176)
at org.geotools.data.store.ContentFeatureSource.accepts(ContentFeatureSource.java:802)
at org.geotools.data.store.ContentFeatureCollection.accepts(ContentFeatureCollection.java:129)
at org.geotools.gce.imagemosaic.catalog.CachingDataStoreGranuleCatalog.getGranuleDescriptors(CachingDataStoreGranuleCatalog.java:158)
at org.geotools.gce.imagemosaic.RasterManager.getGranuleDescriptors(RasterManager.java:1173)
at org.geotools.gce.imagemosaic.RasterLayerResponse.prepareResponse(RasterLayerResponse.java:1308)
at org.geotools.gce.imagemosaic.RasterLayerResponse.processRequest(RasterLayerResponse.java:1203)
at org.geotools.gce.imagemosaic.RasterLayerResponse.createResponse(RasterLayerResponse.java:1169)
at org.geotools.gce.imagemosaic.RasterManager.read(RasterManager.java:1163)
at org.geotools.gce.imagemosaic.ImageMosaicReader.read(ImageMosaicReader.java:871)
at org.geotools.gce.imagemosaic.ImageMosaicReader.read(ImageMosaicReader.java:850)
at org.geoserver.catalog.SingleGridCoverage2DReader.read(SingleGridCoverage2DReader.java:149)
at org.geoserver.catalog.CoverageDimensionCustomizerReader.read(CoverageDimensionCustomizerReader.java:229)
at org.geoserver.catalog.CoverageDimensionCustomizerReader.read(CoverageDimensionCustomizerReader.java:219)
at org.geotools.renderer.lite.gridcoverage2d.GridCoverageReaderHelper.readSingleCoverage(GridCoverageReaderHelper.java:511)
at org.geotools.renderer.lite.gridcoverage2d.GridCoverageReaderHelper.readCoverageInEnvelope(GridCoverageReaderHelper.java:298)
at org.geotools.renderer.lite.gridcoverage2d.GridCoverageReaderHelper.readCoverages(GridCoverageReaderHelper.java:203)
at org.geotools.renderer.lite.gridcoverage2d.GridCoverageRenderer.renderImage(GridCoverageRenderer.java:800)
at org.geotools.renderer.lite.gridcoverage2d.GridCoverageRenderer.renderImage(GridCoverageRenderer.java:768)
at org.geoserver.wms.map.RenderedImageMapOutputFormat.directRasterRender(RenderedImageMapOutputFormat.java:947)
at org.geoserver.wms.map.RenderedImageMapOutputFormat.produceMap(RenderedImageMapOutputFormat.java:342)
at org.geoserver.wms.map.RenderedImageMapOutputFormat.produceMap(RenderedImageMapOutputFormat.java:259)
at org.geoserver.wms.map.RenderedImageMapOutputFormat.produceMap(RenderedImageMapOutputFormat.java:132)
at org.geoserver.wms.GetMap.executeInternal(GetMap.java:505)
at org.geoserver.wms.GetMap.run(GetMap.java:249)
at org.geoserver.wms.GetMap.run(GetMap.java:119)
at org.geoserver.wms.DefaultWebMapService.getMap(DefaultWebMapService.java:320)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:319)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
at org.geoserver.kml.WebMapServiceKmlInterceptor.invoke(WebMapServiceKmlInterceptor.java:34)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.geoserver.gwc.wms.CacheSeedingWebMapService.invoke(CacheSeedingWebMapService.java:62)
at org.geoserver.gwc.wms.CacheSeedingWebMapService.invoke(CacheSeedingWebMapService.java:36)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.geoserver.gwc.wms.CachingWebMapService.invoke(CachingWebMapService.java:80)
at org.geoserver.gwc.wms.CachingWebMapService.invoke(CachingWebMapService.java:55)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.geoserver.ows.util.RequestObjectLogger.invoke(RequestObjectLogger.java:55)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
at com.sun.proxy.$Proxy73.getMap(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.geoserver.ows.Dispatcher.execute(Dispatcher.java:845)
at org.geoserver.ows.Dispatcher.handleRequestInternal(Dispatcher.java:275)
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:923)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882)
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:778)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:654)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1320)
at org.geoserver.filters.ThreadLocalsCleanupFilter.doFilter(ThreadLocalsCleanupFilter.java:28)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1291)
at org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:75)
at org.geoserver.wms.animate.AnimatorFilter.doFilter(AnimatorFilter.java:71)
at org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:71)
at org.geoserver.filters.SpringDelegatingFilter.doFilter(SpringDelegatingFilter.java:46)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1291)
at org.geoserver.platform.AdvancedDispatchFilter.doFilter(AdvancedDispatchFilter.java:50)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1291)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:311)
at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:69)
at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:116)
at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:73)
at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:92)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:69)
at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113)
at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:73)
at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:92)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
at org.geoserver.security.filter.GeoServerAnonymousAuthenticationFilter.doFilter(GeoServerAnonymousAuthenticationFilter.java:54)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:69)
at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:150)
at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:73)
at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:92)
at org.geoserver.security.filter.GeoServerBasicAuthenticationFilter.doFilter(GeoServerBasicAuthenticationFilter.java:83)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:69)
at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)
at org.geoserver.security.filter.GeoServerSecurityContextPersistenceFilter$1.doFilter(GeoServerSecurityContextPersistenceFilter.java:53)
at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:73)
at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:92)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:173)
at org.geoserver.security.GeoServerSecurityFilterChainProxy.doFilter(GeoServerSecurityFilterChainProxy.java:135)
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1291)
at org.geoserver.filters.LoggingFilter.doFilter(LoggingFilter.java:87)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1291)
at org.geoserver.filters.GZIPFilter.doFilter(GZIPFilter.java:42)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1291)
at org.geoserver.filters.SessionDebugFilter.doFilter(SessionDebugFilter.java:48)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1291)
at org.geoserver.filters.FlushSafeFilter.doFilter(FlushSafeFilter.java:44)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1291)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1291)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:443)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:532)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:227)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1044)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:372)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:189)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:978)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255)
at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
at org.eclipse.jetty.server.Server.handle(Server.java:369)
at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:486)
at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:933)
at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:995)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:644)
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:668)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
at java.lang.Thread.run(Unknown Source)
Caused by: org.geotools.data.DataSourceException: java.lang.IllegalArgumentException: java.io.IOException: Schema 'default' does not exist.
at org.geotools.coverage.io.netcdf.NetCDFAccess.<init>(NetCDFAccess.java:126)
at org.geotools.coverage.io.netcdf.NetCDFDriver.connect(NetCDFDriver.java:92)
at org.geotools.coverage.io.impl.DefaultFileDriver.process(DefaultFileDriver.java:216)
at org.geotools.coverage.io.netcdf.NetCDFReader.<init>(NetCDFReader.java:156)
... 140 more
Caused by: java.lang.RuntimeException: java.lang.IllegalArgumentException: java.io.IOException: Schema 'default' does not exist.
at org.geotools.imageio.netcdf.NetCDFImageReader.setInput(NetCDFImageReader.java:266)
at javax.imageio.ImageReader.setInput(Unknown Source)
at org.geotools.coverage.io.netcdf.NetCDFAccess.<init>(NetCDFAccess.java:115)
... 143 more
Caused by: java.lang.IllegalArgumentException: java.io.IOException: Schema 'default' does not exist.
at org.geotools.coverage.io.catalog.CoverageSlicesCatalog.<init>(CoverageSlicesCatalog.java:231)
at org.geotools.imageio.GeoSpatialImageReader.initCatalog(GeoSpatialImageReader.java:205)
at org.geotools.imageio.netcdf.NetCDFImageReader.init(NetCDFImageReader.java:462)
at org.geotools.imageio.netcdf.NetCDFImageReader.setInput(NetCDFImageReader.java:264)
... 145 more
Caused by: java.io.IOException: Schema 'default' does not exist.
at org.geotools.data.store.ContentDataStore.ensureEntry(ContentDataStore.java:621)
at org.geotools.data.store.ContentDataStore.getFeatureSource(ContentDataStore.java:393)
at org.geotools.data.store.ContentDataStore.getFeatureSource(ContentDataStore.java:360)
at org.geotools.data.store.ContentDataStore.getFeatureSource(ContentDataStore.java:103)
at org.geotools.coverage.io.catalog.CoverageSlicesCatalog.extractBasicProperties(CoverageSlicesCatalog.java:286)
at org.geotools.coverage.io.catalog.CoverageSlicesCatalog.<init>(CoverageSlicesCatalog.java:214)
Nhan Vo
2016-01-20 11:08:31 UTC
Permalink
Hi list,

I'm upgrading Geoserver from 2.3.5 to 2.8.1 and my client code cannot
work anymore. Basically it sends a WFS Url request with a filter to
Geoserver. The filter looks as follows:

<fes:Filter xmlns:fes='http://www.opengis.net/fes/2.0'
xmlns:gml='http://www.opengis.net/gml/3.2'>
<fes:PropertyIsLike matchCase='false' wildCard='*' singleChar='#'
escapeChar='!'>
<fes:ValueReference>...</fes:ValueReference>
<fes:Literal>...</fes:Literal>
</fes:PropertyIsLike>
</fes:Filter>

With version 2.8.1 I receive the exception message:*XML document
structures must start and end within the same entity*

I have been able to get around this by replacing /*singleChar='#'*/ with
/*singleChar='%'*/, but still cannot understand why the '#' causes the
problem. Also, '.' and '_' do not work either and I receive the same
exception message. Only '%' works.

Btw, Geoserver 2.3.5 was running with Java 6; when I updated to 2.8.1 I
also updated to Java 8.

If someone could shed some light on this I'd appreciate it.

Best regards,
Nhan Vo
Rahkonen Jukka (MML)
2016-01-20 12:53:03 UTC
Permalink
Hi,

Can you reproduce the issue with the demo layer "states"? If you can, please send the whole GET url for making testing convenient for the others.

Regards,

-Jukka Rahkonen-


Nhan Vo wrote:

Hi list,

I'm upgrading Geoserver from 2.3.5 to 2.8.1 and my client code cannot work anymore. Basically it sends a WFS Url request with a filter to Geoserver. The filter looks as follows:

<fes:Filter xmlns:fes='http://www.opengis.net/fes/2.0' xmlns:gml='http://www.opengis.net/gml/3.2'>
<fes:PropertyIsLike matchCase='false' wildCard='*' singleChar='#' escapeChar='!'>
<fes:ValueReference>...</fes:ValueReference>
<fes:Literal>...</fes:Literal>
</fes:PropertyIsLike>
</fes:Filter>

With version 2.8.1 I receive the exception message: XML document structures must start and end within the same entity

I have been able to get around this by replacing singleChar='#' with singleChar='%', but still cannot understand why the '#' causes the problem. Also, '.' and '_' do not work either and I receive the same exception message. Only '%' works.

Btw, Geoserver 2.3.5 was running with Java 6; when I updated to 2.8.1 I also updated to Java 8.

If someone could shed some light on this I'd appreciate it.

Best regards,
Nhan Vo
Nhan Vo
2016-01-20 13:04:18 UTC
Permalink
Hi,

Thanks for the response. This URL works:
http://192.168.0.102:8081/geoserver/wfs?VERSION=2.0.0&SERVICE=WFS&REQUEST=GetFeature&TYPENAME=topp:states&FILTER=%3Cfes:Filter%20xmlns:fes='http://www.opengis.net/fes/2.0'%20xmlns:gml='http://www.opengis.net/gml/3.2'%3E%3Cfes:PropertyIsLike%20matchCase='false'%20wildCard='*'%20singleChar='%'%20escapeChar='!'%3E%3Cfes:ValueReference%3Etopp:STATE_NAME%3C/fes:ValueReference%3E%3Cfes:Literal%3E*%3C/fes:Literal%3E%3C/fes:PropertyIsLike%3E%3C/fes:Filter%3E


This does not work:
http://192.168.0.102:8081/geoserver/wfs?VERSION=2.0.0&SERVICE=WFS&REQUEST=GetFeature&TYPENAME=topp:states&FILTER=%3Cfes:Filter%20xmlns:fes='http://www.opengis.net/fes/2.0'%20xmlns:gml='http://www.opengis.net/gml/3.2'%3E%3Cfes:PropertyIsLike%20matchCase='false'%20wildCard='*'%20singleChar='#'%20escapeChar='!'%3E%3Cfes:ValueReference%3Etopp:STATE_NAME%3C/fes:ValueReference%3E%3Cfes:Literal%3E*%3C/fes:Literal%3E%3C/fes:PropertyIsLike%3E%3C/fes:Filter%3E

The only difference is /*singleChar='%'*/ and /*singleChar='#'*/.

Best regards,
Nhan Vo
Hi,
Can you reproduce the issue with the demo layer ”states”? If you can,
please send the whole GET url for making testing convenient for the
others.
Regards,
-Jukka Rahkonen-
Hi list,
I'm upgrading Geoserver from 2.3.5 to 2.8.1 and my client code cannot
work anymore. Basically it sends a WFS Url request with a filter to
<fes:Filter xmlns:fes='http://www.opengis.net/fes/2.0'
xmlns:gml='http://www.opengis.net/gml/3.2'>
<fes:PropertyIsLike matchCase='false' wildCard='*' singleChar='#' escapeChar='!'>
<fes:ValueReference>...</fes:ValueReference>
<fes:Literal>...</fes:Literal>
</fes:PropertyIsLike>
</fes:Filter>
With version 2.8.1 I receive the exception message:*XML document
structures must start and end within the same entity*
I have been able to get around this by replacing */singleChar='#'/*
with */singleChar='%'/*, but still cannot understand why the '#'
causes the problem. Also, '.' and '_' do not work either and I receive
the same exception message. Only '%' works.
Btw, Geoserver 2.3.5 was running with Java 6; when I updated to 2.8.1
I also updated to Java 8.
If someone could shed some light on this I'd appreciate it.
Best regards,
Nhan Vo
--
*Thanh-Trong-Nhan Vo*


smile consult GmbH
Vahrenwalder Straße 4
D-30165 Hannover






Tel:



0511/543617-46

Fax:



0511/543617-66

Mail:



***@smileconsult.de <mailto:***@smileconsult.de>

Internet:



http://www.smileconsult.de <http://www.smileconsult.de/>


Geschäftsführer: Frank Sellerhoff •Peter Milbradt •Christoph Lippert
USt-IdNr.: DE208857046 •Amtsgericht Hannover HRB 58707
Ben Caradoc-Davies
2016-01-20 22:44:11 UTC
Permalink
Nhan Vo,

neither singleChar="%" nor singleChar="#" work for me until I
percent-encode them as singleChar="%25" or singleChar="%23"
respectively. "%" is used for URL percent-encoding and "#" is the URL
fragment separator and neither can be used unencoded in a URL. I am
surprised that either worked for you before. Perhaps older Java or
GeoServer was more permissive, or your client is encoding one but not
the other? I think Java 8 may have added better unicode support in
percent decoding; this may be the change.

Furthermore, matchCase is not permitted on PropertyIsLike. Including
this attribute caused the rather unhelpful error message: "Attempted to
construct illegal filter - I dont understand the tag:
fes:ValueReference. HINT: tags are case-sensitive!"

Both of these URLs work for me against the current GeoServer master
release configuration with Java 8:

http://localhost:8080/geoserver/wfs?service=WFS&version=2.0.0&request=GetFeature&typenames=topp:states&filter=%3Cfes:Filter%20xmlns:fes=%22http://www.opengis.net/fes/2.0%22%3E%3Cfes:PropertyIsLike%20wildCard=%22*%22%20singleChar=%22%23%22%20escapeChar=%22!%22%3E%3Cfes:ValueReference%3Etopp:STATE_NAME%3C/fes:ValueReference%3E%3Cfes:Literal%3E*%3C/fes:Literal%3E%3C/fes:PropertyIsLike%3E%3C/fes:Filter%3E

http://localhost:8080/geoserver/wfs?service=WFS&version=2.0.0&request=GetFeature&typenames=topp:states&filter=%3Cfes:Filter%20xmlns:fes=%22http://www.opengis.net/fes/2.0%22%3E%3Cfes:PropertyIsLike%20wildCard=%22*%22%20singleChar=%22%25%22%20escapeChar=%22!%22%3E%3Cfes:ValueReference%3Etopp:STATE_NAME%3C/fes:ValueReference%3E%3Cfes:Literal%3E*%3C/fes:Literal%3E%3C/fes:PropertyIsLike%3E%3C/fes:Filter%3E

Kind regards,
Ben.
Post by Nhan Vo
Hi,
http://192.168.0.102:8081/geoserver/wfs?VERSION=2.0.0&SERVICE=WFS&REQUEST=GetFeature&TYPENAME=topp:states&FILTER=%3Cfes:Filter%20xmlns:fes='http://www.opengis.net/fes/2.0'%20xmlns:gml='http://www.opengis.net/gml/3.2'%3E%3Cfes:PropertyIsLike%20matchCase='false'%20wildCard='*'%20singleChar='%'%20escapeChar='!'%3E%3Cfes:ValueReference%3Etopp:STATE_NAME%3C/fes:ValueReference%3E%3Cfes:Literal%3E*%3C/fes:Literal%3E%3C/fes:PropertyIsLike%3E%3C/fes:Filter%3E
http://192.168.0.102:8081/geoserver/wfs?VERSION=2.0.0&SERVICE=WFS&REQUEST=GetFeature&TYPENAME=topp:states&FILTER=%3Cfes:Filter%20xmlns:fes='http://www.opengis.net/fes/2.0'%20xmlns:gml='http://www.opengis.net/gml/3.2'%3E%3Cfes:PropertyIsLike%20matchCase='false'%20wildCard='*'%20singleChar='#'%20escapeChar='!'%3E%3Cfes:ValueReference%3Etopp:STATE_NAME%3C/fes:ValueReference%3E%3Cfes:Literal%3E*%3C/fes:Literal%3E%3C/fes:PropertyIsLike%3E%3C/fes:Filter%3E
The only difference is /*singleChar='%'*/ and /*singleChar='#'*/.
Best regards,
Nhan Vo
Hi,
Can you reproduce the issue with the demo layer ”states”? If you can, please
send the whole GET url for making testing convenient for the others.
Regards,
-Jukka Rahkonen-
Hi list,
I'm upgrading Geoserver from 2.3.5 to 2.8.1 and my client code cannot work
anymore. Basically it sends a WFS Url request with a filter to Geoserver. The
<fes:Filter xmlns:fes='http://www.opengis.net/fes/2.0'
xmlns:gml='http://www.opengis.net/gml/3.2'>
<fes:PropertyIsLike matchCase='false' wildCard='*' singleChar='#' escapeChar='!'>
<fes:ValueReference>...</fes:ValueReference>
<fes:Literal>...</fes:Literal>
</fes:PropertyIsLike>
</fes:Filter>
With version 2.8.1 I receive the exception message:*XML document structures
must start and end within the same entity*
I have been able to get around this by replacing */singleChar='#'/* with
*/singleChar='%'/*, but still cannot understand why the '#' causes the
problem. Also, '.' and '_' do not work either and I receive the same exception
message. Only '%' works.
Btw, Geoserver 2.3.5 was running with Java 6; when I updated to 2.8.1 I also
updated to Java 8.
If someone could shed some light on this I'd appreciate it.
Best regards,
Nhan Vo
--
*Thanh-Trong-Nhan Vo*
smile consult GmbH
Vahrenwalder Straße 4
D-30165 Hannover
0511/543617-46
0511/543617-66
<http://www.smileconsult.de/>http://www.smileconsult.de
Geschäftsführer: Frank Sellerhoff •Peter Milbradt •Christoph Lippert
USt-IdNr.: DE208857046 •Amtsgericht Hannover HRB 58707
------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
_______________________________________________
Geoserver-users mailing list
https://lists.sourceforge.net/lists/listinfo/geoserver-users
--
Ben Caradoc-Davies <***@transient.nz>
Director
Transient Software Limited <http://transient.nz/>
New Zealand
Nhan Vo
2016-01-21 09:15:25 UTC
Permalink
Hi Ben,

Thanks for the helpful reply. The exception message was indeed
misleading. A couple of points left, I hope you'd look into them:

1. How come matchCase was supported in version 2.3.5 but not anymore in
2.8.1? Personally I find it really useful. Is there a way to make a
search with PropertyIsLike case-insensitive?

2. I had this problem already with version 2.3.5 and it seems to persist
in version 2.8.1: When the search text contains a German letter with
umlaut in upper-case (Ü, Ö, Ä), I got the exception "Attempted to
construct illegal filter - I dont understand the tag:
fes:ValueReference. HINT: tags are case-sensitive!". ü, ö, ä are
however fine. As an added advantage with matchCase='false' I could get
around this problem, but not anymore in 2.8.1. If possible could you
shed some light on this?

Any hints or pointers are much appreciated!

Best regards,
Nhan Vo
Post by Ben Caradoc-Davies
Nhan Vo,
neither singleChar="%" nor singleChar="#" work for me until I
percent-encode them as singleChar="%25" or singleChar="%23"
respectively. "%" is used for URL percent-encoding and "#" is the URL
fragment separator and neither can be used unencoded in a URL. I am
surprised that either worked for you before. Perhaps older Java or
GeoServer was more permissive, or your client is encoding one but not
the other? I think Java 8 may have added better unicode support in
percent decoding; this may be the change.
Furthermore, matchCase is not permitted on PropertyIsLike. Including
this attribute caused the rather unhelpful error message: "Attempted
fes:ValueReference. HINT: tags are case-sensitive!"
Both of these URLs work for me against the current GeoServer master
http://localhost:8080/geoserver/wfs?service=WFS&version=2.0.0&request=GetFeature&typenames=topp:states&filter=%3Cfes:Filter%20xmlns:fes=%22http://www.opengis.net/fes/2.0%22%3E%3Cfes:PropertyIsLike%20wildCard=%22*%22%20singleChar=%22%23%22%20escapeChar=%22!%22%3E%3Cfes:ValueReference%3Etopp:STATE_NAME%3C/fes:ValueReference%3E%3Cfes:Literal%3E*%3C/fes:Literal%3E%3C/fes:PropertyIsLike%3E%3C/fes:Filter%3E
http://localhost:8080/geoserver/wfs?service=WFS&version=2.0.0&request=GetFeature&typenames=topp:states&filter=%3Cfes:Filter%20xmlns:fes=%22http://www.opengis.net/fes/2.0%22%3E%3Cfes:PropertyIsLike%20wildCard=%22*%22%20singleChar=%22%25%22%20escapeChar=%22!%22%3E%3Cfes:ValueReference%3Etopp:STATE_NAME%3C/fes:ValueReference%3E%3Cfes:Literal%3E*%3C/fes:Literal%3E%3C/fes:PropertyIsLike%3E%3C/fes:Filter%3E
Kind regards,
Ben.
Post by Nhan Vo
Hi,
http://192.168.0.102:8081/geoserver/wfs?VERSION=2.0.0&SERVICE=WFS&REQUEST=GetFeature&TYPENAME=topp:states&FILTER=%3Cfes:Filter%20xmlns:fes='http://www.opengis.net/fes/2.0'%20xmlns:gml='http://www.opengis.net/gml/3.2'%3E%3Cfes:PropertyIsLike%20matchCase='false'%20wildCard='*'%20singleChar='%'%20escapeChar='!'%3E%3Cfes:ValueReference%3Etopp:STATE_NAME%3C/fes:ValueReference%3E%3Cfes:Literal%3E*%3C/fes:Literal%3E%3C/fes:PropertyIsLike%3E%3C/fes:Filter%3E
http://192.168.0.102:8081/geoserver/wfs?VERSION=2.0.0&SERVICE=WFS&REQUEST=GetFeature&TYPENAME=topp:states&FILTER=%3Cfes:Filter%20xmlns:fes='http://www.opengis.net/fes/2.0'%20xmlns:gml='http://www.opengis.net/gml/3.2'%3E%3Cfes:PropertyIsLike%20matchCase='false'%20wildCard='*'%20singleChar='#'%20escapeChar='!'%3E%3Cfes:ValueReference%3Etopp:STATE_NAME%3C/fes:ValueReference%3E%3Cfes:Literal%3E*%3C/fes:Literal%3E%3C/fes:PropertyIsLike%3E%3C/fes:Filter%3E
The only difference is /*singleChar='%'*/ and /*singleChar='#'*/.
Best regards,
Nhan Vo
Hi,
Can you reproduce the issue with the demo layer ”states”? If you can, please
send the whole GET url for making testing convenient for the others.
Regards,
-Jukka Rahkonen-
Hi list,
I'm upgrading Geoserver from 2.3.5 to 2.8.1 and my client code cannot work
anymore. Basically it sends a WFS Url request with a filter to Geoserver. The
<fes:Filter xmlns:fes='http://www.opengis.net/fes/2.0'
xmlns:gml='http://www.opengis.net/gml/3.2'>
<fes:PropertyIsLike matchCase='false' wildCard='*' singleChar='#' escapeChar='!'>
<fes:ValueReference>...</fes:ValueReference>
<fes:Literal>...</fes:Literal>
</fes:PropertyIsLike>
</fes:Filter>
With version 2.8.1 I receive the exception message:*XML document structures
must start and end within the same entity*
I have been able to get around this by replacing */singleChar='#'/* with
*/singleChar='%'/*, but still cannot understand why the '#' causes the
problem. Also, '.' and '_' do not work either and I receive the same exception
message. Only '%' works.
Btw, Geoserver 2.3.5 was running with Java 6; when I updated to 2.8.1 I also
updated to Java 8.
If someone could shed some light on this I'd appreciate it.
Best regards,
Nhan Vo
------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
_______________________________________________
Geoserver-users mailing list
https://lists.sourceforge.net/lists/listinfo/geoserver-users
Ben Caradoc-Davies
2016-01-21 12:23:46 UTC
Permalink
Nhan Vo,

when you used PropertyIsLike/@matchCase="false" previously with
GeoServer 2.3.5, did you use Filter 2.0 or Filter 1.1?

I looked a little deeper and matchCase="false" *should* be supported on
PropertyIsLike in GeoServer WFS 1.1 because Niels kindly updated
GeoTools to use the FES 1.1.3 schemas back in 2013 to add matchCase support:
http://osgeo-org.1560.x6.nabble.com/ogc-filter-1-1-doesn-t-support-matchCase-in-PropertyIsLike-td5079577.html
https://github.com/geotools/geotools/commit/4855cba310362f488d5686eda1fff17d7d02c714
http://schemas.opengis.net/filter/1.1.0/filter.xsd

I changed the GET request to use WFS 1.1 and can confirm that
matchCase="false" works. The request matches "illino*" to "Illinois":
http://localhost:8080/geoserver/wfs?service=WFS&version=1.1.0&request=GetFeature&typename=topp:states&filter=%3Cogc:Filter%20xmlns:ogc=%22http://www.opengis.net/ogc%22%3E%3Cogc:PropertyIsLike%20matchCase=%22false%22%20wildCard=%22*%22%20singleChar=%22%23%22%20escapeChar=%22!%22%3E%3Cogc:PropertyName%3Etopp:STATE_NAME%3C/ogc:PropertyName%3E%3Cogc:Literal%3Eillino*%3C/ogc:Literal%3E%3C/ogc:PropertyIsLike%3E%3C/ogc:Filter%3E

*But* if I look at even the latest schemas and standard for FES 2.0.2,
there is no matchCase on PropertyIsLike:
http://schemas.opengis.net/filter/2.0/filter.xsd
http://docs.opengeospatial.org/is/09-026r2/09-026r2.html

I think this is a bug in the FES 2.0.2 schemas. I think GeoServer will
need updated schemas to fix this for WFS 2.0 (and we can see that the
XML parsing is horribly broken without this fix). We may need a change
request (or an email to the standard maintainer):
http://www.opengeospatial.org/standards/cr

If I add a single line to the definition of PropertyIsLikeType in the
copy of the FES 2.0 schemas in GeoTools gt-xsd-fes:
modules/extension/xsd/xsd-fes/src/main/resources/org/geotools/filter/v2_0/filter.xsd
<xsd:attribute name="matchCase" type="xsd:boolean" use="optional"
default="true"/>

then suddenly matchCase="false" on PropertyIsLike starts working for WFS
2.0 in GeoServer, just as as for WFS 1.1:
http://localhost:8080/geoserver/wfs?service=WFS&version=2.0.0&request=GetFeature&typenames=topp:states&filter=%3Cfes:Filter%20xmlns:fes=%22http://www.opengis.net/fes/2.0%22%3E%3Cfes:PropertyIsLike%20matchCase=%22false%22%20wildCard=%22*%22%20singleChar=%22%23%22%20escapeChar=%22!%22%3E%3Cfes:ValueReference%3Etopp:STATE_NAME%3C/fes:ValueReference%3E%3Cfes:Literal%3Eillino*%3C/fes:Literal%3E%3C/fes:PropertyIsLike%3E%3C/fes:Filter%3E

GeoServer also supports a CQL_FILTER vendor parameter that has case
insensitive "ilike" support:
http://docs.geoserver.org/latest/en/user/services/wfs/vendor.html#cql-filters
See the "strToLowerCase(STATE_NAME) like '%m%'" example in the tutorial:
http://docs.geoserver.org/latest/en/user/tutorials/cql/cql_tutorial.html
or the "ilike" predicate:
http://docs.geoserver.org/latest/en/user/filter/ecql_reference.html

As for letters outside ASCII ("Ü", "Ö", "Ä", "ü", "ö", "ä"), if you are
using them in URLs such as encoded filters, are you percent-encoding
these as required by RFC 3986?:
https://en.wikipedia.org/wiki/Percent-encoding
https://tools.ietf.org/html/rfc3986

$ python
Python 2.7.11 (default, Jan 11 2016, 21:04:40)
[GCC 5.3.1 20160101] on linux2
Type "help", "copyright", "credits" or "license" for more information.
Post by Nhan Vo
Post by Ben Caradoc-Davies
import urllib
for c in ("Ü", "Ö", "Ä", "ü", "ö", "ä"): print c, urllib.quote(c)
...
Ü %C3%9C
Ö %C3%96
Ä %C3%84
ü %C3%BC
ö %C3%B6
ä %C3%A4

Kind regards,
Ben.
Post by Nhan Vo
Hi Ben,
Thanks for the helpful reply. The exception message was indeed
1. How come matchCase was supported in version 2.3.5 but not anymore in
2.8.1? Personally I find it really useful. Is there a way to make a
search with PropertyIsLike case-insensitive?
2. I had this problem already with version 2.3.5 and it seems to persist
in version 2.8.1: When the search text contains a German letter with
umlaut in upper-case (Ü, Ö, Ä), I got the exception "Attempted to
fes:ValueReference. HINT: tags are case-sensitive!". ü, ö, ä are
however fine. As an added advantage with matchCase='false' I could get
around this problem, but not anymore in 2.8.1. If possible could you
shed some light on this?
Any hints or pointers are much appreciated!
Best regards,
Nhan Vo
Post by Ben Caradoc-Davies
Nhan Vo,
neither singleChar="%" nor singleChar="#" work for me until I
percent-encode them as singleChar="%25" or singleChar="%23"
respectively. "%" is used for URL percent-encoding and "#" is the URL
fragment separator and neither can be used unencoded in a URL. I am
surprised that either worked for you before. Perhaps older Java or
GeoServer was more permissive, or your client is encoding one but not
the other? I think Java 8 may have added better unicode support in
percent decoding; this may be the change.
Furthermore, matchCase is not permitted on PropertyIsLike. Including
this attribute caused the rather unhelpful error message: "Attempted
fes:ValueReference. HINT: tags are case-sensitive!"
Both of these URLs work for me against the current GeoServer master
http://localhost:8080/geoserver/wfs?service=WFS&version=2.0.0&request=GetFeature&typenames=topp:states&filter=%3Cfes:Filter%20xmlns:fes=%22http://www.opengis.net/fes/2.0%22%3E%3Cfes:PropertyIsLike%20wildCard=%22*%22%20singleChar=%22%23%22%20escapeChar=%22!%22%3E%3Cfes:ValueReference%3Etopp:STATE_NAME%3C/fes:ValueReference%3E%3Cfes:Literal%3E*%3C/fes:Literal%3E%3C/fes:PropertyIsLike%3E%3C/fes:Filter%3E
http://localhost:8080/geoserver/wfs?service=WFS&version=2.0.0&request=GetFeature&typenames=topp:states&filter=%3Cfes:Filter%20xmlns:fes=%22http://www.opengis.net/fes/2.0%22%3E%3Cfes:PropertyIsLike%20wildCard=%22*%22%20singleChar=%22%25%22%20escapeChar=%22!%22%3E%3Cfes:ValueReference%3Etopp:STATE_NAME%3C/fes:ValueReference%3E%3Cfes:Literal%3E*%3C/fes:Literal%3E%3C/fes:PropertyIsLike%3E%3C/fes:Filter%3E
Kind regards,
Ben.
Hi,
http://192.168.0.102:8081/geoserver/wfs?VERSION=2.0.0&SERVICE=WFS&REQUEST=GetFeature&TYPENAME=topp:states&FILTER=%3Cfes:Filter%20xmlns:fes='http://www.opengis.net/fes/2.0'%20xmlns:gml='http://www.opengis.net/gml/3.2'%3E%3Cfes:PropertyIsLike%20matchCase='false'%20wildCard='*'%20singleChar='%'%20escapeChar='!'%3E%3Cfes:ValueReference%3Etopp:STATE_NAME%3C/fes:ValueReference%3E%3Cfes:Literal%3E*%3C/fes:Literal%3E%3C/fes:PropertyIsLike%3E%3C/fes:Filter%3E
http://192.168.0.102:8081/geoserver/wfs?VERSION=2.0.0&SERVICE=WFS&REQUEST=GetFeature&TYPENAME=topp:states&FILTER=%3Cfes:Filter%20xmlns:fes='http://www.opengis.net/fes/2.0'%20xmlns:gml='http://www.opengis.net/gml/3.2'%3E%3Cfes:PropertyIsLike%20matchCase='false'%20wildCard='*'%20singleChar='#'%20escapeChar='!'%3E%3Cfes:ValueReference%3Etopp:STATE_NAME%3C/fes:ValueReference%3E%3Cfes:Literal%3E*%3C/fes:Literal%3E%3C/fes:PropertyIsLike%3E%3C/fes:Filter%3E
The only difference is /*singleChar='%'*/ and /*singleChar='#'*/.
Best regards,
Nhan Vo
Hi,
Can you reproduce the issue with the demo layer ”states”? If you can, please
send the whole GET url for making testing convenient for the others.
Regards,
-Jukka Rahkonen-
Hi list,
I'm upgrading Geoserver from 2.3.5 to 2.8.1 and my client code cannot work
anymore. Basically it sends a WFS Url request with a filter to Geoserver. The
<fes:Filter xmlns:fes='http://www.opengis.net/fes/2.0'
xmlns:gml='http://www.opengis.net/gml/3.2'>
<fes:PropertyIsLike matchCase='false' wildCard='*' singleChar='#' escapeChar='!'>
<fes:ValueReference>...</fes:ValueReference>
<fes:Literal>...</fes:Literal>
</fes:PropertyIsLike>
</fes:Filter>
With version 2.8.1 I receive the exception message:*XML document structures
must start and end within the same entity*
I have been able to get around this by replacing */singleChar='#'/* with
*/singleChar='%'/*, but still cannot understand why the '#' causes the
problem. Also, '.' and '_' do not work either and I receive the same exception
message. Only '%' works.
Btw, Geoserver 2.3.5 was running with Java 6; when I updated to 2.8.1 I also
updated to Java 8.
If someone could shed some light on this I'd appreciate it.
Best regards,
Nhan Vo
------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
_______________________________________________
Geoserver-users mailing list
https://lists.sourceforge.net/lists/listinfo/geoserver-users
--
Ben Caradoc-Davies <***@transient.nz>
Director
Transient Software Limited <http://transient.nz/>
New Zealand
Nhan Vo
2016-01-21 13:15:42 UTC
Permalink
Hi Ben,

Thanks a lot for the detailed reply and the hints. I can confirm that in
my case filter 2.0 was used with version 2.3.5. It is exactly like it is
now and I have just removed matchCase to make it work in version 2.8.1
according to your explanation. Perhaps someone has modified the schema
in the meantime to make it conform with Filter 2.0 spec?

Regarding the umlauts, I use URLEncoder.encode() to encode the filter
part and it seems to properly percent-encode the letters.

Please try the following, which is the working example from you in your
previous email in which I just replace the literal "*" with "ü*" and "Ü*":

This (with "ü*") works although returning 0 records:

http://localhost:8080/geoserver/wfs?service=WFS&version=2.0.0&request=GetFeature&typenames=topp:states&filter=%3Cfes:Filter%20xmlns:fes=%22http://www.opengis.net/fes/2.0%22%3E%3Cfes:PropertyIsLike%20wildCard=%22*%22%20singleChar=%22%23%22%20escapeChar=%22!%22%3E%3Cfes:ValueReference%3Etopp:STATE_NAME%3C/fes:ValueReference%3E%3Cfes:Literal%3E%C3%BC*%3C/fes:Literal%3E%3C/fes:PropertyIsLike%3E%3C/fes:Filter%3E

This (with "Ü*") breaks the XML parsing, and we receive the exception:

http://localhost:8080/geoserver/wfs?service=WFS&version=2.0.0&request=GetFeature&typenames=topp:states&filter=%3Cfes:Filter%20xmlns:fes=%22http://www.opengis.net/fes/2.0%22%3E%3Cfes:PropertyIsLike%20wildCard=%22*%22%20singleChar=%22%23%22%20escapeChar=%22!%22%3E%3Cfes:ValueReference%3Etopp:STATE_NAME%3C/fes:ValueReference%3E%3Cfes:Literal%3E%C3%9C*%3C/fes:Literal%3E%3C/fes:PropertyIsLike%3E%3C/fes:Filter%3E

I've tried the 2 Urls above with Geoserver 2.8.1.

Best regards,
Nhan Vo
Post by Ben Caradoc-Davies
Nhan Vo,
GeoServer 2.3.5, did you use Filter 2.0 or Filter 1.1?
I looked a little deeper and matchCase="false" *should* be supported
on PropertyIsLike in GeoServer WFS 1.1 because Niels kindly updated
http://osgeo-org.1560.x6.nabble.com/ogc-filter-1-1-doesn-t-support-matchCase-in-PropertyIsLike-td5079577.html
https://github.com/geotools/geotools/commit/4855cba310362f488d5686eda1fff17d7d02c714
http://schemas.opengis.net/filter/1.1.0/filter.xsd
I changed the GET request to use WFS 1.1 and can confirm that
http://localhost:8080/geoserver/wfs?service=WFS&version=1.1.0&request=GetFeature&typename=topp:states&filter=%3Cogc:Filter%20xmlns:ogc=%22http://www.opengis.net/ogc%22%3E%3Cogc:PropertyIsLike%20matchCase=%22false%22%20wildCard=%22*%22%20singleChar=%22%23%22%20escapeChar=%22!%22%3E%3Cogc:PropertyName%3Etopp:STATE_NAME%3C/ogc:PropertyName%3E%3Cogc:Literal%3Eillino*%3C/ogc:Literal%3E%3C/ogc:PropertyIsLike%3E%3C/ogc:Filter%3E
*But* if I look at even the latest schemas and standard for FES 2.0.2,
http://schemas.opengis.net/filter/2.0/filter.xsd
http://docs.opengeospatial.org/is/09-026r2/09-026r2.html
I think this is a bug in the FES 2.0.2 schemas. I think GeoServer will
need updated schemas to fix this for WFS 2.0 (and we can see that the
XML parsing is horribly broken without this fix). We may need a change
http://www.opengeospatial.org/standards/cr
If I add a single line to the definition of PropertyIsLikeType in the
modules/extension/xsd/xsd-fes/src/main/resources/org/geotools/filter/v2_0/filter.xsd
<xsd:attribute name="matchCase" type="xsd:boolean" use="optional"
default="true"/>
then suddenly matchCase="false" on PropertyIsLike starts working for
http://localhost:8080/geoserver/wfs?service=WFS&version=2.0.0&request=GetFeature&typenames=topp:states&filter=%3Cfes:Filter%20xmlns:fes=%22http://www.opengis.net/fes/2.0%22%3E%3Cfes:PropertyIsLike%20matchCase=%22false%22%20wildCard=%22*%22%20singleChar=%22%23%22%20escapeChar=%22!%22%3E%3Cfes:ValueReference%3Etopp:STATE_NAME%3C/fes:ValueReference%3E%3Cfes:Literal%3Eillino*%3C/fes:Literal%3E%3C/fes:PropertyIsLike%3E%3C/fes:Filter%3E
GeoServer also supports a CQL_FILTER vendor parameter that has case
http://docs.geoserver.org/latest/en/user/services/wfs/vendor.html#cql-filters
http://docs.geoserver.org/latest/en/user/tutorials/cql/cql_tutorial.html
http://docs.geoserver.org/latest/en/user/filter/ecql_reference.html
As for letters outside ASCII ("Ü", "Ö", "Ä", "ü", "ö", "ä"), if you
are using them in URLs such as encoded filters, are you
https://en.wikipedia.org/wiki/Percent-encoding
https://tools.ietf.org/html/rfc3986
$ python
Python 2.7.11 (default, Jan 11 2016, 21:04:40)
[GCC 5.3.1 20160101] on linux2
Type "help", "copyright", "credits" or "license" for more information.
Post by Nhan Vo
Post by Ben Caradoc-Davies
import urllib
for c in ("Ü", "Ö", "Ä", "ü", "ö", "ä"): print c, urllib.quote(c)
...
Ü %C3%9C
Ö %C3%96
Ä %C3%84
ü %C3%BC
ö %C3%B6
ä %C3%A4
Kind regards,
Ben.
Post by Nhan Vo
Hi Ben,
Thanks for the helpful reply. The exception message was indeed
1. How come matchCase was supported in version 2.3.5 but not anymore in
2.8.1? Personally I find it really useful. Is there a way to make a
search with PropertyIsLike case-insensitive?
2. I had this problem already with version 2.3.5 and it seems to persist
in version 2.8.1: When the search text contains a German letter with
umlaut in upper-case (Ü, Ö, Ä), I got the exception "Attempted to
fes:ValueReference. HINT: tags are case-sensitive!". ü, ö, ä are
however fine. As an added advantage with matchCase='false' I could get
around this problem, but not anymore in 2.8.1. If possible could you
shed some light on this?
Any hints or pointers are much appreciated!
Best regards,
Nhan Vo
Post by Ben Caradoc-Davies
Nhan Vo,
neither singleChar="%" nor singleChar="#" work for me until I
percent-encode them as singleChar="%25" or singleChar="%23"
respectively. "%" is used for URL percent-encoding and "#" is the URL
fragment separator and neither can be used unencoded in a URL. I am
surprised that either worked for you before. Perhaps older Java or
GeoServer was more permissive, or your client is encoding one but not
the other? I think Java 8 may have added better unicode support in
percent decoding; this may be the change.
Furthermore, matchCase is not permitted on PropertyIsLike. Including
this attribute caused the rather unhelpful error message: "Attempted
fes:ValueReference. HINT: tags are case-sensitive!"
Both of these URLs work for me against the current GeoServer master
http://localhost:8080/geoserver/wfs?service=WFS&version=2.0.0&request=GetFeature&typenames=topp:states&filter=%3Cfes:Filter%20xmlns:fes=%22http://www.opengis.net/fes/2.0%22%3E%3Cfes:PropertyIsLike%20wildCard=%22*%22%20singleChar=%22%23%22%20escapeChar=%22!%22%3E%3Cfes:ValueReference%3Etopp:STATE_NAME%3C/fes:ValueReference%3E%3Cfes:Literal%3E*%3C/fes:Literal%3E%3C/fes:PropertyIsLike%3E%3C/fes:Filter%3E
http://localhost:8080/geoserver/wfs?service=WFS&version=2.0.0&request=GetFeature&typenames=topp:states&filter=%3Cfes:Filter%20xmlns:fes=%22http://www.opengis.net/fes/2.0%22%3E%3Cfes:PropertyIsLike%20wildCard=%22*%22%20singleChar=%22%25%22%20escapeChar=%22!%22%3E%3Cfes:ValueReference%3Etopp:STATE_NAME%3C/fes:ValueReference%3E%3Cfes:Literal%3E*%3C/fes:Literal%3E%3C/fes:PropertyIsLike%3E%3C/fes:Filter%3E
Kind regards,
Ben.
Hi,
http://192.168.0.102:8081/geoserver/wfs?VERSION=2.0.0&SERVICE=WFS&REQUEST=GetFeature&TYPENAME=topp:states&FILTER=%3Cfes:Filter%20xmlns:fes='http://www.opengis.net/fes/2.0'%20xmlns:gml='http://www.opengis.net/gml/3.2'%3E%3Cfes:PropertyIsLike%20matchCase='false'%20wildCard='*'%20singleChar='%'%20escapeChar='!'%3E%3Cfes:ValueReference%3Etopp:STATE_NAME%3C/fes:ValueReference%3E%3Cfes:Literal%3E*%3C/fes:Literal%3E%3C/fes:PropertyIsLike%3E%3C/fes:Filter%3E
http://192.168.0.102:8081/geoserver/wfs?VERSION=2.0.0&SERVICE=WFS&REQUEST=GetFeature&TYPENAME=topp:states&FILTER=%3Cfes:Filter%20xmlns:fes='http://www.opengis.net/fes/2.0'%20xmlns:gml='http://www.opengis.net/gml/3.2'%3E%3Cfes:PropertyIsLike%20matchCase='false'%20wildCard='*'%20singleChar='#'%20escapeChar='!'%3E%3Cfes:ValueReference%3Etopp:STATE_NAME%3C/fes:ValueReference%3E%3Cfes:Literal%3E*%3C/fes:Literal%3E%3C/fes:PropertyIsLike%3E%3C/fes:Filter%3E
The only difference is /*singleChar='%'*/ and /*singleChar='#'*/.
Best regards,
Nhan Vo
Hi,
Can you reproduce the issue with the demo layer ”states”? If you can, please
send the whole GET url for making testing convenient for the others.
Regards,
-Jukka Rahkonen-
Hi list,
I'm upgrading Geoserver from 2.3.5 to 2.8.1 and my client code cannot work
anymore. Basically it sends a WFS Url request with a filter to Geoserver. The
<fes:Filter xmlns:fes='http://www.opengis.net/fes/2.0'
xmlns:gml='http://www.opengis.net/gml/3.2'>
<fes:PropertyIsLike matchCase='false' wildCard='*' singleChar='#'
escapeChar='!'>
<fes:ValueReference>...</fes:ValueReference>
<fes:Literal>...</fes:Literal>
</fes:PropertyIsLike>
</fes:Filter>
With version 2.8.1 I receive the exception message:*XML document structures
must start and end within the same entity*
I have been able to get around this by replacing */singleChar='#'/* with
*/singleChar='%'/*, but still cannot understand why the '#' causes the
problem. Also, '.' and '_' do not work either and I receive the same exception
message. Only '%' works.
Btw, Geoserver 2.3.5 was running with Java 6; when I updated to 2.8.1 I also
updated to Java 8.
If someone could shed some light on this I'd appreciate it.
Best regards,
Nhan Vo
------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
_______________________________________________
Geoserver-users mailing list
https://lists.sourceforge.net/lists/listinfo/geoserver-users
Ben Caradoc-Davies
2016-01-21 21:49:59 UTC
Permalink
Nhan Vo,

I checked the GeoTools copy of the Filter 2.0 schema and it is unchanged
since 2011. Perhaps the parser has changed and now ignores the invalid
attribute? I do not know.

I tried both your URLs with GeoServer master and neither results in an
exception. Both return numberMatched="0" and the logs contain:
filter = [ topp:STATE_NAME is like ü* ]
filter = [ topp:STATE_NAME is like Ü* ]
respectively.

What is the encoding used by your platform? I am using UTF-8. If you are
not using UTF-8, perhaps GeoServer is making incorrect assumptions about
encoding at some point while handling the filter?

Kind regards,
Ben.
Post by Nhan Vo
Hi Ben,
Thanks a lot for the detailed reply and the hints. I can confirm that in
my case filter 2.0 was used with version 2.3.5. It is exactly like it is
now and I have just removed matchCase to make it work in version 2.8.1
according to your explanation. Perhaps someone has modified the schema
in the meantime to make it conform with Filter 2.0 spec?
Regarding the umlauts, I use URLEncoder.encode() to encode the filter
part and it seems to properly percent-encode the letters.
Please try the following, which is the working example from you in your
http://localhost:8080/geoserver/wfs?service=WFS&version=2.0.0&request=GetFeature&typenames=topp:states&filter=%3Cfes:Filter%20xmlns:fes=%22http://www.opengis.net/fes/2.0%22%3E%3Cfes:PropertyIsLike%20wildCard=%22*%22%20singleChar=%22%23%22%20escapeChar=%22!%22%3E%3Cfes:ValueReference%3Etopp:STATE_NAME%3C/fes:ValueReference%3E%3Cfes:Literal%3E%C3%BC*%3C/fes:Literal%3E%3C/fes:PropertyIsLike%3E%3C/fes:Filter%3E
http://localhost:8080/geoserver/wfs?service=WFS&version=2.0.0&request=GetFeature&typenames=topp:states&filter=%3Cfes:Filter%20xmlns:fes=%22http://www.opengis.net/fes/2.0%22%3E%3Cfes:PropertyIsLike%20wildCard=%22*%22%20singleChar=%22%23%22%20escapeChar=%22!%22%3E%3Cfes:ValueReference%3Etopp:STATE_NAME%3C/fes:ValueReference%3E%3Cfes:Literal%3E%C3%9C*%3C/fes:Literal%3E%3C/fes:PropertyIsLike%3E%3C/fes:Filter%3E
I've tried the 2 Urls above with Geoserver 2.8.1.
Best regards,
Nhan Vo
--
Ben Caradoc-Davies <***@transient.nz>
Director
Transient Software Limited <http://transient.nz/>
New Zealand
Nhan Vo
2016-01-22 09:04:12 UTC
Permalink
Hi Ben,

Thanks again for the response. Under my Geoserver's
Settings/Global/Character Set the value is UTF-8 but I still I had the
parsing problem with "Ü". Then I restart my server adding
-Dfile.encoding=UTF-8 to Java options the problem goes away. Perhaps
somewhere in the code the Parser was constructed without explicitly
specifying an encoding. I post the stack trace here just in case it
could help locate the culprit.

Unable to parse filter: <fes:Filter
xmlns:fes="http://www.opengis.net/fes/2.0"><fes:PropertyIsLike
wildCard="*" singleChar="#"
escapeChar="!"><fes:ValueReference>topp:STATE_NAME</fes:ValueReference><fes:Literal>ᅵ?*</fes:Literal></fes:PropertyIsLike></fes:Filter>
com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceException:
Ungï¿œltiges Byte 2 von 2-Byte-UTF-8-Sequenz.
at
com.sun.org.apache.xerces.internal.impl.io.UTF8Reader.invalidByte(UTF8Reader.java:701)
at
com.sun.org.apache.xerces.internal.impl.io.UTF8Reader.read(UTF8Reader.java:372)
at
com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.load(XMLEntityScanner.java:1790)
at
com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.peekChar(XMLEntityScanner.java:503)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2719)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:606)
at
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:118)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510)
at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:848)
at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:777)
at
com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213)
at
com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:643)
at
com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(SAXParserImpl.java:327)
at org.geotools.xml.Parser.parse(Parser.java:240)
at org.geotools.xml.Parser.parse(Parser.java:170)
at org.geoserver.wfs.kvp.FilterKvpParser.parse(FilterKvpParser.java:84)
at org.geoserver.ows.util.KvpUtils.parse(KvpUtils.java:421)
at org.geoserver.ows.Dispatcher.parseKVP(Dispatcher.java:1473)
at org.geoserver.ows.Dispatcher.parseKVP(Dispatcher.java:1469)
at org.geoserver.ows.Dispatcher.init(Dispatcher.java:326)
at
org.geoserver.ows.Dispatcher.handleRequestInternal(Dispatcher.java:245)
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:923)
at
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852)
at
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882)
at
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:778)
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:28)
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:75)
at
org.geoserver.wms.animate.AnimatorFilter.doFilter(AnimatorFilter.java:71)
at
org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:71)
at
org.geoserver.filters.SpringDelegatingFilter.doFilter(SpringDelegatingFilter.java:46)
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:50)
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:311)
at
org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:69)
at
org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:116)
at
org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
at
org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:73)
at
org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:92)
at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
at
org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:69)
at
org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113)
at
org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:73)
at
org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:92)
at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
at
org.geoserver.security.filter.GeoServerAnonymousAuthenticationFilter.doFilter(GeoServerAnonymousAuthenticationFilter.java:54)
at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
at
org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:69)
at
org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:150)
at
org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:73)
at
org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:92)
at
org.geoserver.security.filter.GeoServerBasicAuthenticationFilter.doFilter(GeoServerBasicAuthenticationFilter.java:83)
at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
at
org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:69)
at
org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)
at
org.geoserver.security.filter.GeoServerSecurityContextPersistenceFilter$1.doFilter(GeoServerSecurityContextPersistenceFilter.java:53)
at
org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:73)
at
org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:92)
at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
at
org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:173)
at
org.geoserver.security.GeoServerSecurityFilterChainProxy.doFilter(GeoServerSecurityFilterChainProxy.java:135)
at
org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
at
org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)
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:87)
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:42)
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:48)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.geoserver.filters.FlushSafeFilter.doFilter(FlushSafeFilter.java:44)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
at
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
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.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:852)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
at
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)

org.geoserver.platform.ServiceException: org.xml.sax.SAXException:
Attempted to construct illegal filter - I dont understand the tag:
fes:ValueReference. HINT: tags are case-sensitive!
at
org.geoserver.wfs.kvp.FilterKvpParser.parseXMLFilterWithOldParser(FilterKvpParser.java:145)
at org.geoserver.wfs.kvp.FilterKvpParser.parse(FilterKvpParser.java:96)
at org.geoserver.ows.util.KvpUtils.parse(KvpUtils.java:421)
at org.geoserver.ows.Dispatcher.parseKVP(Dispatcher.java:1473)
at org.geoserver.ows.Dispatcher.parseKVP(Dispatcher.java:1469)
at org.geoserver.ows.Dispatcher.init(Dispatcher.java:326)
at
org.geoserver.ows.Dispatcher.handleRequestInternal(Dispatcher.java:245)
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:923)
at
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852)
at
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882)
at
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:778)
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:28)
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:75)
at
org.geoserver.wms.animate.AnimatorFilter.doFilter(AnimatorFilter.java:71)
at
org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:71)
at
org.geoserver.filters.SpringDelegatingFilter.doFilter(SpringDelegatingFilter.java:46)
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:50)
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:311)
at
org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:69)
at
org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:116)
at
org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
at
org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:73)
at
org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:92)
at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
at
org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:69)
at
org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113)
at
org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:73)
at
org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:92)
at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
at
org.geoserver.security.filter.GeoServerAnonymousAuthenticationFilter.doFilter(GeoServerAnonymousAuthenticationFilter.java:54)
at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
at
org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:69)
at
org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:150)
at
org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:73)
at
org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:92)
at
org.geoserver.security.filter.GeoServerBasicAuthenticationFilter.doFilter(GeoServerBasicAuthenticationFilter.java:83)
at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
at
org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:69)
at
org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)
at
org.geoserver.security.filter.GeoServerSecurityContextPersistenceFilter$1.doFilter(GeoServerSecurityContextPersistenceFilter.java:53)
at
org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:73)
at
org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:92)
at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
at
org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:173)
at
org.geoserver.security.GeoServerSecurityFilterChainProxy.doFilter(GeoServerSecurityFilterChainProxy.java:135)
at
org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
at
org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)
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:87)
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:42)
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:48)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.geoserver.filters.FlushSafeFilter.doFilter(FlushSafeFilter.java:44)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
at
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
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.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:852)
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:745)
Caused by: org.xml.sax.SAXException: Attempted to construct illegal
filter - I dont understand the tag: fes:ValueReference. HINT: tags are
case-sensitive!
at org.geotools.filter.FilterFilter.startElement(FilterFilter.java:154)
at
org.geotools.gml.GMLFilterGeometry.startElement(GMLFilterGeometry.java:174)
at
org.geotools.gml.GMLFilterDocument.startElement(GMLFilterDocument.java:167)
at
org.xml.sax.helpers.ParserAdapter.startElement(ParserAdapter.java:622)
at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:461)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:1364)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2787)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:606)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510)
at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:848)
at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:777)
at
com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213)
at
com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:643)
at org.xml.sax.helpers.ParserAdapter.parse(ParserAdapter.java:430)
at
org.geoserver.wfs.kvp.FilterKvpParser.parseXMLFilterWithOldParser(FilterKvpParser.java:142)
... 86 more

Best regards,
Nhan Vo
Post by Ben Caradoc-Davies
Nhan Vo,
I checked the GeoTools copy of the Filter 2.0 schema and it is
unchanged since 2011. Perhaps the parser has changed and now ignores
the invalid attribute? I do not know.
I tried both your URLs with GeoServer master and neither results in an
filter = [ topp:STATE_NAME is like Ì* ]
filter = [ topp:STATE_NAME is like Ü* ]
respectively.
What is the encoding used by your platform? I am using UTF-8. If you
are not using UTF-8, perhaps GeoServer is making incorrect assumptions
about encoding at some point while handling the filter?
Kind regards,
Ben.
Post by Nhan Vo
Hi Ben,
Thanks a lot for the detailed reply and the hints. I can confirm that in
my case filter 2.0 was used with version 2.3.5. It is exactly like it is
now and I have just removed matchCase to make it work in version 2.8.1
according to your explanation. Perhaps someone has modified the schema
in the meantime to make it conform with Filter 2.0 spec?
Regarding the umlauts, I use URLEncoder.encode() to encode the filter
part and it seems to properly percent-encode the letters.
Please try the following, which is the working example from you in your
previous email in which I just replace the literal "*" with "Ì*" and
http://localhost:8080/geoserver/wfs?service=WFS&version=2.0.0&request=GetFeature&typenames=topp:states&filter=%3Cfes:Filter%20xmlns:fes=%22http://www.opengis.net/fes/2.0%22%3E%3Cfes:PropertyIsLike%20wildCard=%22*%22%20singleChar=%22%23%22%20escapeChar=%22!%22%3E%3Cfes:ValueReference%3Etopp:STATE_NAME%3C/fes:ValueReference%3E%3Cfes:Literal%3E%C3%BC*%3C/fes:Literal%3E%3C/fes:PropertyIsLike%3E%3C/fes:Filter%3E
http://localhost:8080/geoserver/wfs?service=WFS&version=2.0.0&request=GetFeature&typenames=topp:states&filter=%3Cfes:Filter%20xmlns:fes=%22http://www.opengis.net/fes/2.0%22%3E%3Cfes:PropertyIsLike%20wildCard=%22*%22%20singleChar=%22%23%22%20escapeChar=%22!%22%3E%3Cfes:ValueReference%3Etopp:STATE_NAME%3C/fes:ValueReference%3E%3Cfes:Literal%3E%C3%9C*%3C/fes:Literal%3E%3C/fes:PropertyIsLike%3E%3C/fes:Filter%3E
I've tried the 2 Urls above with Geoserver 2.8.1.
Best regards,
Nhan Vo
--
*Thanh-Trong-Nhan Vo*


smile consult GmbH
Vahrenwalder Straße 4
D-30165 Hannover






Tel:



0511/543617-46

Fax:



0511/543617-66

Mail:



***@smileconsult.de <mailto:***@smileconsult.de>

Internet:



http://www.smileconsult.de <http://www.smileconsult.de/>


GeschÀftsfÃŒhrer: Frank Sellerhoff •Peter Milbradt •Christoph Lippert
USt-IdNr.: DE208857046 •Amtsgericht Hannover HRB 58707
Ben Caradoc-Davies
2016-01-23 01:26:30 UTC
Permalink
Nhan Vo,

I think you are not only correct but have located the culprit. I was
able to reproduce the problem for both "ü*" and "Ü*" if I run GeoServer
with -Dfile.encoding=ISO-8859-15 and try the two links you provided
earlier. I have documented this failure and how to reproduce it in a
Jira issue:
https://osgeo-org.atlassian.net/browse/GEOS-7385

I was so pleased by your detailed report that I wrote a unit test to
demonstrate the failure and also a fix, which I have submitted in this
pull request:
https://github.com/geoserver/geoserver/pull/1446

Note that, even with this fix, platforms using a non-UTF-8 default
charset will not be able to support characters outside their charset in
a WFS KVP Filter.

Kind regards,
Ben.
Post by Nhan Vo
Hi Ben,
Thanks again for the response. Under my Geoserver's Settings/Global/Character
Set the value is UTF-8 but I still I had the parsing problem with "Ü". Then I
restart my server adding -Dfile.encoding=UTF-8 to Java options the problem goes
away. Perhaps somewhere in the code the Parser was constructed without
explicitly specifying an encoding. I post the stack trace here just in case it
could help locate the culprit.
Unable to parse filter: <fes:Filter
xmlns:fes="http://www.opengis.net/fes/2.0"><fes:PropertyIsLike wildCard="*"
singleChar="#"
escapeChar="!"><fes:ValueReference>topp:STATE_NAME</fes:ValueReference><fes:Literal>�?*</fes:Literal></fes:PropertyIsLike></fes:Filter>
Ung�ltiges Byte 2 von 2-Byte-UTF-8-Sequenz. at
[...]
Post by Nhan Vo
org.geoserver.wfs.kvp.FilterKvpParser.parse(FilterKvpParser.java:84)
--
Ben Caradoc-Davies <***@transient.nz>
Director
Transient Software Limited <http://transient.nz/>
New Zealand
Ben Caradoc-Davies
2016-01-26 01:49:24 UTC
Permalink
I have implemented an even better solution so that platforms using a
non-UTF-8 default charset *will* be able to support characters outside
of this charset in a WFS KVP Filter:

[GEOS-7385] Do not re-encode Filter in default charset when parsing WFS
KVP Filter
https://github.com/geoserver/geoserver/pull/1449
https://osgeo-org.atlassian.net/browse/GEOS-7385

Kind regards,
Ben.
Post by Ben Caradoc-Davies
Nhan Vo,
I think you are not only correct but have located the culprit. I was
able to reproduce the problem for both "ü*" and "Ü*" if I run GeoServer
with -Dfile.encoding=ISO-8859-15 and try the two links you provided
earlier. I have documented this failure and how to reproduce it in a
https://osgeo-org.atlassian.net/browse/GEOS-7385
I was so pleased by your detailed report that I wrote a unit test to
demonstrate the failure and also a fix, which I have submitted in this
https://github.com/geoserver/geoserver/pull/1446
Note that, even with this fix, platforms using a non-UTF-8 default
charset will not be able to support characters outside their charset in
a WFS KVP Filter.
Kind regards,
Ben.
--
Ben Caradoc-Davies <***@transient.nz>
Director
Transient Software Limited <http://transient.nz/>
New Zealand
Ben Caradoc-Davies
2016-01-23 03:14:11 UTC
Permalink
Nhan Vo,

I have contacted the chair of the OGC WFS/FES standard technical
committee, who has confirmed that the lack of matchCase on
PropertyIsLike in the Filter 2.0.2 schemas and standard is a known
issue. He is following up with OGC.

When the Filter 2.0 schemas are updated to include matchCase on
PropertyIsLike, we just need to apply this change to the schemas in
gt-xsd-fes and GeoServer will start permitting matchCase on PropertyIsLike.

We should also add test coverage for matchCase to gs-wfs
Filter_2_0_0_KvpParserTest, once this new test is merged and matchCase
is in the Filter 2.0 schemas. Test coverage will prevent any future
regressions.

Kind regards,
Ben.
Post by Ben Caradoc-Davies
I looked a little deeper and matchCase="false" *should* be supported on
PropertyIsLike in GeoServer WFS 1.1 because Niels kindly updated
http://osgeo-org.1560.x6.nabble.com/ogc-filter-1-1-doesn-t-support-matchCase-in-PropertyIsLike-td5079577.html
https://github.com/geotools/geotools/commit/4855cba310362f488d5686eda1fff17d7d02c714
http://schemas.opengis.net/filter/1.1.0/filter.xsd
I changed the GET request to use WFS 1.1 and can confirm that
http://localhost:8080/geoserver/wfs?service=WFS&version=1.1.0&request=GetFeature&typename=topp:states&filter=%3Cogc:Filter%20xmlns:ogc=%22http://www.opengis.net/ogc%22%3E%3Cogc:PropertyIsLike%20matchCase=%22false%22%20wildCard=%22*%22%20singleChar=%22%23%22%20escapeChar=%22!%22%3E%3Cogc:PropertyName%3Etopp:STATE_NAME%3C/ogc:PropertyName%3E%3Cogc:Literal%3Eillino*%3C/ogc:Literal%3E%3C/ogc:PropertyIsLike%3E%3C/ogc:Filter%3E
*But* if I look at even the latest schemas and standard for FES 2.0.2,
http://schemas.opengis.net/filter/2.0/filter.xsd
http://docs.opengeospatial.org/is/09-026r2/09-026r2.html
I think this is a bug in the FES 2.0.2 schemas. I think GeoServer will
need updated schemas to fix this for WFS 2.0 (and we can see that the
XML parsing is horribly broken without this fix). We may need a change
http://www.opengeospatial.org/standards/cr
If I add a single line to the definition of PropertyIsLikeType in the
modules/extension/xsd/xsd-fes/src/main/resources/org/geotools/filter/v2_0/filter.xsd
<xsd:attribute name="matchCase" type="xsd:boolean" use="optional"
default="true"/>
then suddenly matchCase="false" on PropertyIsLike starts working for WFS
http://localhost:8080/geoserver/wfs?service=WFS&version=2.0.0&request=GetFeature&typenames=topp:states&filter=%3Cfes:Filter%20xmlns:fes=%22http://www.opengis.net/fes/2.0%22%3E%3Cfes:PropertyIsLike%20matchCase=%22false%22%20wildCard=%22*%22%20singleChar=%22%23%22%20escapeChar=%22!%22%3E%3Cfes:ValueReference%3Etopp:STATE_NAME%3C/fes:ValueReference%3E%3Cfes:Literal%3Eillino*%3C/fes:Literal%3E%3C/fes:PropertyIsLike%3E%3C/fes:Filter%3E
--
Ben Caradoc-Davies <***@transient.nz>
Director
Transient Software Limited <http://transient.nz/>
New Zealand
Ben Caradoc-Davies
2017-06-18 04:16:36 UTC
Permalink
I have just heard back from the chair of the OGC WFS/FES technical
committee. The Filter schemas and standard have now been updated to
version 2.0.3, which includes matchCase on PropertyIsLike. I will patch
our copy of this schema to include matchCase on PropertyIsLike. This
will enable matchCase on PropertyIsLike in WFS 2.0 requests:
https://osgeo-org.atlassian.net/browse/GEOT-5343

Kind regards,
Ben.
Post by Ben Caradoc-Davies
Nhan Vo,
I have contacted the chair of the OGC WFS/FES standard technical
committee, who has confirmed that the lack of matchCase on
PropertyIsLike in the Filter 2.0.2 schemas and standard is a known
issue. He is following up with OGC.
When the Filter 2.0 schemas are updated to include matchCase on
PropertyIsLike, we just need to apply this change to the schemas in
gt-xsd-fes and GeoServer will start permitting matchCase on PropertyIsLike.
We should also add test coverage for matchCase to gs-wfs
Filter_2_0_0_KvpParserTest, once this new test is merged and matchCase
is in the Filter 2.0 schemas. Test coverage will prevent any future
regressions.
Kind regards,
Ben.
Post by Ben Caradoc-Davies
I looked a little deeper and matchCase="false" *should* be supported on
PropertyIsLike in GeoServer WFS 1.1 because Niels kindly updated
http://osgeo-org.1560.x6.nabble.com/ogc-filter-1-1-doesn-t-support-matchCase-in-PropertyIsLike-td5079577.html
https://github.com/geotools/geotools/commit/4855cba310362f488d5686eda1fff17d7d02c714
http://schemas.opengis.net/filter/1.1.0/filter.xsd
I changed the GET request to use WFS 1.1 and can confirm that
http://localhost:8080/geoserver/wfs?service=WFS&version=1.1.0&request=GetFeature&typename=topp:states&filter=%3Cogc:Filter%20xmlns:ogc=%22http://www.opengis.net/ogc%22%3E%3Cogc:PropertyIsLike%20matchCase=%22false%22%20wildCard=%22*%22%20singleChar=%22%23%22%20escapeChar=%22!%22%3E%3Cogc:PropertyName%3Etopp:STATE_NAME%3C/ogc:PropertyName%3E%3Cogc:Literal%3Eillino*%3C/ogc:Literal%3E%3C/ogc:PropertyIsLike%3E%3C/ogc:Filter%3E
*But* if I look at even the latest schemas and standard for FES 2.0.2,
http://schemas.opengis.net/filter/2.0/filter.xsd
http://docs.opengeospatial.org/is/09-026r2/09-026r2.html
I think this is a bug in the FES 2.0.2 schemas. I think GeoServer will
need updated schemas to fix this for WFS 2.0 (and we can see that the
XML parsing is horribly broken without this fix). We may need a change
http://www.opengeospatial.org/standards/cr
If I add a single line to the definition of PropertyIsLikeType in the
modules/extension/xsd/xsd-fes/src/main/resources/org/geotools/filter/v2_0/filter.xsd
<xsd:attribute name="matchCase" type="xsd:boolean" use="optional"
default="true"/>
then suddenly matchCase="false" on PropertyIsLike starts working for WFS
http://localhost:8080/geoserver/wfs?service=WFS&version=2.0.0&request=GetFeature&typenames=topp:states&filter=%3Cfes:Filter%20xmlns:fes=%22http://www.opengis.net/fes/2.0%22%3E%3Cfes:PropertyIsLike%20matchCase=%22false%22%20wildCard=%22*%22%20singleChar=%22%23%22%20escapeChar=%22!%22%3E%3Cfes:ValueReference%3Etopp:STATE_NAME%3C/fes:ValueReference%3E%3Cfes:Literal%3Eillino*%3C/fes:Literal%3E%3C/fes:PropertyIsLike%3E%3C/fes:Filter%3E
--
Ben Caradoc-Davies <***@transient.nz>
Director
Transient Software Limited <http://transient.nz/>
New Zealand
Loading...