[Geoserver-devel] Problems WCS with PNG format for trunk version

Hello geoserver-list,

Until last week, I used the trunk version 1.5.x of Geoserver, which was based on Geotools 2.3.0-RC1. With this version, I have made a Coverage Store for NetCDF files. It worked well, and gave me a PNG raster as response of this URL :
http://localhost:8080/geoserver/wcs?bbox=-180,-90,180,90&format=png&service=wcs&version=1.0.0&request=GetCoverage&coverage=geom:20050518&crs=EPSG:4326.
This week Geoserver trunk has moved to Geotools 2.3.1, which interests me, because some modifications on GridCoverage have been commited last week on the 2.3.x branches of Geotools.

I now add Width and Height parameters, as they now are required for the WCS request, but my request doesn't display me my PNG file.
An error appears :
398016 [INFO] org.vfny.geoserver.servlets.PartialBufferStrategy - OutputStreamwas successfully aborted.
398016 [INFO] org.vfny.geoserver.servlets.AbstractService - Had an undefined error: All factories fail for the operation "ImageWrite"
398016 [ATTENTION] org.vfny.geoserver.wcs.WcsException - encountered error: javax.media.jai.util.ImagingException: All factories fail for the operation "ImageWrite"
org.vfny.geoserver.wcs.WcsException: javax.media.jai.util.ImagingException: Allfactories fail for the operation "ImageWrite"
        at org.vfny.geoserver.wcs.WcsExceptionHandler.newServiceException(WcsExceptionHandler.java:72)
        at org.vfny.geoserver.servlets.AbstractService.sendError(AbstractService.java:885)
        at org.vfny.geoserver.servlets.AbstractService.doService(AbstractService.java:626)
        at org.vfny.geoserver.servlets.AbstractService.doGet(AbstractService.java:340)
        at org.geoserver.request.Dispatcher.dispatch(Dispatcher.java:195) at org.geoserver.request.Dispatcher.handleRequestInternal(Dispatcher.java:58)
        at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:139)
        at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:44)
        at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:684)
        at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:625)
        at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:392)
        at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:347)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:689) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
        at org.vfny.geoserver.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:122)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
        ...
Caused by: javax.media.jai.util.ImagingException: All factories fail for the ope
ration "ImageWrite"
        at javax.media.jai.OperationRegistry.invokeFactory(OperationRegistry.jav
a:1687)
        at javax.media.jai.ThreadSafeOperationRegistry.invokeFactory(ThreadSafeO
perationRegistry.java:473)

I've tried to passed to JAI 1.1.3 and JAI Image IO 1.1, and it's the same :frowning:

Best regards,
Cédric B.

I want to add that I can get a JPEG or GIF image in WCS, with the same GetCoverage request, but not PNG file (error Jai Image Io ImageWriter ...)
Moreover I can get a PNG file in WMS with the GetMap request for my coverage...

Is someone else experencing the same thing with the trunk version of Geoserver?

Cédric Briançon.

Hi Cédric,
I have just recompiled from scratch GeoTools and GeoServer and tried to get coverages both from WMS, through GetMap request, and WCS, through GetCoverage request, in any image format, and I have obtained good results.

I tried just the default examples … maybe there is something wrong in your plugin? Is it possible for you to check for a more detailed log or something like that? Have you tried with built in formats if you experience the same behaviour?

On 12/5/06, Cédric Briançon <cedric.briancon@anonymised.com> wrote:

I want to add that I can get a JPEG or GIF image in WCS, with the same
GetCoverage request, but not PNG file (error Jai Image Io ImageWriter …)
Moreover I can get a PNG file in WMS with the GetMap request for my
coverage…

Is someone else experencing the same thing with the trunk version of
Geoserver?

Cédric Briançon.


Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net’s Techsay panel and you’ll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV


Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Eng. Alessio Fabiani
Vice President/CTO GeoSolutions

http://www.geo-solutions.it


Cédric Briançon ha scritto:

Hello geoserver-list,

