It looks like you are missing JAXB-API? This was included as part of the Java Enterprise Edition API, but in really new versions of sprint I believe that will be replaced with Jakarta EE Binding.
You will need to hang back at sprint 5.3 until such time as we can modernize. - - Jody Garnett On Oct 2, 2024 at 1:04:53 AM, rafaelpra...@sapo.pt wrote: > 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 >
_______________________________________________ GeoTools-GT2-Users mailing list GeoTools-GT2-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users