IBM Support

PH34197: ICU4J ILLEGALARGUMENTEXCEPTION ON DEC 31 OF A LEAP YEAR

Subscribe to this APAR

By subscribing, you receive periodic emails alerting you to the status of the APAR, along with a link to the fix after it becomes available. You can track this item individually or track all items by product.

Notify me when this APAR changes.

Notify me when an APAR for this component changes.

 

APAR status

  • Closed as program error.

Error description

  • An application using the ICU4J library included with WebSphere
    Application Server might encounter the following error on Dec
    31 of a leap year.
    
    Error:
    ====
    Caused by:
    java.lang.IllegalArgumentException: DAY_OF_YEAR=366,
    valid
    range=1..365
    at
    com.ibm.icu.util.Calendar.validateField(Calendar.java:4733)
    at
    com.ibm.icu.util.Calendar.validateField(Calendar.java:4708)
    at
    com.ibm.icu.util.Calendar.validateFields(Calendar.java:4686)
    at
    com.ibm.icu.util.Calendar.computeTime(Calendar.java:4746)
    at
    com.ibm.icu.util.Calendar.updateTime(Calendar.java:4276)
    at
    com.ibm.icu.util.Calendar.getTimeInMillis(Calendar.java:1979)
    at
    com.ibm.icu.util.Calendar.getTime(Calendar.java:1957)
    

Local fix

  • Customers intended to use ICU4J with their application are
    recomended to use their own copy of the jar from open source
    and pacakage with application or confgure isolated shared
    library and place the ICU4J jars in the shared library.
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED:  All users of IBM WebSphere Application      *
    *                  Server v8.5.5 who have an application which *
    *                  uses ICU4J and uses class-loader mode       *
    *                  parent first                                *
    ****************************************************************
    * PROBLEM DESCRIPTION: On Dec 31 of a leap year, the ICU4J     *
    *                      method, Calendar.getTime(), might       *
    *                      return IllegalArgumentException         *
    ****************************************************************
    * RECOMMENDATION:  Any application needing to use ICU4J        *
    *                  should include the ICU4J library with       *
    *                  the application at the version required by  *
    *                  the application.  If for some reason you    *
    *                  need to use class-loader mode parent        *
    *                  first, your ICU4J library should be set as  *
    *                  an isolated shared library. This will       *
    *                  avoid inadvertently using the ICU4J         *
    *                  library included with WebSphere             *
    *                  Application Server.                         *
    *                  To learn more about isolated shared         *
    *                  libraries see                               *
    *                  http://ibmurl.hursley.ibm.com/OXUJ          *
    ****************************************************************
    Improper validation of dates was performed in ICU4J
    versions prior to 4.8.2, but only on December 31 of a leap
    year.
    This does not affect any known functions in WebSphere
    Application Server.  However, an application using the
    com.ibm.icu.jar which is included in WebSphere Application
    Server v8.5.5 might encounter the problem.
    

Problem conclusion

  • The problem is resolved in ICU4J v4.8.2 by ticket ICU-7089 (ICU
    Calendar produces incorrect result after heavy use).  See
    https://unicode-org.atlassian.net/browse/ICU-7089
    
    The problem, as reported to ICU4J, was not related to leap
    year.  However, the leap year problem was fixed as a side
    effect.
    
    The ICU4J library included with WebSphere Application Server
    v8.5.5, com.ibm.icu.jar v4.4.2, now includes the fix.
    
    WebSphere Application Server version 9.0 is not affected as it
    includes ICU4J 54.1 which already includes the fix.
    
    The fix for this APAR is targeted for inclusion in fix pack
    8.5.5.20. For more information, see 'Recommended Updates for
    WebSphere Application Server':
    https://www.ibm.com/support/pages/node/715553
    

Temporary fix

Comments

APAR Information

  • APAR number

    PH34197

  • Reported component name

    WEBS APP SERV N

  • Reported component ID

    5724H8800

  • Reported release

    850

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2021-02-04

  • Closed date

    2021-04-07

  • Last modified date

    2021-04-07

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

Fix information

  • Fixed component name

    WEBS APP SERV N

  • Fixed component ID

    5724H8800

Applicable component levels

  • R850 PSY

       UP

[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSEQTP","label":"WebSphere Application Server"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"8.5","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
01 November 2021