Until last week, I used the trunk version 1.5.x of Geoserver, which was based on Geotools 2.3.0-RC1. With this version, I have made a Coverage Store for NetCDF files. It worked well, and gave me a PNG raster as response of this URL :
http://localhost:8080/geoserver/wcs?bbox=-180,-90,180,90&format=png&service=wcs&version=1.0.0&request=GetCoverage&coverage=geom:20050518&crs=EPSG:4326.
This week Geoserver trunk has moved to Geotools 2.3.1, which interests me, because some modifications on GridCoverage have been commited last week on the 2.3.x branches of Geotools.

...

org.vfny.geoserver.wcs.WcsException: javax.media.jai.util.ImagingException: Allfactories fail for the operation "ImageWrite"

...

Caused by: javax.media.jai.util.ImagingException: All factories fail for the ope
ration "ImageWrite"
        at javax.media.jai.OperationRegistry.invokeFactory(OperationRegistry.jav
a:1687)
        at javax.media.jai.ThreadSafeOperationRegistry.invokeFactory(ThreadSafeO
perationRegistry.java:473)

This stack trace is cut... do you have the rest of it up to the
geoserver/geotools level? The first part of the stack trace is not
useful, only what's beyond "Caused by: javax..." is.

Cheers
Andrea

Andrea Aime a écrit :

Cédric Briançon ha scritto:

Hello geoserver-list,

Until last week, I used the trunk version 1.5.x of Geoserver, which was based on Geotools 2.3.0-RC1. With this version, I have made a Coverage Store for NetCDF files. It worked well, and gave me a PNG raster as response of this URL :
http://localhost:8080/geoserver/wcs?bbox=-180,-90,180,90&format=png&service=wcs&version=1.0.0&request=GetCoverage&coverage=geom:20050518&crs=EPSG:4326.

This week Geoserver trunk has moved to Geotools 2.3.1, which interests me, because some modifications on GridCoverage have been commited last week on the 2.3.x branches of Geotools.

...

org.vfny.geoserver.wcs.WcsException: javax.media.jai.util.ImagingException: Allfactories fail for the operation "ImageWrite"

...

Caused by: javax.media.jai.util.ImagingException: All factories fail for the ope
ration "ImageWrite"
        at javax.media.jai.OperationRegistry.invokeFactory(OperationRegistry.jav
a:1687)
        at javax.media.jai.ThreadSafeOperationRegistry.invokeFactory(ThreadSafeO
perationRegistry.java:473)

This stack trace is cut... do you have the rest of it up to the
geoserver/geotools level? The first part of the stack trace is not
useful, only what's beyond "Caused by: javax..." is.

The stack trace is quite long, so I've included to this mail my error log in an attachement. I would be glad if you could see it :slight_smile:
I'm working on Windows XP, with Tomcat 5.5.17, JDK 1.5.0.8, JAI 1.1.3 and JAI Image IO 1.1...

Cheers
Andrea

Thanks a lot,
Cédric B.

(attachments)

Error_log.txt (20.3 KB)

Cédric Briançon ha scritto:

Andrea Aime a écrit :

The stack trace is quite long, so I've included to this mail my error log in an attachement. I would be glad if you could see it :slight_smile:
I'm working on Windows XP, with Tomcat 5.5.17, JDK 1.5.0.8, JAI 1.1.3 and JAI Image IO 1.1...

Ah, here is the relevant part I guess:

Caused by: javax.media.jai.util.ImagingException: All factories fail for the operation "ImageWrite"
  at javax.media.jai.OperationRegistry.invokeFactory(OperationRegistry.java:1687)
  at javax.media.jai.ThreadSafeOperationRegistry.invokeFactory(ThreadSafeOperationRegistry.java:473)
  at javax.media.jai.registry.RIFRegistry.create(RIFRegistry.java:332)
  at javax.media.jai.RenderedOp.createInstance(RenderedOp.java:819)
  at javax.media.jai.RenderedOp.createRendering(RenderedOp.java:867)
  at javax.media.jai.RenderedOp.getRendering(RenderedOp.java:888)
  at javax.media.jai.JAI.createNS(JAI.java:1099)
  at javax.media.jai.JAI.create(JAI.java:973)
  at javax.media.jai.JAI.create(JAI.java:1395)
  at org.geotools.gce.image.WorldImageWriter.encode(WorldImageWriter.java:428)
  at org.geotools.gce.image.WorldImageWriter.write(WorldImageWriter.java:208)
  at org.vfny.geoserver.wcs.responses.coverage.IMGCoverageResponseDelegate.encode(IMGCoverageResponseDelegate.java:111)
  at org.vfny.geoserver.wcs.responses.CoverageResponse.writeTo(CoverageResponse.java:174)
  at org.vfny.geoserver.servlets.AbstractService.doService(AbstractService.java:601)
  ... 28 more
