Tuesday, July 31, 2012

BEA-000386 - oracle.security.jps.JpsException: [PolicyUtil] Exception while getting default policy Provider

Issue: AdminServer doesnt startup due to the below JPS errors in 10.3.4 or 10.3.5

####<Jul 31, 2012 1:35:49 PM EDT> <Critical> <WebLogicServer>  <AdminServer> <main> <<WLS Kernel>> <> <> <1343756149538> <BEA-000386> <Server subsystem failed. Reason: weblogic.security.SecurityInitializationException: The loading of OPSS java security policy provider failed due to exception, see the exception stack trace or the server log file for root cause. If still see no obvious cause, enable the debug flag -Djava.security.debug=jpspolicy to get more information. Error message: oracle.security.jps.JpsException: [PolicyUtil] Exception while getting default policy Provider
weblogic.security.SecurityInitializationException: The loading of OPSS java security policy provider failed due to exception, see the exception stack trace or the server log file for root cause. If still see no obvious cause, enable the debug flag -Djava.security.debug=jpspolicy to get more information. Error message: oracle.security.jps.JpsException: [PolicyUtil] Exception while getting default policy Provider
        at weblogic.security.service.CommonSecurityServiceManagerDelegateImpl.loadOPSSPolicy(CommonSecurityServiceManagerDelegateImpl.java:1398)
        at weblogic.security.service.CommonSecurityServiceManagerDelegateImpl.initialize(CommonSecurityServiceManagerDelegateImpl.java:1018)
        at weblogic.security.service.SecurityServiceManager.initialize(SecurityServiceManager.java:873)
        at weblogic.security.SecurityService.start(SecurityService.java:141)
        at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
        at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
        at weblogic.work.ExecuteThread.run(ExecuteThread.java:176)
Caused By: oracle.security.jps.JpsRuntimeException: oracle.security.jps.JpsException: [PolicyUtil] Exception while getting default policy Provider
        at oracle.security.jps.internal.policystore.PolicyDelegationController.<init>(PolicyDelegationController.java:291)
        at oracle.security.jps.internal.policystore.PolicyDelegationController.<init>(PolicyDelegationController.java:282)
        at oracle.security.jps.internal.policystore.JavaPolicyProvider.<init>(JavaPolicyProvider.java:261)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
        at java.lang.Class.newInstance0(Class.java:355)
        at java.lang.Class.newInstance(Class.java:308)
        at weblogic.security.service.CommonSecurityServiceManagerDelegateImpl.loadOPSSPolicy(CommonSecurityServiceManagerDelegat


Resolution:
Actually, I have seen this issue twice in my career. Two completly different clients and projects :-(
Resolution for the issue was very similar both times but not the same. Root cause is similar i.e. possible corruption of policy stores or Embedded LDAP due to disk space full or some other crap

First time, i was able to solve the problem by simply copying the following files from a working domain or a backup of the existing domain:
Directory: $DOMAIN_HOME/config/fmwconfig
Files: system-jazn-data.xml and cwallet.sso

Second time when I faced the similar issue, I had to copy the entire $DOMAIN_HOME/config/fmwconfig from a different working domain and delete the $DOMAIN_HOME/servers/AdminServer directory and restart the AdminServer. I had to let it recreate the AdminServer directory again and that fixed the problem.

No comments: