[Geoserver-devel] [JIRA] (GEOS-9702) icu4j 3.4.4 does not support Java runtimes with Patch number > 255

Pierre Mauduit created an issue

GeoServer / BugGEOS-9702

icu4j 3.4.4 does not support Java runtimes with Patch number > 255

Issue Type:

BugBug

Affects Versions:

2.17.0

Assignee:

Unassigned

Components:

web-app

Created:

20/Jul/20 12:05 PM

Priority:

MediumMedium

Reporter:

Pierre Mauduit

Encountered with last jetty:9-jre8 docker image with a GeoServer 2.17:

2020-07-20 09:15:23.577:WARN:oejw.WebAppContext:main: Failed startup of context o.e.j.w.WebAppContext@anonymised.com{GeoServer,/geoserver,file:///var/lib/jetty/webapps/geoserver/,UNAVAILABLE}{/var/lib/jetty/webapps/geoserver}
org.springframework.beans.factory.BeanCreationException: Error occured reading security configuration; nested exception is java.lang.RuntimeException: org.jasypt.exceptions.EncryptionInitializationException: java.lang.NoClassDefFoundError: Could not initialize class com.ibm.icu.impl.ICUDebug
	at org.geoserver.security.GeoServerSecurityManager.reload(GeoServerSecurityManager.java:432)
[...]
Caused by: 
java.lang.RuntimeException: org.jasypt.exceptions.EncryptionInitializationException: java.lang.NoClassDefFoundError: Could not initialize class com.ibm.icu.impl.ICUDebug
	at org.geoserver.security.GeoServerSecurityManager.getMasterPassword(GeoServerSecurityManager.java:1765)
[...]
Caused by: 
org.jasypt.exceptions.EncryptionInitializationException: java.lang.NoClassDefFoundError: Could not initialize class com.ibm.icu.impl.ICUDebug
	at org.jasypt.encryption.pbe.StandardPBEByteEncryptor.initialize(StandardPBEByteEncryptor.java:716)
Caused by: 
java.lang.NoClassDefFoundError: Could not initialize class com.ibm.icu.impl.ICUDebug
	at com.ibm.icu.impl.NormalizerDataReader.<clinit>(NormalizerDataReader.java:300)

Using the following Java class indeed fails:

% cat TestClass.java
class TestClass {

    public static void main(String[] args) {
        try {
          Class.forName("com.ibm.icu.impl.ICUDebug");
          System.out.println("it works");
        } catch (ClassNotFoundException e) {
          System.err.println("Class not found");
        }
    }

}

% java -cp /var/lib/jetty/webapps/geoserver/WEB-INF/lib/icu4j-3.4.4.jar:. TestClass
Exception in thread "main" java.lang.ExceptionInInitializerError
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Class.java:264)
	at TestClass.main(TestClass.java:6)
Caused by: java.lang.IllegalArgumentException: Invalid version number: Version number may be negative or greater than 255
	at com.ibm.icu.util.VersionInfo.getInstance(VersionInfo.java:188)
	at com.ibm.icu.impl.ICUDebug.getInstanceLenient(ICUDebug.java:65)
	at com.ibm.icu.impl.ICUDebug.<clinit>(ICUDebug.java:69)
	... 3 more

Here is the Java version used:

% java -version
openjdk version "1.8.0_262"
OpenJDK Runtime Environment (build 1.8.0_262-b10)
OpenJDK 64-Bit Server VM (build 25.262-b10, mixed mode)

Here is a redhat (requires to log in) related issue: https://access.redhat.com/solutions/5026361 which recommends to downgrade to a build < 255.

Launching the same code snippet on a previous version of the Java runtime works:

% java -cp /var/lib/jetty/webapps/geoserver/WEB-INF/lib/icu4j-3.4.4.jar:. TestClass
it works
% java -version
openjdk version "1.8.0_252"
OpenJDK Runtime Environment (build 1.8.0_252-b09)
OpenJDK 64-Bit Server VM (build 25.252-b09, mixed mode)

Add Comment

Add Comment

Get Jira notifications on your phone! Download the Jira Cloud app for Android or iOS


This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100133-sha1:8ba02c9)

Atlassian logo