Index: applications/editors/josm/plugins/geotools/src/org/openstreetmap/josm/plugins/geotools/GeoToolsPlugin.java
===================================================================
--- applications/editors/josm/plugins/geotools/src/org/openstreetmap/josm/plugins/geotools/GeoToolsPlugin.java	(revision 34097)
+++ applications/editors/josm/plugins/geotools/src/org/openstreetmap/josm/plugins/geotools/GeoToolsPlugin.java	(revision 36015)
@@ -12,4 +12,5 @@
 import javax.media.jai.OperationRegistry;
 
+import it.geosolutions.imageio.compression.CompressionRegistry;
 import org.geotools.image.ImageWorker;
 import org.geotools.referencing.CRS;
@@ -38,5 +39,5 @@
     }
 
-    private void initJAI() {
+    private static void initJAI() {
         // Disable mediaLib searching that produces unwanted errors
         // See https://www.java.net/node/666373
@@ -50,5 +51,5 @@
         // As the JAI jars are bundled in the geotools plugin, JAI initialization does not work,
         // so we need to perform the tasks described here ("Initialization and automatic loading of registry objects"):
-        // https://docs.oracle.com//cd/E17802_01/products/products/java-media/jai/forDevelopers/jai-apidocs/javax/media/jai/OperationRegistry.html
+        // https://docs.oracle.com/cd/E17802_01/products/products/java-media/jai/forDevelopers/jai-apidocs/javax/media/jai/OperationRegistry.html
         OperationRegistry registry = JAI.getDefaultInstance().getOperationRegistry();
         if (registry == null) {
@@ -92,11 +93,13 @@
     }
 
-    private void initGeoTools() {
+    private static void initGeoTools() {
         // Force Axis order. Fix #8248
         // See http://docs.geotools.org/stable/userguide/library/referencing/order.html
         System.setProperty("org.geotools.referencing.forceXY", "true");
+        // Force registration of compression. Fix #22303.
+        CompressionRegistry.getDefaultInstance().registerApplicationClasspathSpis();
     }
 
-    private void checkEPSG() {
+    private static void checkEPSG() {
         try {
             CRS.decode("EPSG:4326");
