IBM Support

IV53596: CLASS.GETENCLOSINGMETHOD() AND CLASS.GETENCLOSINGCONSTRUCTOR() INCORRECTLY CHECK PACKAGE ACCESS

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • ERROR MESSAGE
    Application incorrectly throws
    java.security.AccessControlException, and indicates that package
    access permission is denied.
    e.g.
    java.security.AccessControlException: Access denied
    ("java.lang.RuntimePermission" "accessClassInPackage.sun.pkg")
    
    STACK TRACE
    java.security.AccessControlException: Access denied
    ("java.lang.RuntimePermission" "accessClassInPackage.sun.pkg")
     at
    java.security.AccessController.throwACE(AccessController.java:10
    0)
     at
    java.security.AccessController.checkPermission(AccessController.
    java:174)
     at
    java.lang.SecurityManager.checkPermission(SecurityManager.java:5
    51)
     at
    java.lang.SecurityManager.checkPackageAccess(SecurityManager.jav
    a:1609)
     at
    sun.reflect.misc.ReflectUtil.checkPackageAccess(ReflectUtil.java
    :188)
     at
    sun.reflect.misc.ReflectUtil.checkPackageAccess(ReflectUtil.java
    :164)
     at java.lang.Class.getEnclosingMethod(Class.java:2214)
     at
    sun.reflect.generics.scope.ClassScope.computeEnclosingScope(Clas
    sScope.java:50)
     at
    sun.reflect.generics.scope.AbstractScope.getEnclosingScope(Abstr
    actScope.java:74)
     at
    sun.reflect.generics.scope.AbstractScope.lookup(AbstractScope.ja
    va:90)
     at
    sun.reflect.generics.factory.CoreReflectionFactory.findTypeVaria
    ble(CoreReflectionFactory.java:110)
     at
    sun.reflect.generics.visitor.Reifier.visitTypeVariableSignature(
    Reifier.java:165)
     at
    sun.reflect.generics.tree.TypeVariableSignature.accept(TypeVaria
    bleSignature.java:43)
     at
    sun.reflect.generics.visitor.Reifier.reifyTypeArguments(Reifier.
    java:68)
     at
    sun.reflect.generics.visitor.Reifier.visitClassTypeSignature(Rei
    fier.java:138)
     at
    sun.reflect.generics.tree.ClassTypeSignature.accept(ClassTypeSig
    nature.java:49)
     at
    sun.reflect.generics.repository.ClassRepository.getSuperclass(Cl
    assRepository.java:84)
     at java.lang.Class.getGenericSuperclass(Class.java:2166)
    

Local fix

Problem summary

  • The problem was caused by unnecessary package access checks
    within java.lang.Class.getEnclosingMethod() and
    Class.getEnclosingConstructor().
    

Problem conclusion

  • This APAR will be fixed in the following Java Releases:
       7    SR6 FP1   (7.0.6.1)
       5.0  SR16 FP5  (5.0.16.5)
       6    SR15 FP1  (6.0.15.1)
       6 R1 SR7 FP1   (6.1.7.1)
       7 R1 SR1       (7.1.1.0)
    .
    The JVM has been updated to remove unnecessary package access
    checks.
    

Temporary fix

Comments

APAR Information

  • APAR number

    IV53596

  • Reported component name

    J9 COMMON CODE

  • Reported component ID

    620700127

  • Reported release

    260

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2013-12-30

  • Closed date

    2014-01-07

  • Last modified date

    2014-01-07

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

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

    IV53597

Fix information

  • Fixed component name

    J9 COMMON CODE

  • Fixed component ID

    620700127

Applicable component levels

  • R260 PSY

       UP

  • R270 PSY

       UP

  • R600 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":"6.1","Line of Business":{"code":"LOB36","label":"IBM Automation"}}]

Document Information

Modified date:
22 February 2022