How to check data integrity in the Object Store when policy xpress events fail?
search cancel

How to check data integrity in the Object Store when policy xpress events fail?

book

Article ID: 50813

calendar_today

Updated On:

Products

CA Identity Manager CA Identity Governance CA Identity Portal

Issue/Introduction

If you get the following exception despite that no policies are defined for your event you might read this tech doc to learn how to look for left over policies in the run time database and delete them:

com.ca.identitymanager.policyxpress.exceptions.PxSystemException:
Error building data for matching events

Environment

Release:
Component: IDMGR

Resolution

Policy Xpress will trigger policies that are stored in the object store. If you result in the exception below and do not believe you have a policy defined you might want to conduct the procedure below to check for your object store data integrity:

ERROR
[com.netegrity.ims.exception.EventExecuteStateException] Exception:
com.ca.identitymanager.policyxpress.exceptions.PxSystemException:
Error building data for matching events at com.ca.identitymanager.policyxpress.engine.PxProvider.getPoliciesForEvent(Px Provider.java:136) at
The procedure:
--------------

Once the event is executed it is looking up the database for a policy and if it finds one it will fire it up. This info is stored in two tables in the IM Object Store database:

PX_When
PX_Policy

The PX_When table has 6 columns. Two of them are called: EVENTNAME and POLICYUN. The EVENTNAME holds the name of the event and the POLICYUN references a policy object from the PX_Policy table. We would like to check if there is a dangling reference between the tables where the PX_When is pointing to a non-existent PX_Policy object. This might have happened during a previous delete. If such a dangling reference exists it might explain this failure because the policy object will not be able to be constructed resulting possibly in this NULL pointer exception. If such a dangling reference exists, we should be able to clear it manually.

Here is what you should do:

  1. First of all please do back up both these tables.

  2. Once the tables are backed up:

    1. Run a query on the PX_When table to retrieve all rows that have EVENTNAME that contains the string: Synchronize.
      The query should be something like:

      SELECT * from PX_WHEN where EVENTNAME like '%synchronize%'

    2. For each returned row: look at the POLICYUN value and find out if it exists in the PX_Policy table (in the UNIQUE_NAME column).

    3. If the POLICYUN value does not exist in the PX_POLICY table, please remove this line from the PX_WHEN table.

    4. If the POLICYUN value is NULL, please remove this line from the PX_WHEN table.

      This procedure will clear up any leftover dangling policy objects that might have been left in the database associated to an event without a real policy to be fired which might lead to the error at the top.

Additional Information

In case Vaap is deployed as DEMO deployment type, it is shipped with one internal Oracle Xpress that can be managed using SQL developer. Follow these following steps to be able to apply this article steps for Oracle Xpress:

1 - Install SQL developer (This is from Oracle) and logon as IDM and same password of config user.

2 - After connecting, expand under Tables and search by the mentioned Procedures by Article 50813, it's mean PX_When and PX_Policy

3 - Click over the SQL Worksheet button to open the SQL command line in SQL developer.

4 - After this step continue following steps of Article 50813