Solving java.security.KeyStoreException: Uninitialized keystore Exception | Weblogic
We added a new certificate to the existing keystore in one of the domain using keytool command.
keytool -import -trustcacerts -file ~/newcert.pem -keystore /slot/keystores/trust.jks -alias NewCert2013
Certificate was added to the keystore and we have seen the same alias name was presented when we list the alias names.
Keystore file was common for both the managed servers. One managed server picked up the changes well, but on other managed server, messages started failing.
We saw below exception in Logs :
Caused by: java.security.KeyStoreException: Uninitialized keystore
at java.security.KeyStore.getCertificate(KeyStore.java:819)
at oracle.tip.b2b.utility.Utility.getCertUsingAlias(Utility.java:1473)
at oracle.tip.b2b.tpa.RepoDataAccessor.addSignatureInfo(RepoDataAccessor.java:1664)
at oracle.tip.b2b.tpa.RepoDataAccessor.setDCInfo(RepoDataAccessor.java:862)
at oracle.tip.b2b.tpa.RepoDataAccessor.addFROMPartyInfo(RepoDataAccessor.java:782)
at oracle.tip.b2b.tpa.RepoDataAccessor.getAgreementDetails(RepoDataAccessor.java:421)
at oracle.tip.b2b.tpa.TPAProcessor.processTPA(TPAProcessor.java:449)
at oracle.tip.b2b.tpa.TPAProcessor.processIncomingTPA(TPAProcessor.java:239)
at oracle.tip.b2b.engine.Engine.handleExceptionBeforeIncomingTPA(Engine.java:5569)
at oracle.tip.b2b.engine.Engine.processIncomingMessageImpl(Engine.java:2567)
at oracle.tip.b2b.engine.Engine.processIncomingMessage(Engine.java:1713)
… 7 more
Error -: B2B-50029: B2B runtime error: java.security.KeyStoreException: Uninitialized keystore
at oracle.tip.b2b.tpa.TPAProcessor.processTPA(TPAProcessor.java:504)
at oracle.tip.b2b.tpa.TPAProcessor.processIncomingTPA(TPAProcessor.java:239)
at oracle.tip.b2b.engine.Engine.handleExceptionBeforeIncomingTPA(Engine.java:5569)
at oracle.tip.b2b.engine.Engine.processIncomingMessageImpl(Engine.java:2567)
…
While debugging we found that 2 certificates were added with different alias so one server was failing to load as the other was having lock on it.
We removed the duplicate and all started working.
In some cases we saw only restart of affected managed server resolved the issue.
In case of any ©Copyright or missing credits issue please check CopyRights page for faster resolutions.