Opened 3 days ago

Last modified 45 hours ago

#24964 new defect

[GeoTools Plugin] NullPointerException of GeoTiffReader() due to missing JAXB dependency — at Version 1

Reported by: hhtznr Owned by: team
Priority: normal Milestone:
Component: Plugin geotools Version:
Keywords: Cc:

Description (last modified by hhtznr)

If an aux.xml file is present for a GeoTIFF image (e.g. QGIS invoking GDAL creates the aux.xml) to be read using GeoTiffReader(File) from geotiff Plugin (version: 36483), the following exception is thrown:

2026-10-20 20:45:00.034 INFO: GDAL aux.xml metadata file could not be parsed
java.lang.NullPointerException: Cannot invoke "javax.xml.bind.JAXBContext.createUnmarshaller()" because "it.geosolutions.imageio.pam.PAMParser.CONTEXT" is null
	at it.geosolutions.imageio.pam.PAMParser.unmarshal(PAMParser.java:73)
	at it.geosolutions.imageio.pam.PAMParser.parsePAM(PAMParser.java:55)
	at org.geotools.coverage.grid.io.AbstractGridCoverage2DReader.getPamDataset(AbstractGridCoverage2DReader.java:1376)
	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)
        at [...]

This might be caused by Java > 8 no longer providing JAXB.

Note: Newer GeoTools versions would no longer use JAXB, but Jakarta.

GeoTools 35.x has upgraded from JavaEE to JakartaEE reflecting the transition of this technology from Oracle to the Eclipse Foundation.

from ​Upgrade - GeoTools 35.x User Guide

Change History (1)

comment:1 by hhtznr, 3 days ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.