Hello!

First of all, thank you for GeoTools!

I have an issue with reading geotiff files in a Spring application. The app I am developing requires geotiff files to be read and for samples to be read at certain coordinates.

As of now, I am able to load a geotiff file with the GeoTiffReader and sample the position of interest using the GridCoverage. This works in a stand alone environment.

When I ported the same code to the app using Spring, the GeoTiffReader throws an exception while reading the geotiff file's metadata due to the CONTEXT in the PAMParser class being null.

After increasing the log level, the problem seems to start on the class initialisation. The JAXBContext fails to create a new instance of "it.geosolutions.imageio.pam" and throws the following exception:

PM javax.xml.bind.ContextFinder find

FINE: Trying to create the platform default provider

it.geosolutions.imageio.pam.PAMParser <clinit>

FINER: Implementation of JAXB-API has not been found on module path or classpath.

_javax.xml.bind.JAXBException_: Implementation of JAXB-API has not been found on module path or classpath.

- with linked exception:

[_java.lang.ClassNotFoundException_: com.sun.xml.bind.v2.ContextFactory]

at javax.xml.bind.ContextFinder.newInstance(_ContextFinder.java:168_)

at javax.xml.bind.ContextFinder.find(_ContextFinder.java:355_)

at javax.xml.bind.JAXBContext.newInstance(_JAXBContext.java:508_)

at javax.xml.bind.JAXBContext.newInstance(_JAXBContext.java:465_)

at javax.xml.bind.JAXBContext.newInstance(_JAXBContext.java:366_)

at it.geosolutions.imageio.pam.PAMParser.<clinit>(_PAMParser.java:41_)

at org.geotools.coverage.grid.io.AbstractGridCoverage2DReader.getPamDataset(_AbstractGridCoverage2DReader.java:1373_)

at org.geotools.gce.geotiff.GeoTiffReader.getHRInfo(_GeoTiffReader.java:391_)

at org.geotools.gce.geotiff.GeoTiffReader.<init>(_GeoTiffReader.java:275_)

at org.geotools.gce.geotiff.GeoTiffReader.<init>(_GeoTiffReader.java:199_)

I could not find the same issue or any info about this anywhere. It is still possible to query the GridCoverages created from these files, however no metadata is read.

Any help would be appreciated, thank you.
_______________________________________________
GeoTools-GT2-Users mailing list
GeoTools-GT2-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to