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) []

Resolving The Problem

To fix the problem permanently, update to Java SE 8. To fix the problem temporarily, you can disable Java 2 security if you do not require it.

You can optionally install a fix pack for Version 9 to resolve this issue. Refer to the Recommended Updates page for delivery information: http://www.ibm.com/support/docview.wss?uid=swg27004980

[{"Product":{"code":"SSEQTP","label":"WebSphere Application Server"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"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":"LOB45","label":"Automation"}},{"Product":{"code":"SS7K4U","label":"WebSphere Application Server for z\/OS"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":" ","Platform":[{"code":"PF035","label":"z\/OS"}],"Version":"9.0.0.0","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
06 June 2019

UID

swg21985266