Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Can't import Object schema

Artem Dosuzhin February 6, 2018

 I am trying to import previously exported Object schema, but an error appears. Log can be downloaded via link: https://goo.gl/1ipD5p 

error.JPG

2 comments

Comment

Log in or Sign up to comment
Alexander Sundström
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 7, 2018

Hi Artem,

I could not download the log from the link.

Could you report this object schema export issue as an bug report at https://portal.riada.se/servicedesk/customer/portal/12 and also attach the log there?

Best Regards
Alexander

Artem Dosuzhin February 7, 2018

https://pastebin.com/C6XnDLQJ - this resource is available from everywhere. i attached log here

Alexander Sundström
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 9, 2018

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.

  1. You create a schema with object types and add objects
  2. You then select the Name attribute to be unique

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

Artem Dosuzhin February 25, 2018

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?

Alexander Sundström
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 26, 2018

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

Artem Dosuzhin February 26, 2018

Thanks! There were 3 pairs of object types with the same name. Import of scheme has been done successfully! 

Alexander Sundström
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 26, 2018

Ok! Glad to hear that it got resolved :)

Александр Чариков August 24, 2018

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

Ola_Melin
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 28, 2018

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

TAGS
AUG Leaders

Atlassian Community Events