docker
docker copied to clipboard
Use jdk17 for 2.x builds
Currently the 2.28.x image has Java 11, which causes the webapp to fail to deploy because GeoServer 2.28.x requires Java 17.
$ docker pull docker.osgeo.org/geoserver:2.28.x
2.28.x: Pulling from geoserver
Digest: sha256:687b2d8402cbbccf375a485a8df9c6ef4c45cc320edba8b0c92f0e0173b6275f
Status: Image is up to date for docker.osgeo.org/geoserver:2.28.x
docker.osgeo.org/geoserver:2.28.x
$ docker run --rm -it --entrypoint "" docker.osgeo.org/geoserver:2.28.x java -version
openjdk version "11.0.28" 2025-07-15
OpenJDK Runtime Environment Temurin-11.0.28+6 (build 11.0.28+6)
OpenJDK 64-Bit Server VM Temurin-11.0.28+6 (build 11.0.28+6, mixed mode, sharing)
$ GSID=$(docker run -d --name gs-2-28-x-test docker.osgeo.org/geoserver:2.28.x)
$ docker exec $GSID grep UnsupportedClassVersionError /usr/local/tomcat/logs
grep: /usr/local/tomcat/logs: Is a directory
$ docker exec $GSID grep -R UnsupportedClassVersionError /usr/local/tomcat/logs
/usr/local/tomcat/logs/localhost.2025-11-03.log: java.lang.UnsupportedClassVersionError: org/geoserver/GeoserverInitStartupListener has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 55.0 (unable to load class [org.geoserver.GeoserverInitStartupListener])
/usr/local/tomcat/logs/localhost.2025-11-03.log: java.lang.UnsupportedClassVersionError: org/geoserver/logging/LoggingStartupContextListener has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 55.0 (unable to load class [org.geoserver.logging.LoggingStartupContextListener])
/usr/local/tomcat/logs/localhost.2025-11-03.log: java.lang.UnsupportedClassVersionError: org/geoserver/platform/GeoServerContextLoaderListener has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 55.0 (unable to load class [org.geoserver.platform.GeoServerContextLoaderListener])
/usr/local/tomcat/logs/localhost.2025-11-03.log: java.lang.UnsupportedClassVersionError: org/geoserver/platform/GeoServerHttpSessionListenerProxy has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 55.0 (unable to load class [org.geoserver.platform.GeoServerHttpSessionListenerProxy])