-
Bug
-
Resolution: Fixed
-
Medium
-
Mindville - Pre Bundled, 4.16.0
-
11
-
Severity 3 - Minor
-
42
-
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
- 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.
- 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.
- Copy the zip file from the <symlink>/export/insight folder into <symlink>/import/insight folder.
- 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
Resolution | New: Fixed [ 1 ] | |
Status | Original: Waiting for Release [ 12075 ] | New: Closed [ 6 ] |
UIS | Original: 44 | New: 42 |
UIS | Original: 46 | New: 44 |
Fix Version/s | Original: 4.20.19 [ 104608 ] | |
Fix Version/s | New: 4.20.20 [ 104630 ] |
UIS | Original: 48 | New: 46 |
Remote Link | New: This issue links to "Page (Confluence)" [ 733800 ] |
Fix Version/s | New: 5.4.4 [ 104715 ] | |
Fix Version/s | New: 4.20.19 [ 104608 ] | |
Fix Version/s | New: 5.7.0 [ 104602 ] |
Status | Original: In Progress [ 3 ] | New: Waiting for Release [ 12075 ] |
Assignee | New: Sam Xu [ jxu2@atlassian.com ] |
Status | Original: Gathering Impact [ 12072 ] | New: In Progress [ 3 ] |