SAP Knowledge Base Article - Public

2358359 - An error occurred while adding the learning history

Symptom

Admins or instructors are unable to Add Learning History (record learning) for a particular class or item.

One of the similar errors are received:

Caused by: java.sql.SQLException: ORA-01422: exact fetch returns more than requested number of rowsORA-06512: at "XXXX_PROD_TMS.PKG_QUESTIONNAIRESURVEY", line 1370ORA-06512: at "XXXX_PROD_TMS.PKG_LEARNINGHST", line 2241ORA-06512: at line 1

or

Caused by: com.sap.db.jdbc.exceptions.JDBCDriverException: SAP DBTech JDBC: [1300]: fetch returns more than requested number of rows:
search table error: "XXXX_PROD_TMS"."PKG_LEARNINGHST_FULL_PROCESS_CPNT_EVTHST": line 1305 col 13 (at pos 61947):
[1300] (range 3) fetch returns more than requested number of rows exception: fetch returns more than requested number of rows: search table error:
"XXXX_PROD_TMS"."PKG_QUESTIONNAIRESURVEY_INITIATE_SURVEY_PROCESS":

or

Error message = SQLException- addComponentTrainingEvent: Could not add Component Training event due to SQLException.
Ticket No = 2047
ErrorFingerprint [exceptionRootCauseTag=6be9b13c00eddf72aa57150191001b5e2cb9fb15, exceptionStackTraceTag=6f766f7290aaf93de94e929dc6ecbcd4a9e1ce5b]

Image/data in this KBA is from SAP internal systems, sample data, or demo systems. Any resemblance to real data is purely coincidental.

Environment

SAP SuccessFactors Learning

Reproducing the Issue

  1. Goto Learning Administration 
  2. Navigate to Manage User Learning > Add Learning History (either option)
  3. Try to record learning for a user following wizard' steps
  4. Error message displayed

Cause

  • There is a survey related to the item twice.
  • This does NOT show at the user level or item record level under Surveys.
  • It can only be seen in Content > Surveys > search for the survey ID & Edit > Item usage tab > search for your item ID and you will see a duplicate:

Resolution

  1. Navigate to Content > Surveys > search for the survey ID & Edit > Item usage tab > search for your item ID and you will see a duplicate
    (If following along Cause steps, you may already opened the survey in View mode, you will see a check box next to the items otherwise please click on EDIT to show the check boxes.)
  2. Select the box next to one of the duplicated item {See NOTE below first}
  3. Click Remove
  4. Start the record learning again

NOTE:  when deleting the survey association the item usage information will be lost, so you might want to create a new revision of the item and then making changes to the new revision. Please refer to KBA 2546182 for more information. 

The preventive measure to stop admins from adding duplicate items under survey -> item usage section included on the 1908 release(but no data was corrected.)

So, when any admin tries to add an item that is already associated with the survey, they would be thrown a validation error message on the screen as shown below.

See Also

2546182 - Item Usage no longer shows data for survey for an item - SAP for Me 

Keywords

Cannot record learning, add learning history, learning history, add component training event, could not add component training event due to SQLException, error recording completion, error recording completion for component ID, unable to record completion, com.sap.db.jdbc.exceptions.JDBCDriverException, JDBCDriverException, PKG_QUESTIONNAIRESURVEY, PKG_LEARNINGHST, LRN-60812, LRN-53082, addComponentTrainingEvent,  , KBA , LOD-SF-LMS-ADM , System Admin, Global Variables, References , LOD-SF-LMS , Learning Management System , LOD-SF-LMS-COR , LMS Core - Items, Catalog, Curricula , LOD-SF-LMS-EVA , Surveys , Problem

Product

SAP SuccessFactors Learning all versions

Attachments

Survey_ItemUsage.png