Unable to open Import configuration in Insight

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問


プラットフォームについて: Server および Data Center のみ。この記事は、Server および Data Center プラットフォームのアトラシアン製品にのみ適用されます。

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Fisheye および Crucible は除く

    

要約


On certain Object Schemas, clicking on "Import" button inside Schema configuration throws this error: Something went wrong. Contact administrator




環境

Jira with Insight

診断

In the atlassian-jira.log this NullPointerException will appear:

2021-07-07 13:20:54,475+0200 http-nio-8080-exec-17 url: /rest/insight/1.0/importsource/objectschema/9; user: xxxxxx ERROR xxxxxx 800x13270x1 1jglmb6 10.9.56.9,10.9.8.21 /rest/insight/1.0/importsource/objectschema/9 [c.r.j.p.i.c.w.a.r.exception.mapper.DefaultMapper] Unexpected exception was thrown while processing the request
java.lang.NullPointerException
at com.riadalabs.jira.plugins.insight.services.validation.ValidateImportSourceImpl.validateImportSourceOT(ValidateImportSourceImpl.java:317)
at com.riadalabs.jira.plugins.insight.services.validation.ValidateImportSourceImpl.validateImportSourceOTForExecution(ValidateImportSourceImpl.java:144)
at com.riadalabs.jira.plugins.insight.services.core.impl.ImportSourceConfigurationServiceImpl.invalidateImportSourceOTIfInvalid(ImportSourceConfigurationServiceImpl.java:1404)
at com.riadalabs.jira.plugins.insight.services.core.impl.ImportSourceConfigurationServiceImpl.updateImportSourceStatus(ImportSourceConfigurationServiceImpl.java:1322)
at com.riadalabs.jira.plugins.insight.services.core.impl.ImportSourceConfigurationServiceImpl.findImportSourcesBySchema(ImportSourceConfigurationServiceImpl.java:167)
at com.riadalabs.jira.plugins.insight.channel.web.api.rest.services.imports.ImportSourceConfigurationResource.findImportSourceBySchema(ImportSourceConfigurationResource.java:80)

You can also observe:

2022-01-13 16:13:08,531+0000 http-nio-8080-exec-21 ERROR xxxxx xxxxx xxxx xxxxxx /rest/insight/1.0/importsource/objectschema/25 
[c.r.j.p.i.c.w.a.r.exception.mapper.DefaultMapper] Unexpected exception was thrown while processing the request 
java.lang.NullPointerException
at com.riadalabs.jira.plugins.insight.services.validation.ValidateImportSourceImpl.objectTypeAttributeBelongsToObjectType(ValidateImportSourceImpl.java:818)
at com.riadalabs.jira.plugins.insight.services.validation.ValidateImportSourceImpl.objectTypeAttributeBelongsToObjectType(ValidateImportSourceImpl.java:809)
at com.riadalabs.jira.plugins.insight.services.validation.ValidateImportSourceImpl.validateObjectTypeAttributeBelongsToObjectType(ValidateImportSourceImpl.java:763)
at com.riadalabs.jira.plugins.insight.services.validation.ValidateImportSourceImpl.validateAttributeConfigurations(ValidateImportSourceImpl.java:550)
at com.riadalabs.jira.plugins.insight.services.validation.ValidateImportSourceImpl.validateNonConformingConfiguration(ValidateImportSourceImpl.java:521)
at com.riadalabs.jira.plugins.insight.services.validation.ValidateImportSourceImpl.validateImportSourceOTForExecution(ValidateImportSourceImpl.java:145)

And also -

2022-09-13 08:24:19,770+0200 https-openssl-nio-453-exec-5 url: /rest/insight/1.0/importsource/objectschema/1; user: testuser ERROR testuser 504269921x1 nhgdye X.X.X.X /rest/insight/1.0/importsource/objectschema/1 [c.r.j.p.i.s.c.dal.impl.ImportSourceConfigurationDalImpl] Unable to assemble ImportSource with id 1
com.riadalabs.jira.plugins.insight.common.exception.ValidationInsightSystemException: ValidationInsightSystemException: Validation errors were found: noContext: ErrorMessage{i18nKey='Invalid type supplied -1', parameters=[], additionalMessage=null}; 
	at com.riadalabs.jira.plugins.insight.services.imports.model.importsource.ConfigurationStatusType.from(ConfigurationStatusType.java:32)
	at com.riadalabs.jira.plugins.insight.services.core.dal.impl.ImportSourceConfigurationDalImpl.assembleImportSource(ImportSourceConfigurationDalImpl.java:611)
	at com.riadalabs.jira.plugins.insight.services.core.dal.impl.ImportSourceConfigurationDalImpl.findImportSourcesBySchema(ImportSourceConfigurationDalImpl.java:79)
	

Diagnosis -1

  • Run the following SQL queries to find if there are any object type IDs which are there in the import source data but actually doesn't exist anymore:

    SELECT * FROM "AO_8542F1_IFJ_IMPORT_SRC_OT" WHERE "OBJECT_TYPE_ID" NOT IN (SELECT "ID" FROM "AO_8542F1_IFJ_OBJ_TYPE");
    SELECT * FROM "AO_8542F1_IFJ_IMPORT_SRC_OTA" WHERE "OBJECT_TYPE_ATTRIBUTE_ID" NOT IN (SELECT "ID" FROM "AO_8542F1_IFJ_OBJ_TYPE_ATTR");

    (info) Those queries should ideally return no rows. Only continue with the steps in Solution1 if any of the queries return results.

Diagnosis -2

  • If the above 2 queries do not return any results, then try the below one.  Replace X below with the object schema ID reported in the log.

    SELECT * FROM "AO_8542F1_IFJ_IMPORT_SRC" IMS
    LEFT OUTER JOIN "AO_8542F1_IFJ_IMPORT_SRC_OT" IMSOT ON IMS."ID" = IMSOT."IMPORT_SOURCE_ID"
    LEFT OUTER JOIN "AO_8542F1_IFJ_IMPORT_SRC_OTA" IMSOTA ON IMSOT."ID" = IMSOTA."IMPORT_SOURCE_OTID"
    WHERE IMS."OBJECT_SCHEMA_ID" = X
  • (info)  Only continue with the steps in Solution2 if any of the returned rows have data from AO_8542F1_IFJ_IMPORT_SRC table, and all empty or NULL values from the other 2 tables (AO_8542F1_IFJ_IMPORT_SRC_OT,AO_8542F1_IFJ_IMPORT_SRC_OTA). This means there are no records in the corresponding object type or object type attribute tables. It could be an orphan record in AO_8542F1_IFJ_IMPORT_SRC table which has an invalid status.
    • An example output is shared below.
      "CREATED","DATE_FORMAT","DATE_TIME_FORMAT","DEFAULT_CONCATENATOR","DEFAULT_EMPTY_VALUES","DEFAULT_UNKNOWN_VALUES","DESCRIPTION","ID","IMPORT_SOURCE_MODULE_KEY","JSON_CONFIGURATION","MODULE_VERSION","NAME","OBJECT_SCHEMA_ID","RUN_AS_USER_KEY","STATUS","SYNCHRONIZATION","SYNCHRONIZATION_ENABLED","UPDATED","CREATED","DESCRIPTION","EMPTY_VALUES","HANDLE_MISSING_OBJ_REFERENCES","HANDLE_MISSING_OBJ_TYPE","ID","IMPORT_SOURCE_ID","MATCH_IDENTIFIER_IGNORE_CASE","MISSING_OBJ_ATTR_ID","MISSING_OBJ_ATTR_VALUE","MISSING_OBJ_THRESHOLD","MISSING_OBJ_THRESHOLD_TYPE","OBJECT_TYPE_ID","PARENT_IMPORT_SOURCE_OTID","SELECTOR","SELECTOR_IQL","STATUS","UNKNOWN_VALUES","UPDATED","BASE64","CONCATENATOR","CREATED","DELIMITER","DESCRIPTION","EXTERNAL_DATA_LOCATOR","EXTERNAL_ID_PART","ID","IMPORT_SOURCE_OTID","OBJECT_TYPE_ATTRIBUTE_ID","REFERENCED_OBJECT_IQL","REGEXP","UPDATED"
      "2022-07-14 16:25:16.563","","","-",1,1,"",17,"rlabs-import-type-csv","{""importFromMode"":""url"",""url"":""file:///Users/testuser/support/temp/import.csv"",""userName"":""XXXX"",""password"":""XXXX"",""timeout"":"""",""defaultDelimiter"":"";"",""defaultEncoding"":""UTF-8""}",1,"MonitorImport",15,"JIRAUSER10000",0,"0 0 1 * * ?",True,"2022-12-18 17:33:31.554",NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL

原因

  • For Diagnosis-1: This could typically happen if the import configuration refers to an object type id which doesn't exist anymore possibly due to an incomplete delete operation.
  • For Diagnosis-2: This could happen if there is there an orphan record in "AO_8542F1_IFJ_IMPORT_SRC" table, that does not have any records from the corresponding object type or object type attribute tables. Probably with an invalid status too.

ソリューション

データベースの変更を行う場合は必ず事前にバックアップを取得してください。可能な場合は、まずステージング サーバーで SQL コマンドの変更、挿入、更新、または削除を行うようにします。

Solution -1 :

If one or more row(s) are returned by the SQL queries in the Diagnosis-1 section then it means we have one/more Object type or Type attributes IDs which do not actually exist anymore and hence returning the NULL causing the NullPointerException. We'd need to DELETE these entries:

DELETE FROM "AO_8542F1_IFJ_IMPORT_SRC_OT" WHERE "OBJECT_TYPE_ID" NOT IN (SELECT "ID" FROM "AO_8542F1_IFJ_OBJ_TYPE");
DELETE FROM "AO_8542F1_IFJ_IMPORT_SRC_OTA" WHERE "OBJECT_TYPE_ATTRIBUTE_ID" NOT IN (SELECT "ID" FROM "AO_8542F1_IFJ_OBJ_TYPE_ATTR");


Solution -2: 

We are trying to delete the orphan record in "AO_8542F1_IFJ_IMPORT_SRC" table, that does not have any records from the corresponding object type or object type attribute tables. And could also have an invalid status.

(info) Replace Y below with the ID returned in the SQL results ( From Diagnosis -2 ) for the row that has all NULL values except for the first table. This could probably have an invalid status.

DELETE FROM "AO_8542F1_IFJ_IMPORT_SRC" WHERE "ID" in (Y); 




最終更新日: 2022 年 12 月 19 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.