Error while importing Assessment Model
Error : com.castsoftware.java.InternalException: Overriding parameter value not found for technology/object type id -16
Above error is encountered in following scenario:
- Import Assessment Model (having some custom changes) in CMS (7.0.8 or earlier version)
- Migrate the 7.0.8 (or earlier version) to 7.0.9 or higher version
- Synchronize AM and try to import AM
This issue can be encountered in 7.0.9 and above version
Release | Yes/No |
---|---|
8.0.x | |
7.3.x | |
7.2.x | |
7.0.x |
Technology -16 was removed from the 7 .0 .9. version
7 .0.9 version no longer contains the reference to technology -16. Indeed, when exporting a pmx from the 709 version, the technology is not referenced in the PMX.
Since the AM imported into the CMS before 7.0.8 migration, The AM always contains the reference which explains the error message.
Before switching to another version it is important to follow these steps in the documentation:
If you have imported (in the CAST Management Studio) and then customized the Assessment Model (Metric Tree) in the previous CAST release, you need to be aware of the following:
• Upgrading the Dashboard Service will mean that the Assessment Model stored in the Dashboard Service at the time of the upgrade will be overwritten and all custom values will be lost. After generating a snapshot with the new Assessment Model now stored in the Dashboard Service, you may see a warning displayed (as shown below) when loading pages in the CAST Dashboard. This warning message explains that the configuration of the Quality Rules or Technical Criteria listed in the warning has changed between snapshot "n" and snapshot "n-1" and therefore results may differ.
• However, your customized Assessment Model (visible in the Assessment Models view) will also still be present and will not be affected by the upgrade.
• If you want to continue using the custom Assessment Model with the new version of CAST, you need to ensure that you associate your custom Assessment Model with the Dashboard Service(s) that you want to use. Use the Dashboard Service editor to achieve this - ensure that the name of the Assessment Model you want to use is listed in the Assessment Model tab. If it isn't, use the Change option to select it.
• When you then run the Generate Snapshot option or any option that triggers the Synchronize action, the custom Assessment Model will overwrite the Assessment Model in the Dashboard Service.
Remember that doing the above will also mean that any improvements or changes CAST has made to the Assessment Model in the new version will be lost. As such, CAST recommends importing the new Assessment Model into the CAST Management Studio BEFORE you run any option that triggers the Synchronize action. You then have a copy of the new Assessment Model should you require it.
Proposed solution to overcome the problem
Clean up the both local and central database using
delete from DSS_METRIC_PARAM_VALUES Where OBJECT_TYPE_ID = -16
- Clean up the assessment
- Export the assessment model to a pmx / or use the pmx you want to import .
Using an editor , grep "-16" you will find occurrence in the tag named <OverridingFloatParameterValue .. </OverridingFloatParameterValue>
such as following<OverridingFloatParameterValue entry="uuid:5bb52e55-ac83-4b1f-be51-542be2b5220a" floatValue="20.0"> <filter> <TechnologyParameterOverridingFilter entry="uuid:eb4a0515-d8a0-4e13-98b6-d50be8972055"> <amtCategory> <Technology amtId="-16" entry="uuid:a5877dea-85b1-48fb-8bc9-91ad500e1e67" name="PHP"/> </amtCategory> </TechnologyParameterOverridingFilter> </filter> </OverridingFloatParameterValue>
- Remove all such occurrences.
- Save the pmx
- Re import it to CAST MS
- Export the assessment model to a pmx / or use the pmx you want to import .
- Synchronize the local & Central.