IBM Support

IV71566: NULLPOINTEREXCEPTION THROWN INSTEAD OF EXCEPTIONININITIALIZERERR OR

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • Error Message: NullPointerException thrown instead of
    ExceptionInInitializerError if a user created
    ExceptionInInitializerError(String s) is thrown from a static
    block initializer
    .
    Stack Trace: Exception in thread "main"
    java.lang.NullPointerExceptionat java.lang.J9VMInternals$1.runat
    java.security.AccessController.doPrivilegedat
    java.lang.J9VMInternals.cloneThrowableat
    java.lang.J9VMInternals.copyThrowableat
    java.lang.J9VMInternals.copyThrowableat
    java.lang.J9VMInternals.recordInitializationFailure
    .
    

Local fix

  • Instead of usingthrow new ExceptionInInitializerError("Exception
    message here");You can use the below snippets of code to get
    required exception.Throwable exception = new
    Throwable("Exception message here");throw new
    ExceptionInInitializerError(exception);
    

Problem summary

  • The problem is caused when a user created
    ExceptionInInitializerError without an initialized cause is
    thrown inside a static initializer.
    

Problem conclusion

  • The JVM has been updated to correctly throw
    ExceptionInInitializerError instead of NullPointerException
    .
    This APAR will be fixed in the following Java Releases:
       7 R1 SR3       (7.1.3.0)
       8    SR1       (8.0.1.0)
    .
    Contact your IBM Product's Service Team for these Service
    Refreshes and Fix Packs.
    For those running stand-alone, information about the Service
    Refreshes and Fix Packs can be found at:
               https://www.ibm.com/developerworks/java/jdk/
    

Temporary fix

Comments

APAR Information

  • APAR number

    IV71566

  • Reported component name

    J9 COMMON CODE

  • Reported component ID

    620700127

  • Reported release

    270

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2015-03-27

  • Closed date

    2015-03-27

  • Last modified date

    2015-03-27

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

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

    IV71567

Fix information

  • Fixed component name

    J9 COMMON CODE

  • Fixed component ID

    620700127

Applicable component levels

  • R270 PSY

       UP

[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSNVBF","label":"Runtimes for Java Technology"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"7.0","Line of Business":{"code":"LOB36","label":"IBM Automation"}}]

Document Information

Modified date:
21 February 2022