Caused by: java.lang.reflect.InvocationTargetException
  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 javax.media.jai.FactoryCache.invoke(FactoryCache.java:122)
  at javax.media.jai.OperationRegistry.invokeFactory(OperationRegistry.java:1674)
  ... 41 more
Caused by: 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 com.sun.media.jai.imageioimpl.ImageWriteCRIF.create(ImageWriteCRIF.java:581)
  at com.sun.media.jai.imageioimpl.ImageWriteCRIF.create(ImageWriteCRIF.java:231)
  ... 47 more

Thought, why there is a palette error is beyond my knowledge.
Simone, Alessio, any clue?
Cheers
Andrea

Ciao Cedric,
could you provide a test-case for this issue?

Simone.

On 12/5/06, Andrea Aime <aaime@anonymised.com> wrote:

Cédric Briançon ha scritto:
> Andrea Aime a écrit :

> The stack trace is quite long, so I've included to this mail my error
> log in an attachement. I would be glad if you could see it :slight_smile:
> I'm working on Windows XP, with Tomcat 5.5.17, JDK 1.5.0.8, JAI 1.1.3
> and JAI Image IO 1.1...

Ah, here is the relevant part I guess:

Caused by: javax.media.jai.util.ImagingException: All factories fail for
the operation "ImageWrite"
       at
javax.media.jai.OperationRegistry.invokeFactory(OperationRegistry.java:1687)
       at
javax.media.jai.ThreadSafeOperationRegistry.invokeFactory(ThreadSafeOperationRegistry.java:473)
       at javax.media.jai.registry.RIFRegistry.create(RIFRegistry.java:332)
       at javax.media.jai.RenderedOp.createInstance(RenderedOp.java:819)
       at javax.media.jai.RenderedOp.createRendering(RenderedOp.java:867)
       at javax.media.jai.RenderedOp.getRendering(RenderedOp.java:888)
       at javax.media.jai.JAI.createNS(JAI.java:1099)
       at javax.media.jai.JAI.create(JAI.java:973)
       at javax.media.jai.JAI.create(JAI.java:1395)
       at
org.geotools.gce.image.WorldImageWriter.encode(WorldImageWriter.java:428)
       at org.geotools.gce.image.WorldImageWriter.write(WorldImageWriter.java:208)
       at
org.vfny.geoserver.wcs.responses.coverage.IMGCoverageResponseDelegate.encode(IMGCoverageResponseDelegate.java:111)
       at
org.vfny.geoserver.wcs.responses.CoverageResponse.writeTo(CoverageResponse.java:174)
       at
org.vfny.geoserver.servlets.AbstractService.doService(AbstractService.java:601)
       ... 28 more
Caused by: java.lang.reflect.InvocationTargetException
       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 javax.media.jai.FactoryCache.invoke(FactoryCache.java:122)
       at
javax.media.jai.OperationRegistry.invokeFactory(OperationRegistry.java:1674)
       ... 41 more
Caused by: 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
com.sun.media.jai.imageioimpl.ImageWriteCRIF.create(ImageWriteCRIF.java:581)
       at
com.sun.media.jai.imageioimpl.ImageWriteCRIF.create(ImageWriteCRIF.java:231)
       ... 47 more

Thought, why there is a palette error is beyond my knowledge.
Simone, Alessio, any clue?
Cheers
Andrea

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

--
-------------------------------------------------------
Eng. Simone Giannecchini
President /CEO GeoSolutions

http://www.geo-solutions.it

-------------------------------------------------------