Uploaded image for project: 'GeoServer'
  1. GEOS-8523

Labeling of polygon borders with follow-line may fail (when rings are small enough)

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: 2.12.1
    • Fix Version/s: 2.12.3, 2.13-beta
    • Component/s: WMS
    • Labels:
      None
    • Environment:

      ubuntu server

      Description

      Using Geoserver 2.12 I experience missing tiles. Digging deeper I found a problem while Geoserver is labeling some geometries. This is our style, which produces the exceptions at the bottom.

      Same layer works using Geoserver 2.10 without any problems.

      I am on the way to produce a more minimalistic example

      [geom_type=1]{
        mark: url("kontrollobjekte/${schild}");
        mark-mime: "image/svg";
        mark-size: 60;
          label: [objekttypname];
          font-fill: black;}
        [geom_type=2]{
           stroke: #333333, #6699FF;
         stroke-width: 5px, 3px;
         stroke-linecap: round;
          z-index: 0, 1;
           label: [objekttypname];
         label-offset: 7px;
         font-fill: #333333;}
      
        [geom_type=3]{  
          fill: #000080;
        label: [objekttypname];
          label-offset: 7px;
          font-fill: white;}
      

      GeoServer throws the following exception and stops rendering the actual request:

      2018-01-11 11:29:55,450 DEBUG [org.geoserver.wms] (default task-46) Got an unexpected render exception.: java.lang.IllegalArgumentException: Points of LinearRing do not form a closed linestring
      	at com.vividsolutions.jts.geom.LinearRing.validateConstruction(LinearRing.java:111)
      	at com.vividsolutions.jts.geom.LinearRing.<init>(LinearRing.java:106)
      	at com.vividsolutions.jts.geom.GeometryFactory.createLinearRing(GeometryFactory.java:355)
      	at com.vividsolutions.jts.geom.GeometryFactory.createLinearRing(GeometryFactory.java:342)
      	at org.geotools.renderer.label.LabelCacheImpl.decimateLineString(LabelCacheImpl.java:1078)
      	at org.geotools.renderer.label.LabelCacheImpl.paintLineLabelsWithLetterConflict(LabelCacheImpl.java:673)
      	at org.geotools.renderer.label.LabelCacheImpl.paintPolygonBorder(LabelCacheImpl.java:1336)
      	at org.geotools.renderer.label.LabelCacheImpl.paintLabels(LabelCacheImpl.java:529)
      	at org.geotools.renderer.label.LabelCacheImpl.end(LabelCacheImpl.java:439)
      	at org.geotools.renderer.lite.StreamingRenderer.paint(StreamingRenderer.java:875)
      	at org.geoserver.wms.map.RenderedImageMapOutputFormat.produceMap(RenderedImageMapOutputFormat.java:565)
      	at org.geoserver.wms.map.RenderedImageMapOutputFormat.produceMap(RenderedImageMapOutputFormat.java:278)
      	at org.geoserver.wms.map.RenderedImageMapOutputFormat.produceMap(RenderedImageMapOutputFormat.java:141)
      	at org.geoserver.wms.GetMap.executeInternal(GetMap.java:653)
      	at org.geoserver.wms.GetMap.run(GetMap.java:285)
      	at org.geoserver.wms.GetMap.run(GetMap.java:131)
      

      and

      2018-01-11 11:29:55,451 ERROR [org.geoserver.ows] (default task-46) : org.geoserver.platform.ServiceException: Rendering process failed
      	at org.geoserver.wms.map.RenderedImageMapOutputFormat.produceMap(RenderedImageMapOutputFormat.java:595)
      	at org.geoserver.wms.map.RenderedImageMapOutputFormat.produceMap(RenderedImageMapOutputFormat.java:278)
      	at org.geoserver.wms.map.RenderedImageMapOutputFormat.produceMap(RenderedImageMapOutputFormat.java:141)
      	at org.geoserver.wms.GetMap.executeInternal(GetMap.java:653)
      	at org.geoserver.wms.GetMap.run(GetMap.java:285)
      	at org.geoserver.wms.GetMap.run(GetMap.java:131)
      	at org.geoserver.wms.DefaultWebMapService.getMap(DefaultWebMapService.java:320)
      	at sun.reflect.GeneratedMethodAccessor487.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
      	at org.geoserver.kml.WebMapServiceKmlInterceptor.invoke(WebMapServiceKmlInterceptor.java:34)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
      	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:179)
      	at org.geoserver.gwc.wms.CachingWebMapService.invoke(CachingWebMapService.java:74)
      	at org.geoserver.gwc.wms.CachingWebMapService.invoke(CachingWebMapService.java:55)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
      	at org.geoserver.ows.util.RequestObjectLogger.invoke(RequestObjectLogger.java:55)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
      	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213)
      	at com.sun.proxy.$Proxy208.getMap(Unknown Source)
      	at sun.reflect.GeneratedMethodAccessor435.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.geoserver.ows.Dispatcher.execute(Dispatcher.java:857)
      	at org.geoserver.ows.Dispatcher.handleRequestInternal(Dispatcher.java:268)
      	at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:174)
      	at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:50)
      	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:963)
      	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:897)
      	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970)
      	at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:861)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)
      	at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
      	at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:85)
      	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:129)
      	at org.geoserver.filters.ThreadLocalsCleanupFilter.doFilter(ThreadLocalsCleanupFilter.java:28)
      	at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
      	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
      	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 io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
      	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
      	at org.geoserver.platform.AdvancedDispatchFilter.doFilter(AdvancedDispatchFilter.java:50)
      	at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
      	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
      	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:316)
      	at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:69)
      	at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:126)
      	at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:90)
      	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:330)
      	at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:69)
      	at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:114)
      	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:330)
      	at org.geoserver.security.filter.GeoServerAnonymousAuthenticationFilter.doFilter(GeoServerAnonymousAuthenticationFilter.java:54)
      	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
      	at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:69)
      	at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilterInternal(BasicAuthenticationFilter.java:158)
      	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
      	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:84)
      	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
      	at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:69)
      	at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:91)
      	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:330)
      	at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:213)
      	at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:176)
      	at org.geoserver.security.GeoServerSecurityFilterChainProxy.doFilter(GeoServerSecurityFilterChainProxy.java:152)
      	at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
      	at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:262)
      	at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
      	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
      	at org.geoserver.filters.LoggingFilter.doFilter(LoggingFilter.java:88)
      	at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
      	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
      	at org.geoserver.filters.XFrameOptionsFilter.doFilter(XFrameOptionsFilter.java:89)
      	at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
      	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
      	at org.geoserver.filters.GZIPFilter.doFilter(GZIPFilter.java:42)
      	at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
      	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
      	at org.geoserver.filters.SessionDebugFilter.doFilter(SessionDebugFilter.java:48)
      	at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
      	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
      	at org.geoserver.filters.FlushSafeFilter.doFilter(FlushSafeFilter.java:44)
      	at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
      	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
      	at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:197)
      	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
      	at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
      	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
      	at com.gingko.caching.CacheFilter.doFilter(CacheFilter.java:133)
      	at net.sf.ehcache.constructs.web.filter.Filter.doFilter(Filter.java:86)
      	at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
      	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
      	at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:84)
      	at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)
      	at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
      	at org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)
      	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
      	at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131)
      	at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57)
      	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
      	at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46)
      	at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64)
      	at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60)
      	at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77)
      	at io.undertow.security.handlers.NotificationReceiverHandler.handleRequest(NotificationReceiverHandler.java:50)
      	at io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43)
      	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
      	at org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)
      	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
      	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
      	at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:292)
      	at io.undertow.servlet.handlers.ServletInitialHandler.access$100(ServletInitialHandler.java:81)
      	at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:138)
      	at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:135)
      	at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48)
      	at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)
      	at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
      	at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
      	at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
      	at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
      	at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
      	at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:272)
      	at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:81)
      	at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:104)
      	at io.undertow.server.Connectors.executeRootHandler(Connectors.java:202)
      	at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:805)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	at java.lang.Thread.run(Thread.java:745)
      Caused by: java.lang.IllegalArgumentException: Points of LinearRing do not form a closed linestring
      	at com.vividsolutions.jts.geom.LinearRing.validateConstruction(LinearRing.java:111)
      	at com.vividsolutions.jts.geom.LinearRing.<init>(LinearRing.java:106)
      	at com.vividsolutions.jts.geom.GeometryFactory.createLinearRing(GeometryFactory.java:355)
      	at com.vividsolutions.jts.geom.GeometryFactory.createLinearRing(GeometryFactory.java:342)
      	at org.geotools.renderer.label.LabelCacheImpl.decimateLineString(LabelCacheImpl.java:1078)
      	at org.geotools.renderer.label.LabelCacheImpl.paintLineLabelsWithLetterConflict(LabelCacheImpl.java:673)
      	at org.geotools.renderer.label.LabelCacheImpl.paintPolygonBorder(LabelCacheImpl.java:1336)
      	at org.geotools.renderer.label.LabelCacheImpl.paintLabels(LabelCacheImpl.java:529)
      	at org.geotools.renderer.label.LabelCacheImpl.end(LabelCacheImpl.java:439)
      	at org.geotools.renderer.lite.StreamingRenderer.paint(StreamingRenderer.java:875)
      	at org.geoserver.wms.map.RenderedImageMapOutputFormat.produceMap(RenderedImageMapOutputFormat.java:565)
      	... 146 more
      

      and

      2018-01-11 11:29:57,500 DEBUG [org.geotools.renderer.label] (default task-52) Failure while painting labels: java.lang.IllegalArgumentException: Points of LinearRing do not form a closed linestring
      	at com.vividsolutions.jts.geom.LinearRing.validateConstruction(LinearRing.java:111)
      	at com.vividsolutions.jts.geom.LinearRing.<init>(LinearRing.java:106)
      	at com.vividsolutions.jts.geom.GeometryFactory.createLinearRing(GeometryFactory.java:355)
      	at com.vividsolutions.jts.geom.GeometryFactory.createLinearRing(GeometryFactory.java:342)
      	at org.geotools.renderer.label.LabelCacheImpl.decimateLineString(LabelCacheImpl.java:1078)
      	at org.geotools.renderer.label.LabelCacheImpl.paintLineLabelsWithLetterConflict(LabelCacheImpl.java:673)
      	at org.geotools.renderer.label.LabelCacheImpl.paintPolygonBorder(LabelCacheImpl.java:1336)
      	at org.geotools.renderer.label.LabelCacheImpl.paintLabels(LabelCacheImpl.java:529)
      	at org.geotools.renderer.label.LabelCacheImpl.end(LabelCacheImpl.java:439)
      	at org.geotools.renderer.lite.StreamingRenderer.paint(StreamingRenderer.java:875)
      	at org.geoserver.wms.map.RenderedImageMapOutputFormat.produceMap(RenderedImageMapOutputFormat.java:565)
      	at org.geoserver.wms.map.RenderedImageMapOutputFormat.produceMap(RenderedImageMapOutputFormat.java:278)
      	at org.geoserver.wms.map.RenderedImageMapOutputFormat.produceMap(RenderedImageMapOutputFormat.java:141)
      	at org.geoserver.wms.GetMap.executeInternal(GetMap.java:653)
      	at org.geoserver.wms.GetMap.run(GetMap.java:285)
      	at org.geoserver.wms.GetMap.run(GetMap.java:131)
      

        Attachments

          Issue links

            Activity

              People

              • Assignee:
                aaime Andrea Aime
                Reporter:
                t.warneke Tobias
              • Votes:
                1 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: