4 Replies Latest reply on Oct 4, 2012 8:19 AM by Gyanprakash Pandey

    Error updating user's Organization

    947122
      Hi,

      We have an issue changing a user's organization via the OIM Administration console. For some problem organisations, when a user is attempted to be moved to one of the problem organisations, a dialog box error on admin the console is displayed:

      "An error occurred. The corresponding error code is IAM-0080001".

      Checking the logs, the actual error stackdump starts with:
      <Oct 3, 2012 9:50:44 AM EST> <Warning> <org.eclipse.persistence.session.oim> <BEA-000000> <
      Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.1.3.v20110304-r9073): org.eclipse.persistence.exceptions.DatabaseException
      Internal Exception: java.sql.SQLIntegrityConstraintViolationException: ORA-02291: integrity constraint (IAMTEST_OIM.FK_ORC_ORD) violated - parent key n
      ot found
      ORA-06512: at "IAMTEST_OIM.OIM_USER_MGMT", line 858
      ORA-06512: at line 1

      Error Code: 2291
      Call: BEGIN OIM_USER_MGMT.BulkUserModify(p_intUserKey=>?, p_arUSRList=>?, p_arColumnlist=>?, p_arColumnValue=>?, p_arMLSColLocaleValue=>?, p_intReturnC
      ode_out=>?, p_strErrMessage_out=>?); END;
      bind => [1, oracle.sql.ARRAY@199c54c1, oracle.sql.ARRAY@199c6768, oracle.sql.ARRAY@199c489c, oracle.sql.ARRAY@199c6167, => p_intReturnCode_out,
      => p_strErrMessage_out]
      Query: DataReadQuery()
      at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:324)
      at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeDirectNoSelect(DatabaseAccessor.java:797)
      at org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.executeStoredProcedure(DatabasePlatform.java:1991)
      at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:593)
      at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:526)
      at org.eclipse.persistence.sessions.server.ServerSession.executeCall(ServerSession.java:529)
      at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:206)
      at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:192)
      at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeSelectCall(DatasourceCallQueryMechanism.java:263)
      at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeSelect(DatasourceCallQueryMechanism.java:245)
      at org.eclipse.persistence.queries.DataReadQuery.executeNonCursor(DataReadQuery.java:192)
      at org.eclipse.persistence.queries.DataReadQuery.executeDatabaseQuery(DataReadQuery.java:148)
      at org.eclipse.persistence.queries.DatabaseQuery.execute(DatabaseQuery.java:740)
      at org.eclipse.persistence.queries.DataReadQuery.execute(DataReadQuery.java:134)
      at org.eclipse.persistence.internal.sessions.AbstractSession.internalExecuteQuery(AbstractSession.java:2392)
      at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1291)
      at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1273)
      at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1233)
      at org.eclipse.persistence.internal.sessions.AbstractSession.executeSelectingCall(AbstractSession.java:1397)
      at oracle.iam.oimdataproviders.impl.OIMUserDataProvider.modifyProcedureCall(OIMUserDataProvider.java:721)
      at oracle.iam.oimdataproviders.impl.OIMUserDataProvider.modify(OIMUserDataProvider.java:578)
      at oracle.iam.platform.entitymgr.impl.EntityManagerImpl.modifyEntity(EntityManagerImpl.java:388)
      at oracle.iam.platform.kernel.impl.EntityDefaultActionHandler.execute(EntityDefaultActionHandler.java:41)
      at oracle.iam.platform.kernel.impl.DefaultActionHandler.execute(DefaultActionHandler.java:41)
      at oracle.iam.identity.usermgmt.impl.handlers.modify.ModifyUserActionHandler.execute(ModifyUserActionHandler.java:108)
      at oracle.iam.identity.usermgmt.impl.handlers.modify.ModifyUserActionHandler.execute(ModifyUserActionHandler.java:56)
      at sun.reflect.GeneratedMethodAccessor685.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at oracle.iam.platform.kernel.impl.EventHandlerDynamicProxy.invoke(EventHandlerDynamicProxy.java:30)
      ...

      The error doesn't occur if a user is created in the problem organisation, but when the user is moved out of the problem organisation and then attempted to be moved back into the same problem organisation, the same error occurs.

      We are using OIM 11g Release 1 (11.1.1.5.0)

      I haven't found any references to this error in my searching so any suggestions about how we can recover/fix it are appreciated. As mentioned, only some organisations have this problem, but i cannot find any differences between these problem organisations and the other normal organisations.

      Thanks.

      Edited by: user10929505 on 02-Oct-2012 23:50
        • 1. Re: Error updating user's Organization
          ddb2
          I am not sure about how to fix your issue, but it does sound like some data has been lost in your database. Every organization is represented by an entry in the "ACT" table, but should also have a corresponding entry in the "ORD" table (linked by ACT_KEY). It appears to me some of you ORD table entries are missing. I suggest at first you check this to see if it is the issue. You should have the same number of entries in your ACT and ORD tables.
          1 person found this helpful
          • 2. Re: Error updating user's Organization
            947122
            Thanks Duncan

            OK. We have the same number of entries in both tables (ACT and ORG) however if I run this query

            select a.act_key, o.act_key, o.ord_key from ORD o, ACT a
            where a.ACT_KEY=o.act_key order by a.act_key asc

            Orgs with no issue have the same value for all three columns. The problematic org units mostly have a different ORD_KEY value.
            e.g.
            Good: 165 165 165
            Bad: 166 166 221

            However after a certain date different values doesn't indicate a broken Org. Don't know what caused this.

            How to fix it? I assume that manually updating the ORD_KEY in the ORD table is a bad idea. Do we just delete the broken Organizations in the OIM console and recreate them?

            Edited by: user10929505 on 4/10/2012 00:53
            • 3. Re: Error updating user's Organization
              ddb2
              I doubt the differing numbers themselves is the issue, there is no reason I can see why an ord_key should necessarily match an act_key, even if it may normally, so correcting this would probably not help. Most likely the differing numbers is somehow the symptom of something else that went wrong.

              I would definitely say it is safer to delete and recreate your organizations, but bear in mind organization names must be unique. I am not sure if this even applies with deleted organizations, but in case it does it may be best to rename the old organizations, create new ones with the required names, move the users across then delete the old ones.
              • 4. Re: Error updating user's Organization
                Gyanprakash Pandey
                Make sure there exist a parent organization for all your problem organizations. Have a top organization, create all organizations under it, now transfer these users from one sub-org to another.

                regards,
                GP