I am trying to import previously exported Object schema, but an error appears. Log can be downloaded via link: https://goo.gl/1ipD5p
Hi Artem!
Looking at the log I think I know the why it fails.
Error: ValidationInsightException: Validation errors were found: Errors: {name=Name has to be unique within the same object type}
This validation messages is thrown multiple times and indicates that you have names that are not unique in your object type(s). Basically this is a normal scenario under certain conditions.
This causes the possibility to have more than one object with the same name as the unique check was added after objects been created, possibly with the same name, and this will cause this error on import.
A possible way to solve this is to remove the unique checkbox on the object types in the original schema and do another export, and then set the checkboxes back again.
Best Regards
Alexander
Well, Alexander, I understand a possible way to solve this problem, but how can I easily find the objects with setted unique checkbox? I have tried to find this setted checkbox at more than 50 object types, but I haven't found it. I have also tried to find this parameter at XML-configuration of exported scheme,<uniqueAttribute>false</uniqueAttribute> is everywhere in the configuration. Can you show me step-by-step, how to find setted unique checkbox?
Hi Artem,
Looking at the link to the log you mentioned, I can see statements like this:
2018-02-07 04:34:20,923 [insight-ObjectSchemaImportServiceImpl-0-thread] | Unable to insert object type ObjectTypeBean [id=null, name=Contractor] will skip this object type, Error: ValidationInsightException: Validation errors were found: Errors: {name=Name has to be unique within the same object type}
So I would look at the mentioned Object Types, and review this setting, i.e check the configuration for the Name attribut.
Let us know the result.
Best Regards
Alexander
Thanks! There were 3 pairs of object types with the same name. Import of scheme has been done successfully!
Ok! Glad to hear that it got resolved :)
Hello!
I have the same problem but the error in log is
[insight-ObjectSchemaImportServiceImpl-0-thread] | Error when importing object schema and objects, object schema id: 2, Error: ValidationInsightException: Validation errors were found: Errors: {name=Name has to be unique in both global configuration and for this object schema.}
What does it mean? I checked my types and its haven't a setted unique checkbox
Hi,
In this case it means that you have duplicates of either References, Icons or Statuses. There can be only one of these types with the same name (these are case insensitive so CLOSED and Closed are considered to be duplicates).
Check your schema and see if you have some duplicate names of any of these and try to export again.
Cheers