OAM 11gR2: OAM Server Web Application is in FAILED status, OAM Server Key initialization failed, BadPaddingException: Given final block not properly padded (Doc ID 1904608.1)

Last updated on SEPTEMBER 21, 2016

Applies to:

Oracle Access Manager - Version 11.1.2.0.0 and later
Information in this document applies to any platform.

Symptoms

In OAM 11gR2 PS1 (OAM 11.1.2.1.0),


You have observed that OAM_SERVER application in deployment is FAILED state.

Redeployment of the oam-server.ear file as in WLS Admin Console does not help to bypass this error.

When reviewing on the OAM server startups logs, you can see the following errors being recorded :


<Unable to set the activation state to true for the application 'oam_server [Version=11.1.2.0.0]'.
weblogic.application.ModuleException: [HTTP:101216]Servlet: "AMInitServlet" failed to preload on startup in Web application: "oam".
java.lang.ExceptionInInitializerError
      at oracle.security.am.engines.sso.adapter.AbstractSessionAdapterImpl.checkAndInit(AbstractSessionAdapterImpl.java:110)
      at oracle.security.am.engines.sso.adapter.AbstractSessionAdapterImpl.<init>(AbstractSessionAdapterImpl.java:88)
      at oracle.security.am.engines.sso.adapter.MultipleUserSessionAdapterImpl.<init>(MultipleUserSessionAdapterImpl.java:61)
      at oracle.security.am.engines.sso.adapter.MultipleUserSessionAdapterImpl.<clinit>(MultipleUserSessionAdapterImpl.java:50)
      at oracle.security.am.engines.sso.adapter.SessionManagementAdapterFactory.getAdapter(SessionManagementAdapterFactory.java:46)
      at oracle.security.am.engines.enginecontroller.SSOEngineController.processEvent(SSOEngineController.java:567)
      at oracle.security.am.controller.MasterController.processEvent(MasterController.java:589)
      at oracle.security.am.controller.MasterController.processRequest(MasterController.java:780)
      at oracle.security.am.controller.MasterController.process(MasterController.java:701)
      at oracle.security.am.pbl.transport.http.AMInitServlet.initializeAmServer(AMInitServlet.java:139)
      at oracle.security.am.pbl.transport.http.AMInitServlet.init(AMInitServlet.java:81)
      at weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:283)
      at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
      at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
....
Caused by: oracle.security.am.common.utilities.exception.AmRuntimeException: OAM Server Key initialization failed.
      at oracle.security.am.engines.sso.adapter.OAMSessionConfiguration$ConfigListener.configurationChanged(OAMSessionConfiguration.java:154)
      at oracle.security.am.engines.sso.adapter.OAMSessionConfiguration.registerConfigChangeListener(OAMSessionConfiguration.java:75)
      at oracle.security.am.engines.sso.adapter.OAMSessionConfiguration.<init>(OAMSessionConfiguration.java:69)
      at oracle.security.am.engines.sso.adapter.OAMSessionConfiguration.<clinit>(OAMSessionConfiguration.java:58)
      ...
Caused by: javax.crypto.BadPaddingException: Given final block not properly padded
      at com.sun.crypto.provider.CipherCore.doFinal(CipherCore.java:811)
      at com.sun.crypto.provider.CipherCore.doFinal(CipherCore.java:676)
      at com.sun.crypto.provider.AESCipher.engineDoFinal(AESCipher.java:313)
      at javax.crypto.Cipher.doFinal(Cipher.java:2087)
      at oracle.security.am.common.utilities.crypto.AESEncrypter.decrypt(AESEncrypter.java:160)
      at oracle.security.am.common.utilities.crypto.OAMKeyStore.decryptKeyData(OAMKeyStore.java:312)
      at oracle.security.am.engines.sso.adapter.OAMSessionConfiguration$ConfigListener.configurationChanged(OAMSessionConfiguration.java:151)
      ...

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms