Thursday, June 16, 2011

If you hit oracle.security.jps.JpsRuntimeException: Cannot read from policy store.

When trying to start your integrated weblogic server, if you come across the following error :-



oracle.security.jps.JpsRuntimeException: Cannot read from policy store.
at oracle.security.jps.internal.policystore.xml.XmlPolicyStore.buildFromFile(XmlPolicyStore.java:425)
at oracle.security.jps.internal.policystore.xml.XmlPolicyStore.(XmlPolicyStore.java:224)
...
Caused by: oracle.security.jps.JpsRuntimeException: javax.xml.stream.XMLStreamException: End Document reached prematurely.
at oracle.security.jps.internal.core.datastore.xml.XmlDataStoreParser.getDataStoreEntryStax
(XmlDataStoreParser.java:166)
...
... 28 more
...
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)
...
Caused By: oracle.security.jps.JpsRuntimeException: oracle.security.jps.JpsException: [PolicyUtil] Exception while getting default policy Provider
at oracle.security.jps.internal.policystore.PolicyDelegationController.(PolicyDelegationController.java:291)
...
Caused By: java.security.PrivilegedActionException: oracle.security.jps.JpsException: [PolicyUtil] Unable to obtain default JPS Context!
at java.security.AccessController.doPrivileged(Native Method)
...
Caused By: oracle.security.jps.JpsRuntimeException: Cannot read from policy store.
at oracle.security.jps.internal.policystore.xml.XmlPolicyStore.buildFromFile(XmlPolicyStore.java:42


Solution:-

This issue mostly occurs due to a corruption in the jazn-data.xml file. You could delete the jazn-data.xml file under the DefaultDomain directory or delete the 'DefaultDomain' directory under the system directory inside your view. This will create the domain afresh the next time you start your WLS.

13 comments:

Spyros Doulgeridis said...

Nice!

Kavita said...

Hey, glad my post was of help!

Kavita said...

Today I faced a similar issue yet again and doing a google search, landed me on my very own blogpost :) I patted myself for starting off this blog and keep reminding myself to keep blogging about the issues that I face and the workarounds for those, so that it could be helpful for me or others who face similar issues in future!!!

Anonymous said...

Thanks...it solved my problem..!!

Anonymous said...

Many thanks. Really helped. I deleted the jazn.dataxxxx.xml file from my /home/userid/tmp folder and that fixed the issue!!

Anonymous said...

This solved my problem! Thanks very much!

Gautam Saini said...

I ran into the same issue today. It did not get resolved by removing the jazn-data.xml file. However, I copied the system-jazn-data.xml file from other working node as suggested by Oracle support website. And that fixed the issue.

Refer to Oracle Support Document:

(Doc ID 1346249.1)


Under location
$DOMAIN_HOME/FrmRepDomain/config/fmwconfig

Replaced file system-jazn-data.xml

Unknown said...

Thanks a lot Kavita...it worked for me

Anand Yerrapati said...

Thanks for the post. It saved my time.

Anonymous said...

Thanks a lot. Worked! :)

Unknown said...

Thanks it worked for me!

Unknown said...

Thanks! It did solve the problem for me

Anonymous said...

Thank you so much!