IBM Support

PI63571: AccessControlException: "accessDeclaredMembers" from com.ibm.wsspi.injectionengine.MethodMap.getMethods.

Fixes are available

16.0.0.3: WebSphere Application Server Liberty 16.0.0.3
16.0.0.4: WebSphere Application Server Liberty 16.0.0.4
17.0.0.1: WebSphere Application Server Liberty 17.0.0.1
17.0.0.2: WebSphere Application Server Liberty 17.0.0.2
17.0.0.3: WebSphere Application Server Liberty 17.0.0.3
17.0.0.4: WebSphere Application Server Liberty 17.0.0.4
18.0.0.1: WebSphere Application Server Liberty 18.0.0.1
18.0.0.2: WebSphere Application Server Liberty 18.0.0.2
18.0.0.3: WebSphere Application Server Liberty 18.0.0.3
18.0.0.4: WebSphere Application Server Liberty 18.0.0.4
19.0.0.1: WebSphere Application Server Liberty 19.0.0.1
19.0.0.2: WebSphere Application Server Liberty 19.0.0.2
19.0.0.3: WebSphere Application Server Liberty 19.0.0.3
19.0.0.4: WebSphere Application Server Liberty 19.0.0.4
19.0.0.5: WebSphere Application Server Liberty 19.0.0.5
19.0.0.6: WebSphere Application Server Liberty 19.0.0.6
19.0.0.7: WebSphere Application Server Liberty 19.0.0.7
19.0.0.8: WebSphere Application Server Liberty 19.0.0.8
19.0.0.9: WebSphere Application Server Liberty 19.0.0.9
19.0.0.10: WebSphere Application Server Liberty 19.0.0.10
19.0.0.11: WebSphere Application Server Liberty 19.0.0.11
19.0.0.12: WebSphere Application Server Liberty 19.0.0.12
20.0.0.1: WebSphere Application Server Liberty 20.0.0.1
20.0.0.2: WebSphere Application Server Liberty 20.0.0.2
20.0.0.3: WebSphere Application Server Liberty 20.0.0.3
20.0.0.4: WebSphere Application Server Liberty 20.0.0.4
20.0.0.5: WebSphere Application Server Liberty 20.0.0.5
20.0.0.6: WebSphere Application Server Liberty 20.0.0.6
20.0.0.7: WebSphere Application Server Liberty 20.0.0.7
20.0.0.8: WebSphere Application Server Liberty 20.0.0.8
20.0.0.9: WebSphere Application Server Liberty 20.0.0.9
20.0.0.10: WebSphere Application Server Liberty 20.0.0.10
20.0.0.11: WebSphere Application Server Liberty 20.0.0.11
20.0.0.12: WebSphere Application Server Liberty 20.0.0.12
21.0.0.3: WebSphere Application Server Liberty 21.0.0.3
21.0.0.4: WebSphere Application Server Liberty 21.0.0.4
21.0.0.5: WebSphere Application Server Liberty 21.0.0.5
21.0.0.6: WebSphere Application Server Liberty 21.0.0.6
21.0.0.7: WebSphere Application Server Liberty 21.0.0.7
21.0.0.8: WebSphere Application Server Liberty 21.0.0.8
21.0.0.9: WebSphere Application Server Liberty 21.0.0.9
21.0.0.1: WebSphere Application Server Liberty 21.0.0.1
21.0.0.2: WebSphere Application Server Liberty 21.0.0.2
21.0.0.10: WebSphere Application Server Liberty 21.0.0.10
21.0.0.11: WebSphere Application Server Liberty 21.0.0.11
21.0.0.12: WebSphere Application Server Liberty 21.0.0.12
22.0.0.1: WebSphere Application Server Liberty 22.0.0.1
22.0.0.2: WebSphere Application Server Liberty 22.0.0.2
22.0.0.3: WebSphere Application Server Liberty 22.0.0.3
22.0.0.4: WebSphere Application Server Liberty 22.0.0.4

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • When Java 2 security is enabled, the following error may
    occur when initializing a servlet defined with resource
    injection:
    
    java.security.AccessControlException: Access denied
    ("java.lang.RuntimePermission" "accessDeclaredMembers")
    at
    java.security.AccessController.throwACE(AccessController.jav
    a:157)
    at
    java.security.AccessController.checkPermissionHelper(AccessC
    ontroller.java:217)
    at
    java.security.AccessController.checkPermission(AccessControl
    ler.java:349)
    at
    java.lang.SecurityManager.checkPermission(SecurityManager.ja
    va:562)
    at
    com.ibm.ws.security.core.SecurityManager.checkPermission(Sec
    urityManager.java:208)
    at java.lang.Class.checkMemberAccess(Class.java:200)
    at java.lang.Class.getDeclaredMethods(Class.java:992)
    at
    com.ibm.wsspi.injectionengine.MethodMap.getMethods(MethodMap
    .java:150)
    at
    com.ibm.wsspi.injectionengine.MethodMap.getAllNonPrivateMeth
    ods(MethodMap.java:108)
    at
    com.ibm.ws.injectionengine.AbstractInjectionEngine.getInject
    ionTargets(AbstractInjectionEngine.java:756)
    at
    com.ibm.ws.injectionengine.ReferenceContextImpl.getInjection
    Targets(ReferenceContextImpl.java:1095)
    at
    com.ibm.ws.cdi.impl.managedobject.AbstractManagedObjectFacto
    ry.performInjection(AbstractManagedObjectFactory.java:248)
    at
    com.ibm.ws.cdi.impl.managedobject.AbstractManagedObjectFacto
    ry.injectAndPostConstruct(AbstractManagedObjectFactory.java:
    238)
    at
    com.ibm.ws.cdi.impl.managedobject.AbstractManagedObjectFacto
    ry.createManagedObject(AbstractManagedObjectFactory.java:221
    )
    at
    com.ibm.ws.cdi.impl.managedobject.CDIManagedObjectFactoryImp
    l.createManagedObject(CDIManagedObjectFactoryImpl.java:60)
    at
    com.ibm.ws.webcontainer.webapp.WebAppImpl.createManagedObjec
    t(WebAppImpl.java:1916)
    at
    com.ibm.ws.webcontainer.webapp.WebAppImpl.inject(WebAppImpl.
    java:1848)
    at
    com.ibm.ws.webcontainer.webapp.WebApp.inject(WebApp.java:596
    8)
    at
    com.ibm.ws.webcontainer.webapp.WebApp.createAsyncListener(We
    bApp.java:5897)
    at
    com.ibm.ws.webcontainer.async.AsyncContextImpl.createListene
    r(AsyncContextImpl.java:621)
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED:  All users of IBM WebSphere Application      *
    *                  Server Liberty - Java EE Resource and       *
    *                  Dependency Injection                        *
    ****************************************************************
    * PROBLEM DESCRIPTION: AccessControlException:                 *
    *                      "accessDeclaredMembers" from            *
    *                      com.ibm.wsspi.injectionengine.MethodMap *
    *                      .getMethods.                            *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    When Java 2 security is enabled, the following error may occur
    when initializing a servlet defined with resource injection:
    
    java.security.AccessControlException: Access denied
    ("java.lang.RuntimePermission" "accessDeclaredMembers")
    at
    java.security.AccessController.throwACE(AccessController.java:15
    7)
    at
    java.security.AccessController.checkPermissionHelper(AccessContr
    oller.java:217)
    at
    java.security.AccessController.checkPermission(AccessController.
    java:349)
    at
    java.lang.SecurityManager.checkPermission(SecurityManager.java:5
    62)
    at
    com.ibm.ws.security.core.SecurityManager.checkPermission(Securit
    yManager.java:208)
    at java.lang.Class.checkMemberAccess(Class.java:200)
    at java.lang.Class.getDeclaredMethods(Class.java:992)
    at
    com.ibm.wsspi.injectionengine.MethodMap.getMethods(MethodMap.jav
    a:150)
    at
    com.ibm.wsspi.injectionengine.MethodMap.getAllNonPrivateMethods(
    MethodMap.java:108)
    at
    com.ibm.ws.injectionengine.AbstractInjectionEngine.getInjectionT
    argets(AbstractInjectionEngine.java:756)
    at
    com.ibm.ws.injectionengine.ReferenceContextImpl.getInjectionTarg
    ets(ReferenceContextImpl.java:1095)
    at
    com.ibm.ws.cdi.impl.managedobject.AbstractManagedObjectFactory.p
    erformInjection(AbstractManagedObjectFactory.java:248)
    at
    com.ibm.ws.cdi.impl.managedobject.AbstractManagedObjectFactory.i
    njectAndPostConstruct(AbstractManagedObjectFactory.java:238)
    at
    com.ibm.ws.cdi.impl.managedobject.AbstractManagedObjectFactory.c
    reateManagedObject(AbstractManagedObjectFactory.java:221)
    at
    com.ibm.ws.cdi.impl.managedobject.CDIManagedObjectFactoryImpl.cr
    eateManagedObject(CDIManagedObjectFactoryImpl.java:60)
    at
    com.ibm.ws.webcontainer.webapp.WebAppImpl.createManagedObject(We
    bAppImpl.java:1916)
    at
    com.ibm.ws.webcontainer.webapp.WebAppImpl.inject(WebAppImpl.java
    :1848)
    at
    com.ibm.ws.webcontainer.webapp.WebApp.inject(WebApp.java:5968)
    at
    com.ibm.ws.webcontainer.webapp.WebApp.createAsyncListener(WebApp
    .java:5897)
    at
    com.ibm.ws.webcontainer.async.AsyncContextImpl.createListener(As
    yncContextImpl.java:621)
    

Problem conclusion

  • Resource injection in the server process has been updated to
    access injection target fields and methods with the proper
    privileges.  The AccessControlException will no longer occur.
    
    The fix for this APAR is currently targeted for inclusion in fix
    pack 16.0.0.3.  Please refer to the Recommended Updates page for
    delivery information:
    http://www.ibm.com/support/docview.wss?rs=180&uid=swg27004980
    

Temporary fix

Comments

APAR Information

  • APAR number

    PI63571

  • Reported component name

    LIBERTY PROFILE

  • Reported component ID

    5724J0814

  • Reported release

    855

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2016-06-03

  • Closed date

    2016-06-10

  • Last modified date

    2016-06-13

  • 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

    LIBERTY PROFILE

  • Fixed component ID

    5724J0814

Applicable component levels

  • R855 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":"855","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
04 May 2022