IBM Support

WebSphere Application Server: A permission error can occur when Java 2 security is enabled and your application runs with entity beans or EJB beans

Troubleshooting


Problem

If you enabled Java 2 security and your application runs with entity beans or Enterprise Javabeans (EJB) beans, you can encounter a permission error during normal operation of your application or under certain work load. The following examples illustrate the permission error that you can encounter. []Example 1:[] []Permission error:[][]     getProtectionDomain : Access denied ("java.lang.RuntimePermission" "getProtectionDomain" [] []Code:[] The following class requires the necessary permission. The JAR file contains the class. []     suite.r50.base.pitt.ejb._CMEntityHome_Stub  in  {file:/C:/opt/Moonstone/WAS/profiles/node1/installedApps/ndcell/PittTestApp.ear/PittBean.jar} [] []Stack Trace:[] [] java.security.AccessControlException: Access denied ("java.lang.RuntimePermission" "getProtectionDomain")     at java.security.AccessController.throwACE(AccessController.java:157)     at java.security.AccessController.checkPermissionHelper(AccessController.java:217)     at java.security.AccessController.checkPermission(AccessController.java:349)     at java.lang.SecurityManager.checkPermission(SecurityManager.java:562)     at com.ibm.ws.security.core.SecurityManager.checkPermission(SecurityManager.java:208)     at java.lang.Class.getProtectionDomain(Class.java:1554)     at java.lang.J9VMInternals.getClassInfoStrings(J9VMInternals.java:420)     at java.lang.J9VMInternals.formatNoSuchMethod(J9VMInternals.java:442)     at java.io.ObjectStreamClass.hasStaticInitializer(Native Method)     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:95)     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55) [] []Example 2:[] []Permission error:[][]      getProtectionDomain : Access denied ("java.lang.RuntimePermission" "getProtectionDomain") [] []Code:[] The following class requires the necessary permission. The WAR file contains the class. []      com.ibm.ws.svt.quicksec.wclient31.QuickSecForm  in  {file:/opt/RQMAuto_QuickSec_900/WAS/profiles/node2/installedApps/ndcell/QuickSec90.ear/quickSecForm31.war/WEB-INF/classes/} [] []Stack Trace:[] [] java.security.AccessControlException: Access denied ("java.lang.RuntimePermission" "getProtectionDomain") at java.security.AccessController.throwACE(AccessController.java:157) at java.security.AccessController.checkPermissionHelper(AccessController.java:217) at java.security.AccessController.checkPermission(AccessController.java:349) at java.lang.SecurityManager.checkPermission(SecurityManager.java:562) at com.ibm.ws.security.core.SecurityManager.checkPermission(SecurityManager.java:208) at java.lang.Class.getProtectionDomain(Class.java:1554) at java.lang.J9VMInternals.getClassInfoStrings(J9VMInternals.java:420) at java.lang.J9VMInternals.formatNoSuchMethod(J9VMInternals.java:442) at java.io.ObjectStreamClass.hasStaticInitializer(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:95) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55) []

[{"Product":{"code":"SSEQTP","label":"WebSphere Application Server"},"Business Unit":{"code":"BU048","label":"IBM Software"},"Component":"Not Applicable","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF012","label":"IBM i"},{"code":"PF016","label":"Linux"},{"code":"PF014","label":"iOS"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"},{"code":"PF035","label":"z\/OS"},{"code":"PF022","label":"OS X"}],"Version":"9.0.0.0","Edition":"Base;Network Deployment","Line of Business":{"code":"LOB77","label":"Automation Platform"}},{"Product":{"code":"SS7K4U","label":"WebSphere Application Server for z\/OS"},"Business Unit":{"code":"BU048","label":"IBM Software"},"Component":" ","Platform":[{"code":"PF035","label":"z\/OS"}],"Version":"9.0.0.0","Edition":"","Line of Business":{"code":"LOB77","label":"Automation Platform"}}]

Log InLog in to view more of this document

This document has the abstract of a technical article that is available to authorized users once you have logged on. Please use Log in button above to access the full document. After log in, if you do not have the right authorization for this document, there will be instructions on what to do next.

Document Information

Modified date:
03 March 2025

UID

swg21985266