IZ94639: A JAVA.LANG.CLASSCASTEXCEPTION HAPPENS WITH A PROXY CLASS GENERA TED BY METHOD NEWPROXYINSTANCE() OF CLASS JAVA.LANG.REFLECT.PROX

Subscribe

You can track all active APARs for this component.

APAR status

  • Closed as program error.

Error description

  • Error Message: An error message similar to the following is
    received:
    
       Caused by: java.lang.ClassCastException: $Proxy6 incompatible
    with <SOME_INTERFACE>
    .
    Stack Trace: N/A
    .
    

Local fix

  • This issue can be worked around by disabling the share classes
    cache with the following option:
            -Xshareclasses:none
    

Problem summary

  • When a proxy object is generated through the following method in
    java.lang.reflect.Proxy,
       newProxyInstance(ClassLoader loader, Class<?><OSB><CSB>
    interfaces, InvocationHandler h)
      the proxy class (for example $Proxy6) will be generated and
    improperly cached into the share classes cache.  After
      the JVM is restarted, the proxy class ($Proxy6) will be loaded
    from the share classes cache to JVM runtime. It would cause a
      java.lang.ClassCastException if the same proxy class ($Proxy6)
    is cast to some other interface.
    

Problem conclusion

  • The JVM has been updated to prevent the improper caching
    information into the share classes cache.
    
    This defect will be fixed in:
    5.0.0 SR12 FP4
    5.0.0 SR13
    6.0.0 SR10
    

Temporary fix

Comments

APAR Information

  • APAR number

    IZ94639

  • Reported component name

    JAVA 5 J9 COMMO

  • Reported component ID

    620500127

  • Reported release

    500

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2011-02-11

  • Closed date

    2011-10-28

  • Last modified date

    2011-10-28

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

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

    IV43478

Fix information

  • Fixed component name

    JAVA 5 J9 COMMO

  • Fixed component ID

    620500127

Applicable component levels

  • R500 PSY

       UP



Rate this page:

(0 users)Average rating

Add comments

Document information


More support for:

Runtimes for Java Technology
Virtual Machine

Software version:

5.0

Reference #:

IZ94639

Modified date:

2011-10-28

Translate my page

Machine Translation

Content navigation