Opened 3 weeks ago
Last modified 3 weeks ago
#24964 new defect
[GeoTools Plugin] NullPointerException of GeoTiffReader() due to missing JAXB dependency
| Reported by: | hhtznr | Owned by: | team |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Plugin geotools | Version: | |
| Keywords: | Cc: |
Description (last modified by )
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.
Attachments (0)
Change History (2)
comment:1 by , 3 weeks ago
| Description: | modified (diff) |
|---|



It looks like GeoTools catches this exception internally and only prints the stack trace. Otherwise, JOSM should go into plugin exception handling mode. This does not happen. Yet, when inspecting a number of GeoTIFF files, a lot of these stack traces appear on the console.