IBM Support

Metadata asset manager import fails due to duplicates in valid enumeration for custom attribute

Troubleshooting


Problem

Orphan ValidEnumeration objects in XMETA cause import failures

Symptom

While performing metadata import, the share to the repository fails with the following error,
[8/13/20 4:17:06:182 PDT] 000001eb ImportErrorSt E   1 problem(s) occurred during asset import.
[8/13/20 4:17:06:182 PDT] 000001eb ImportErrorSt E   The lower bound constraint was violated for feature of_ValidEnumeration on the EnumValue object with identity ':TT:' and RID 721f6090.855624d0.1jnn7ps9k.5k4b3pv.5fl7va.jqd40bdl38lri7si71f0u
[8/13/20 4:17:06:182 PDT] 000001eb AssetImportCl E   Error importing asset
                                 com.ibm.iis.xmeta.importexport.exception.AssetImportDataException: 1 problem(s) occurred during asset import.
    at com.ibm.xmeta.service.importexport.ImportErrorStatus.makeDataException(ImportErrorStatus.java:79)

Cause

Orphans in valid enumeration for custom attribute

Resolving The Problem

Delete the orphan (most of them are duplicates) ValidEnumeration objects using xmetaAdmin command as below.

1. Below command will give the ValidEnumeration Object RIDs which are having associated Customattributes
./xmetaAdmin.sh query -expr 'select rid(ve), ve.name, rid(ca), ca.name from ve in ValidEnumeration, ca in ve->of_CustomAttributDef' http:///2.2/ASCLCustomAttribute.ecore -dbfile ../conf/database.properties

2. Below command will list all the ValidEnumeration object RIDs
./xmetaAdmin.sh query -expr 'select rid(ve), ve.name from ve in ValidEnumeration' http:///2.2/ASCLCustomAttribute.ecore -dbfile ../conf/database.properties

3. The RIDs which are present in (2) and not in (1) will be the orphan ValidEnumeration objects which need to be deleted. Copy those RIDS to another text file, say ridsToDelete.txt

4. Now, run below command to delete the orphan ValidEnumeration objects
./xmetaAdmin.sh deleteObjectsByRids -argfile /tmp/ridsToDelete.txt -dbfile ../conf/database.properties -nsuri http:///2.2/ASCLCustomAttribute.ecore

Please note, To get the nsuri for ASCLCustomAttribute model from your environment, run the following command:
./xmetaAdmin.sh listModels -dbfile ../conf/database.properties | grep ASCLCustomAttribute.ecore

Document Location

Worldwide

[{"Line of Business":{"code":"LOB10","label":"Data and AI"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSZJPZ","label":"IBM InfoSphere Information Server"},"ARM Category":[{"code":"a8m500000008XGjAAM","label":"Metadata Asset Manager - IMAM"}],"ARM Case Number":"TS002940851","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"11.7.1"}]

Document Information

Modified date:
30 September 2020

UID

ibm16335159