Hi Team,
I have a query related to this issue
“java.lang.IllegalArgumentException: Invalid version number: Version number may be negative or greater than 255"
Let me brief you few analysis part
As currently we are using "com.ibm.icu_3.6.1.v20070906.jar" jar in our project.
This jar is getting used in reporting tool(Birt report) of our product.
In recent months we upgraded our product java to 8.0.6.15 version but our reporting tool throws this error
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:194)
at com.ibm.icu.impl.ICUDebug.getInstanceLenient(ICUDebug.java:65)
At previous , I approached icu-support with short analysis over this issue.
we got response at that time i.e "this issue fixed in icu4j.jar(of version 68).So you can use this version of jar".
Later we analysed more and test , found we are using "com.ibm.icu_3.6.1.v20070906.jar" in the reporting tool not icu4j.jar.
Further we upgarded our java version to 8.0.6.20,8.0.6.25 & 8.0.6.30. Finally we are using java 8.0.6.30 now. And still our birt repoting tool throwing the same error which we got on 8.0.6.15 version of java.
Although the error was in Birt module so I checked with Eclipse support who managed this Birt project. But they directed me that this is an ICU4J issue.
As we analysed deeply the issue and found the source of exception is from versionInfo.class. We know there is a check placed in versionInfo.class to check the minor/macro version of java and it hardcoded as 255.
But java version start from 8.0.6.15(261) exceeding the limit of 255.It is the main source of issue.
As downgrading java version 8.0.6.10 also works here to solve this issue , but it is not good approach.
For testing scenario , we modified the code of versionInfo.java and replace the 255 check to some higher version such as 301 or 311.
And our testing results show no error afterwards.
As per your old communication i.e this issue fixed in 68 version of icu4j.jar
I tried to find out the references ,
https://unicode-org.atlassian.net/browse/ICU-21295
unicode-org/icu#1245
https://unicode-org.atlassian.net/browse/ICU-21219
https://github.com/unicode-org/icu/blob/main/icu4j/main/classes/core/src/com/ibm/icu/util/VersionInfo.java#L294
I also found one link of github which having code commits indicating the fix.
unicode-org/icu@ab08fac
At next , part of testing area we also did the same change in VersionInfo.class(com.ibm.icu_3.6.1.v20070906.jar) as provided in above link of code commit to resolve this issue.
But we found same issue occured in this testing.
This is our main concern/query
we are using this jar com.ibm.icu_3.6.1.v20070906.jar, I believe in order to fix this issue we have to place new jar of com.ibm.icu*.
*Is this code commit sufficient to resolve this issue? or any other code changes is required? as in our env this change not worked.
unicode-org/icu@ab08fac
In which version of com.ibm.icu this issue got fixed?
How we can get the fixed jar of com.ibm.icu version?
Icu4j jar of version 68/69 got release which including the fix of this issue(as communicated).
I did not found any reference which showing the release of these jars com.ibm.icu , Can you please let us aware who is responsible for the release of newer version com.ibm.icu* jars.
Kindly let us know.
Please help us to resolve this issue, we are blocked due to it.
Thanks