Exception occurs during repair of ALM 11 based project - cannot insert NULL into TSC_VC_CHECKOUT_USER_NAME

  • KM02578513
  • 30-Sep-2016
  • 30-Sep-2016

Summary

The article provides a work around for exception thrown during repair of ALM 11 project.

Error

When running Repair tool on Application Lifecycle Management (ALM) 11 project an exception is thrown which aborts the task:

INSERT INTO ...

VC_TEST_CONFIGS(TSC_ID,TSC_TEST_ID,TSC_NAME,TSC_DESC,TSC_CREATED_BY,TSC_CREATION_DATE,TSC_EXEC_STATUS,TSC_VTS,TSC_VC_CHECKOUT_USER_NAME,TSC_DATA_STATE) SELECT ...

TSC_ID,TSC_TEST_ID,TSC_NAME,TSC_DESC,TSC_CREATED_BY,TSC_CREATION_DATE,TSC_EXEC_STATUS,TSC_VTS,TSC_VC_CHECKOUT_USER_NAME,TSC_DATA_STATE FROM TEST_CONFIGS INNER JOIN VC_TEST ON TSC_TEST_ID=TS_TEST_ID ...

WHERE TSC_TEST_ID NOT IN (SELECT TSC_TEST_ID FROM VC_TEST_CONFIGS)

 [Mercury][Oracle JDBC Driver][Oracle]ORA-01400: cannot insert NULL into ...

("PROJECT_NAME"."VC_TEST_CONFIGS"."TSC_VC_CHECKOUT_USER_NAME")

Cause

The cause for the error is specifically formatted VC related information which ALM Repair tool (only in ALM 11) cannot handle hence the Repair tool throws an exception.

Fix

In order to overcome the problem the following modification of ALM server files are needed:


- On ALM Repository side (default location is C:\ProgramData\HP\ALM\repository ) navigate to \\repository\sa\DomsInfo\MaintenanceData\conf
- Backup verify_tasks_deep.xml  and open it with a text editor. Lines 68 and 69 has to be commented as follow and save the changes:


<!--ENTRY VALUE="com.mercury.qc.dbverify.tasks.MainTestCriteriaVerifyTask"/-->
<!--ENTRY VALUE="com.mercury.qc.dbverify.tasks.TestConfigurationVerifyTask"/-->


- Back up repair_tasks.xml and open it with a text editor. Line 32 has to be commented as follow and save the changes:


<!--RepairData class="com.mercury.td.saserver.maintenance.repair.SimpleSqlRepairer"/-->


After the above changes are done the project can be repaired.


Note: this problem concerns ALM 11 projects only.