Opened 5 days ago

Last modified 4 days ago

#24964 new defect

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

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

Description

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, 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 (0)

Note: See TracTickets for help on using tickets.