Are you using gcj? gnu.xml.dom.JAXPFactory looks like something from GNU 
Classpath. gcj is *not* a supported implementation.

GeoTools supports Oracle JDK. OpenJDK is also likely to work.

Kind regards,
Ben.

On 07/11/12 15:55, Zarbo FBK wrote:
> Dear all,
> I'm using GeoTools 2.7.4 within the 52NorthWPS-3.1 project and i got the
> following issue while writing in output a geotiff using the
> GeoTiffWriter class.
>
> The code is this:
>
> try{
>            GeoTiffReader reader = new GeoTiffReader(new
> File("2011_AVG.tif"));
>            GridCoverage2D gc_read = (GridCoverage2D) reader.read(null);
>
>
>            String output_file = "output_prova_writer.tif";
>            GridCoverageFactory fact = new GridCoverageFactory();
>
>            GeoTiffWriter writer = new GeoTiffWriter(new File(output_file))
>            GridCoverage2D gc_write = fact.create("Prova Writer",
> gc_read.getRenderedImage(), gc_read.getEnvelope2D());
>
>            writer.write(gc_write, null);
>
>
>        }catch(IOException e){
>            e.printStackTrace();
>            throw new RuntimeException("I/O ERROR");
>
>        }
>
> The exception is this:
>
> javax.imageio.IIOException: Failed to set GeoTIFFWritingUtilities
> specific tags.
>          at
> org.geotools.gce.geotiff.GeoTiffWriter.createGeoTiffIIOMetadata(GeoTiffWriter.java:526)
>          at
> org.geotools.gce.geotiff.GeoTiffWriter.writeImage(GeoTiffWriter.java:435)
>          at
> org.geotools.gce.geotiff.GeoTiffWriter.write(GeoTiffWriter.java:261)
>          at
> org.n52.wps.server.algorithm.FBK.Bampi_Prove.run(Bampi_Prove.java:115)
>          at
> org.n52.wps.server.request.ExecuteRequest.call(ExecuteRequest.java:606)
>          at org.n52.wps.server.request.Request.call(Request.java:1)
>          at
> java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
>          at java.util.concurrent.FutureTask.run(FutureTask.java:138)
>          at
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
>          at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
>          at java.lang.Thread.run(Thread.java:662)
> Caused by: org.jdom.JDOMException: Exception outputting Document:
> Reflection failed while creating new JAXP document: Class
> org.jdom.adapters.JAXPDOMAdapter can not access a member of class
> gnu.xml.dom.JAXPFactory$JAXPBuilder with modifiers "public"
>          at org.jdom.output.DOMOutputter.output(DOMOutputter.java:175)
>          at
> org.geotools.gce.geotiff.GeoTiffWriter.createGeoTiffIIOMetadata(GeoTiffWriter.java:519)
>          ... 10 more
> Caused by: org.jdom.JDOMException: Reflection failed while creating new
> JAXP document: Class org.jdom.adapters.JAXPDOMAdapter can not access a
> member of class gnu.xml.dom.JAXPFactory$JAXPBuilder with modifiers "public"
>          at
> org.jdom.adapters.JAXPDOMAdapter.createDocument(JAXPDOMAdapter.java:191)
>          at
> org.jdom.adapters.AbstractDOMAdapter.createDocument(AbstractDOMAdapter.java:130)
>          at
> org.jdom.output.DOMOutputter.createDOMDocument(DOMOutputter.java:208)
>          at org.jdom.output.DOMOutputter.output(DOMOutputter.java:127)
>          ... 11 more
> Caused by: java.lang.IllegalAccessException: Class
> org.jdom.adapters.JAXPDOMAdapter can not access a member of class
> gnu.xml.dom.JAXPFactory$JAXPBuilder with modifiers "public"
>          at sun.reflect.Reflection.ensureMemberAccess(Reflection.java:65)
>          at java.lang.reflect.Method.invoke(Method.java:588)
>          at
> org.jdom.adapters.JAXPDOMAdapter.createDocument(JAXPDOMAdapter.java:187)
>          ... 14 more
>
> Can you help me on fixing this issue?
>
>
> Thanks a lot, kind regards,
>
> Calogero Zarbo
>
> FBK - Fondazione Bruno Kessler
> Center for Information Technology
> Mpba - Predictive Models for Biomedicine & Environment
> Via Sommarive, 18- 38123 Povo (Trento) IT
> e-mail: [email protected]
> <https://webmail.fbk.eu/owa/redir.aspx?C=6ce264603c424a6cae0d1b4004cd8122&URL=https%3a%2f%2fwebmail.fbk.eu%2fowa%2fredir.aspx%3fC%3d648442797b254191ab144726f9a535e7%26URL%3dmailto%253Adefilippi%2540fbk.eu>
> phone: +39 0461 314 674
>

-- 
Ben Caradoc-Davies <[email protected]>
Software Engineer
CSIRO Earth Science and Resource Engineering
Australian Resources Research Centre

------------------------------------------------------------------------------
LogMeIn Central: Instant, anywhere, Remote PC access and management.
Stay in control, update software, and manage PCs from one command center
Diagnose problems and improve visibility into emerging IT issues
Automate, monitor and manage. Do more in less time with Central
http://p.sf.net/sfu/logmein12331_d2d
_______________________________________________
GeoTools-GT2-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to