Saturday, September 10, 2016

Oracle Access Manager (OAM) 11G R2 PS3 (11.1.2.3.0) OAMCONSOLE failing to start along with Oracle Identity Manager OIM 11G R2 PS3 (11.1.2.3.0)

Recently I ran into this issue wherein oamconsole application would fail to start and go into FAILED state instead of ACTIVE state.

Upon further investigation the root cause were :-

  1. OIM and OAM cannot co-exist together in the same domain
  2. -DDISABLE_CONFIG_ENTITY=true needs to be set if it is windows environment (in my case)
  3. DEFAULT_MEM_ARGS must be 4GB or more
  4. OPSS Schema should not be used by OIM & OAM



Solution :-

  1. Run config.sh or config.cmd to recreate a new domain exclusively for OAM.
  2. In SetDomainEnv file add the below line 
set JAVA_OPTIONS=%JAVA_OPTIONS% %JAVA_PROPERTIES% -Dwlw.iterativeDev=%iterativeDevFlag% -Dwlw.testConsole=%testConsoleFlag% -Dwlw.logErrorsToConsole=%logErrorsToConsoleFlag% -DDISABLE_CONFIG_ENTITY=true

  1.  In setOAMDomainEnv file change the default memory args as below
set DEFAULT_MEM_ARGS=-Xms4096m -Xmx4096m

  1. Recreate the OPSS schema under a new prefix and use that in the domain configuration wizard as per step 1.
  2. Run configureSecurityStore.py right after the domain creation without any errors.

It is very important that you get all the steps right in the first attempt before starting the AdminServer for the first time because this error is unrecoverable if bootstrap fails on first adminserver startup.


-----------------Error Messages---------------------------------------------------------------------

Error 1

Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.3.1.v20111018-r10243): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLIntegrityConstraintViolationException: ORA-00001: unique constraint (OAM_OAM.JOURNAL_CHANGES_UK0) violated

Error Code: 1
Call: INSERT INTO JOURNAL_CHANGES (ID, CHANGE, CHANGE_ORDER, CHANGE_SEQ, ENTITY_UID, ENTITY_VERSION, JOURNAL_ID, NAME_PATH, OPERATION, type) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
bind => [10 parameters bound]
Query: InsertObjectQuery(oracle.security.am.foundation.entity.admin.provider.db.beans.JournalChanges@41462a1b)
at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:324)
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeDirectNoSelect(DatabaseAccessor.java:840)
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeNoSelect(DatabaseAccessor.java:906)
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:592)
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:535)
at org.eclipse.persistence.internal.sessions.AbstractSession.basicExecuteCall(AbstractSession.java:1717)
at org.eclipse.persistence.sessions.server.ClientSession.executeCall(ClientSession.java:253)  




 Error 2

oracle.security.am.common.utilities.exception.AmRuntimeException: Component Bootstrap Failed
at oracle.security.am.lifecycle.ApplicationLifecycle.contextInitialized(ApplicationLifecycle.java:117)
....
Caused By: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
.....
Caused By: oracle.security.am.install.AMInstallException: Invalid OAM Keystore configuration
at oracle.security.am.install.startup.AMKeyStoreValidator.execute(AMKeyStoreValidator.java:58)
at oracle.security.am.install.startup.OamInstallTopologyConfigListener.doMandatoryValidations(OamInstallTopologyConfigListener.java:141)
at oracle.security.am.install.startup.OamInstallTopologyConfigListener.oamSysConfigOperations(OamInstallTopologyConfigListener.java:129)
at oracle.security.am.install.startup.OamInstallTopologyConfigListener.onServerStartupWLS(OamInstallTopologyConfigListener.java:84)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
.....

Unable to set the activation state to true for the application 'oam_admin [Version=11.1.2.0.0]'




--------------------------------------------------------------------------------------------------------------------------------------------------


Some screenshot below for the solution implementation