Uploaded image for project: 'Jira Service Management Data Center'
  1. Jira Service Management Data Center
  2. JSDSERVER-7311

Object schema zip import failed with Import file not found error if the Insight import directory is a symlink or in a symlink directory

      Issue Summary

      Object schema zip import failed with Import file not found error if the Insight import directory is a symlink or in a symlink directory

      Steps to Reproduce

      1. On a Jira Data center instance, set up symlink for the shared home directory and use it. Example:
        $ ln -s /Users/support/jiradc/sharedhome /Users/jira/directory/sharedhome
        $ pwd
        /Users/jira/directory/
        $ ls -al
        rwxr-xr-x   1 support  staff     37 Apr 21 11:25 sharedhome -> /Users/support/jiradc/sharedhome
        

        In the cluster.properties file, make sure the jira.shared.home is pointing to the symlink correctly.

      2. Create an object schema and export it as a zip file as per Object Schema Export. Make sure the zip file is exported to the export/insight folder in the symlink directory.
      3. Copy the zip file from the <symlink>/export/insight folder into <symlink>/import/insight folder.
      4. Import the zip file as per Object Schema Import.

      Expected Results

      The object schema is imported successfully

      Actual Results

      • The import failed with error "NotFoundInsightException: Import file not found" on the screen.
      • If you check the <Jira_installation>/temp directory, you will find empty folder with name like "insight_import<a string of numbers>" for every failed attempt of object schema zip import.
      • The below exception is thrown in the insight_objectschema_import.log file:
        2021-04-21 11:48:40,787 [http-nio-1121-exec-3] | Initial error, when unzipping file: , Error: NotFoundInsightException: Import file not found
        com.riadalabs.jira.plugins.insight.common.exception.NotFoundInsightException: NotFoundInsightException: Import file not found
        	at com.riadalabs.jira.plugins.insight.services.imports.schema.ObjectSchemaImportServiceImpl.validateFilePath(ObjectSchemaImportServiceImpl.java:928)
        	at com.riadalabs.jira.plugins.insight.services.imports.schema.ObjectSchemaImportServiceImpl.unzipImportFile(ObjectSchemaImportServiceImpl.java:917)
        	at com.riadalabs.jira.plugins.insight.services.imports.schema.ObjectSchemaImportServiceImpl.shouldWarnBeforeImport(ObjectSchemaImportServiceImpl.java:865)
        	at com.riadalabs.jira.plugins.insight.channel.web.api.rest.services.ObjectSchemaImportResource.noWarnings(ObjectSchemaImportResource.java:120)
        ...
        2021-04-21 11:48:40,821 [http-nio-1121-exec-1] | Resource: Import object schema to server, in data:com.riadalabs.jira.plugins.insight.channel.web.api.rest.model.imports.schema.ImportObjectSchemaInEntry@53ebc5e6[fileName=testexport.zip,objectSchemaName=IXHG,objectSchemaKey=IXHG,objectSchemaDescription=<null>,password=<null>,includeObjects=true,importAttachments=true,importObjectAvatars=true]
        

      Workaround

      Do not use symlink for the Insight import folder

            [JSDSERVER-7311] Object schema zip import failed with Import file not found error if the Insight import directory is a symlink or in a symlink directory

            Satej Mirpagar made changes -
            Resolution New: Fixed [ 1 ]
            Status Original: Waiting for Release [ 12075 ] New: Closed [ 6 ]
            SET Analytics Bot made changes -
            UIS Original: 44 New: 42
            SET Analytics Bot made changes -
            UIS Original: 46 New: 44
            Nick Turskyi - public name made changes -
            Fix Version/s Original: 4.20.19 [ 104608 ]
            Fix Version/s New: 4.20.20 [ 104630 ]
            SET Analytics Bot made changes -
            UIS Original: 48 New: 46
            Marc Dacanay made changes -
            Remote Link New: This issue links to "Page (Confluence)" [ 733800 ]
            Sam Xu made changes -
            Fix Version/s New: 5.4.4 [ 104715 ]
            Fix Version/s New: 4.20.19 [ 104608 ]
            Fix Version/s New: 5.7.0 [ 104602 ]
            Sam Xu made changes -
            Status Original: In Progress [ 3 ] New: Waiting for Release [ 12075 ]
            Sam Xu made changes -
            Assignee New: Sam Xu [ jxu2@atlassian.com ]
            Sam Xu made changes -
            Status Original: Gathering Impact [ 12072 ] New: In Progress [ 3 ]

              jxu2@atlassian.com Sam Xu
              michin Michelle Chin
              Affected customers:
              12 This affects my team
              Watchers:
              15 Start watching this issue

                Created:
                Updated:
                Resolved: