Vous êtes sur la page 1sur 9

Trouble shooting: Too Many Objects Exception In Objective Setting (R11i10/R12)

Table of Contents

1. Problem Description

2. Cause

3. Description

4. Related Issues

5. Data Fix Solution

1. Problem Description
When manager or employee tries to update or view scorecard objectives, the self-service page errors out. The description of the error is: JBO-25013 Too many objects match primary key. An example of such an error is oracle.apps.fnd.framework.OAException: oracle.jbo.TooManyObjectsException: JBO-25013: Too many objects match the primary key oracle.jbo.Key[428 ]

2. Cause
The cause of such error is when we have the same objective definition in the transaction clob ( in hr_api_transaction table )as well as in the base table (per_objectives). This is a data corruption caused by some code issue. This is an effect and not the cause of a problem. Fixing the data need not necessarily prevent this from reappearing. However a data fix will fix the problem for this occurance. If we find such an issue we need to find the root cause of the issue and apply relevant patch to avoid future occurances, the details of which will be discussed in the further sections. When an objective is not approved, the objectives are not comitted to the base table PER_OBJECTIVES.These are instead stored in a XML Clob (column named TRANSACTION_DOCUMENT) format in the table HR_API_TRANSACTIONS against a scorecard specific transaction. A scorecard has a transaction in HR_API_TRANSACTIONS when the objectives are not commited (before approval). This includes updated and deleted objectives as well. However this issue occurs when the objective is marked as new in the transaction clob and is also present in the base table.

3. Description
How to find which objective is causing the issue? The error message displays the objective_id (the primary key) for which this situation has occurred. In the error example shown above the objective_id is 428 (the primary key oracle.jbo.Key [428]).

How to find the objective in the Clob and read it? Open the transaction clob using the following query SELECT transaction_document FROM hr_api_transactions WHERE transaction_ref_table = PER_PERSONAL_SCORECARDS AND transaction_ref_id =:1; Bind :1 with the scorecard_id of the employee .

Search for the objective_id in the tags <ObjectiveId> of the XML. (In this error example we will be searching for 428 inside the tags <ObjectiveId></ObjectiveId>) The section which displayes the objective details will look something similar:
<EO Name="oracle.apps.per.schema.server.ObjectiveEO"> <![CDATA[000100000004C303013C]]> <ObjectiveEORow PS="0" PK="Y" CI="Y"> <ObjectiveId>20059</ObjectiveId> <Name>Decrease Controllable Expenses</Name> <TargetDate>2007-09-30</TargetDate> <StartDate>2006-10-01</StartDate> <BusinessGroupId>1646</BusinessGroupId> <ObjectVersionNumber>0</ObjectVersionNumber> <OwningPersonId>4230</OwningPersonId> <AchievementDate null="true"/> <Detail>To achieve sufficient profit to finance our company growth, create value for our shareholders, and to provide the resources we need to achieve our other corporate objectives. As an objective aligned with the corporate objective to increase share holder value, it is necessary to decrease spending wherever possible to aid the organization to increase its profit margins </Detail> <Comments null="true"/> <SuccessCriteria>Year over year controllable expense have decrease by stated target.</SuccessCriteria> <AttributeCategory null="true"/> <Attribute1 null="true"/> <Attribute2 null="true"/> <Attribute3 null="true"/> <Attribute4 null="true"/> <Attribute5 null="true"/> <Attribute6 null="true"/> <Attribute7 null="true"/> <Attribute8 null="true"/> <Attribute9 null="true"/> <Attribute10 null="true"/> <Attribute11 null="true"/> <Attribute12 null="true"/> <Attribute13 null="true"/> <Attribute14 null="true"/> <Attribute15 null="true"/> <Attribute16 null="true"/> <Attribute17 null="true"/> <Attribute18 null="true"/> <Attribute19 null="true"/> <Attribute20 null="true"/> <LastUpdateDate>2007-01-30 02:03:41.0</LastUpdateDate>

<LastUpdatedBy>1004470</LastUpdatedBy> <LastUpdateLogin>4622795</LastUpdateLogin> <CreatedBy>1004470</CreatedBy> <CreationDate>2007-01-30 02:03:41.0</CreationDate> <Attribute21 null="true"/> <Attribute22 null="true"/> <Attribute23 null="true"/> <Attribute24 null="true"/> <Attribute25 null="true"/> <Attribute26 null="true"/> <Attribute27 null="true"/> <Attribute28 null="true"/> <Attribute29 null="true"/> <Attribute30 null="true"/> <ScorecardId>910</ScorecardId> <CopiedFromLibraryId>224</CopiedFromLibraryId> <CopiedFromObjectiveId>10779</CopiedFromObjectiveId> <AlignedWithObjectiveId>10779</AlignedWithObjectiveId> <NextReviewDate null="true"/> <GroupCode>CORP</GroupCode> <PriorityCode>3_H</PriorityCode> <AppraiseFlag>Y</AppraiseFlag> <VerifiedFlag null="true"/> <WeightingPercent null="true"/> <CompletePercent null="true"/> <TargetValue>12</TargetValue> <UomCode>PER</UomCode> <MeasurementStyleCode>QUANT_M</MeasurementStyleCode> <MeasureName>Financial statements</MeasureName> <MeasureTypeCode>MIN</MeasureTypeCode> <MeasureComments>Demonstrated decrease in controllable expenses</MeasureComments> </ObjectiveEORow> </EO>

Note: PS=0 in the line <ObjectiveEORow PS="0" PK="Y" CI="Y"> stands for new objectives. PS=2 stands for update and PS=3 stands for deleted objective.

How to find the objective in the base table? SELECT * from per_objectives WHERE objective_id = :1 Bind :1 with the problematic objective_id .Here in the example it is 428.

How to resolve the error thorugh a data fix? The issue can be avoided for future occurances by applying relevant fixes delivered through patches. However once the data is corrupted by the errorneous code this needs to be fixed through a data script .The steps to be followed for fixing the issue is mentioned in section 5.

4. Related Issues
Potential reasons, which lead to the issues, can be found from the following references. This section documents known issues and bugs for the same.

Forum thread discussing the same: http://myforums.oracle.com/jive3/thread.jspa?threadID=347506 Bugs related this issue:

Bug Number 7580480

Reported Release 11.5.8

7326694

11.5.10.2CU

7153845

11.5.10.2CU

7013182 7011355 7010457 6525127

12.1 11.5.10 12.1 11.5.10

6048250

11.5.10

5661432 5525053

11.5.10 11.5.9

Subject TOO MANY OBJECTIVES ERROR WHEN MGR TRIES TO APPROVE VIA REVIEW WORKER CHANGES OBJECT CREATION GIVES ERROR JBO-25013: TOO MANY OBJECTS MATCH THE PRIMARY KEY R:HRJUN08:PMP:TOO MANY OBJECTS ERROR WHEN WORKER ACCESSES SCRCD AFTER PLAN REPUB ST3: TOO MANY OBJECTS ERROR WHILE SETTING OBJECTIVES JAVA ERROR TOO MANY OBJECTIVES ON RESET SCORECARD PROCESS ST2:TOO MANY OBJECTS ERROR WHILE SETTING OBJECTIVES TOO MANY OBJECTS ON RESET SCORECARD. BUG 5661432 FIXED BY 5841128 BUT NOTWORKING TOO MANY CLICKS FOR EMPLOYEE/MANAGER TO GET TO INPROCESS APPRAISALS JAVA ERROR TOO MANY OBJECTS ON RESET SCORECARD PROCESS JBO-25013: TOO MANY OBJECTS MATCH PRIMARY ERROR WHEN HITTING VIEW & TRACK TASK

5. Data Fix Solution


Check the status of the scorecard Query to check the status: SELECT status_code FROM per_personal_scorecards WHERE scorecard_id =:1; Bind :1 with scorecard_id of the employee.

Case 1: Objective setting is finished and scorecard status is published. The status_code for the scorecard will be PUBLISHED, and the objective setting for this employee is finished.

Cause:
In this case the objectives in the table per_objectives and the XML data are consistent but The transactional data has not been deleted after commiting the changes to the base table.

Action:
Delete the transactional record

Script:
Get the transaction_id : SELECT transaction_id FROM hr_api_transactions WHERE transaction_ref_table =PER_PERSONAL_SCORECARDS AND transaction_ref_id = :1;

Bind :1 with scorecard_id of the employee. Delete the transaction step records DELETE FROM hr_api_transaction_steps WHERE transaction_id = :1; Bind :1 with the transaction_id collected from Step 1. Delete the transaction record. DELETE FROM hr_api_transactions WHERE transaction_id =:1; Bind :1 with the transaction_id collected from Step 1.

Case 2: When the Objective setting is completed/inprogress. The status_code will be WKR or NOT_STARTED_WITH_WKR or APPROVAL or MGR

Cause:
In this if the scorecard is still with the worker or is in approval queue, then we need to delete the commited objective from per_objectives table. On approval anyway this objectives will be commited again and there will be no data loss.

Action:
Delete the objectives from the per_objectives table

Script:
DELETE from per_objectives WHERE objective_id =:1

Bind :1 with the errroing objective_id (428 in this example) If error persists for other objectives as well repeat the same step for the other objectives.

Case 3: when the plan republished with reset scorecard statuses

Cause:
Normally occurs when the manager uses Approve and Finish while completing the objective setting and the plan is republished with Re-set scorecard statuses option. Scorecard status would be NOT_STARTED_WITH_WKR or NOT_STARTED_WITH_MGR.

Action:
Delete the transactional record

Script:
Get the transaction_id : SELECT transaction_id FROM hr_api_transactions WHERE transaction_ref_table =PER_PERSONAL_SCORECARDS AND transaction_ref_id = :1;

Bind :1 with scorecard_id of the employee. Delete the transaction step records

DELETE FROM hr_api_transaction_steps WHERE transaction_id = :1; Bind :1 with the transaction_id collected from Step 1. Delete the transaction record. DELETE FROM hr_api_transactions WHERE transaction_id =:1; Bind :1 with the transaction_id collected from Step 1.

Vous aimerez peut-être aussi