[Geoserver-devel] [jira] Created: (GEOS-4669) PNG image palette error when requesting GeoTiff from Geoserver

PNG image palette error when requesting GeoTiff from Geoserver
---------------------------------------------------------------

                 Key: GEOS-4669
                 URL: https://jira.codehaus.org/browse/GEOS-4669
             Project: GeoServer
          Issue Type: Bug
          Components: WMS
    Affects Versions: 2.1.1, 2.1.0
         Environment: Ubuntu x64, Apache Tomcat 6.0.2.4, Sun jdk1.6.0_24 64bit
            Reporter: Max Stephan
            Assignee: Andrea Aime

When requesting a specific rasterlayer in PNG 24bit format I get an error like this:
com.sun.medialib.codex.png.PNGException: codecLib: image palette error. [PLTE].
To see this error please follow the link below and switch format to "PNG 24bit".
[Link to OpenLayers-Preview|http://131.220.109.2/geoserver/GVP/wms?service=WMS&version=1.1.0&request=GetMap&layers=GVP:GVP_landcover-change_volta-basin_1990-to-2000_ras&styles=&bbox=-6.605,4.743,4.112,15.694&width=501&height=512&srs=EPSG:4326&format=application/openlayers]
The raster the layer is based on is in GeoTIFF-format and has a size of about 50MB.

Here is the complete stacktrace for the error:

{quote}
com.sun.medialib.codec.png.PNGException: codecLib: image palette error. [PLTE]
        at com.sun.medialib.codec.png.Encoder.setPalette(Encoder.java:175)
        at com.sun.media.imageioimpl.plugins.png.CLibPNGMetadata.writeMetadata(CLibPNGMetadata.java:2692)
        at com.sun.media.imageioimpl.plugins.png.CLibPNGImageWriter.write(CLibPNGImageWriter.java:236)
        at org.geotools.image.ImageWorker.writePNG(ImageWorker.java:2450)
        at org.geoserver.wms.map.PNGMapResponse.formatImageOutputStream(PNGMapResponse.java:75)
        at org.geoserver.wms.map.RenderedImageMapResponse.write(RenderedImageMapResponse.java:113)
        at org.geoserver.ows.Dispatcher.response(Dispatcher.java:757)
        at org.geoserver.ows.Dispatcher.handleRequestInternal(Dispatcher.java:238)
        at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
        at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
        at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:875)
        at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:809)
        at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:571)
        at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:501)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.geoserver.filters.ThreadLocalsCleanupFilter.doFilter(ThreadLocalsCleanupFilter.java:23)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:74)
        at org.geoserver.filters.SpringDelegatingFilter.doFilter(SpringDelegatingFilter.java:45)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.geoserver.platform.AdvancedDispatchFilter.doFilter(AdvancedDispatchFilter.java:49)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.vfny.geoserver.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:109)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:394)
        at org.springframework.security.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109)
        at org.springframework.security.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
        at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:406)
        at org.springframework.security.ui.ExceptionTranslationFilter.doFilterHttp(ExceptionTranslationFilter.java:101)
        at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
        at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:406)
        at org.springframework.security.providers.anonymous.AnonymousProcessingFilter.doFilterHttp(AnonymousProcessingFilter.java:105)
        at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
        at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:406)
        at org.springframework.security.ui.basicauth.BasicProcessingFilter.doFilterHttp(BasicProcessingFilter.java:174)
        at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
        at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:406)
{quote}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira