Issue Summary

      Importing Object Schema ends up in error and does not import any objects

      This is reproducible on Data Center: yes

      Steps to Reproduce

      1. Create and Object Schema export (zip file)
      2. Import the Schema zip file on another instance

      Expected Results

      The Schema gets imported without any problems.

      Actual Results

      The import process finishes in erroneous state and does not import any objects.

      The below exception is thrown in thei nsight_objectschema_import.log file:

      2023-11-21 11:37:04,913+0000 insight-InsightThreadGroup-worker-thread-15 ERROR lipkase 696x811974x1 ig6upg 77.10.1.157,10.4.6.199,10.3.19.10 /rest/insight/1.0/objectschemaimport/import/server [c.r.j.p.i.s.imports.schema.ObjectSchemaImportServiceImpl] Failed to read from jira-configuration.xml from dir: /opt/atlassian/jira/temp/insight_import1049541240897247450
      java.io.FileNotFoundException: /opt/atlassian/jira/temp/insight_import1049541240897247450/jira-configuration.xml (No such file or directory)
      	at java.base/java.io.FileInputStream.open0(Native Method)
      	at java.base/java.io.FileInputStream.open(FileInputStream.java:219)
      	at java.base/java.io.FileInputStream.<init>(FileInputStream.java:157)
      	at com.riadalabs.jira.plugins.insight.services.imports.schema.ObjectSchemaImportServiceImpl.readImportJIRAConfigurationXml(ObjectSchemaImportServiceImpl.java:1215)
      	at com.riadalabs.jira.plugins.insight.services.imports.schema.ObjectSchemaImportServiceImpl.importObjectSchemaWithObjects(ObjectSchemaImportServiceImpl.java:438)
      	at com.riadalabs.jira.plugins.insight.services.imports.schema.ObjectSchemaImportServiceImpl.lambda$importObjectSchemaDefinition$0(ObjectSchemaImportServiceImpl.java:302)
      	at com.atlassian.sal.core.executor.ThreadLocalDelegateCallable.call(ThreadLocalDelegateCallable.java:38)
      	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
      	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
      	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
      	at java.base/java.lang.Thread.run(Thread.java:829)

      followed by

      2023-11-21 11:37:04,913 [insight-InsightThreadGroup-worker-thread-15] | Error when importing object schema and objects, object schema id: 8
      java.lang.NullPointerException
      	at com.riadalabs.jira.plugins.insight.services.imports.schema.ObjectSchemaImportServiceImpl.importObjects(ObjectSchemaImportServiceImpl.java:1362)
      	at com.riadalabs.jira.plugins.insight.services.imports.schema.ObjectSchemaImportServiceImpl.importObjectSchemaWithObjects(ObjectSchemaImportServiceImpl.java:443)
      	at com.riadalabs.jira.plugins.insight.services.imports.schema.ObjectSchemaImportServiceImpl.lambda$importObjectSchemaDefinition$0(ObjectSchemaImportServiceImpl.java:302)
      	at com.atlassian.sal.core.executor.ThreadLocalDelegateCallable.call(ThreadLocalDelegateCallable.java:38)
      	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
      	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
      	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
      	at java.base/java.lang.Thread.run(Thread.java:829)
      

      Workaround

      Try to recreate a new zip file (make sure it is without a password) - example:

      • On Jira server, extract the files from the zip file
      • Add the files to a new zip archive without any password
      • Try re-importing the file

      If workaround above does not work, you can:

          Form Name

            [JSDSERVER-15086] Importing Object Schema ends up in error and does not import any objects

            SET Analytics Bot made changes -
            UIS Original: 2 New: 1
            Marc Dacanay made changes -
            Labels Original: ltsr ril New: ril
            Marc Dacanay made changes -
            Labels Original: ltsr New: ltsr ril
            Marc Dacanay made changes -
            Remote Link New: This issue links to "Internal ticket (Web Link)" [ 956061 ]
            Marc Dacanay made changes -
            Labels New: ltsr
            Bartosz Ornatowski made changes -
            Status Original: Needs Triage [ 10030 ] New: Gathering Impact [ 12072 ]
            Marko Filipan made changes -
            Description Original: h3. Issue Summary

            Importing Object Schema ends up in error and does not import any objects

            This is reproducible on Data Center: yes
            h3. Steps to Reproduce
             # Create and Object Schema export (zip file)
             # Import the Schema zip file on another instance

            h3. Expected Results

            The Schema gets imported without any problems.
            h3. Actual Results

            The import process finishes in erroneous state and does not import any objects.
            !image-2024-02-01-10-45-59-801.png!

            The below exception is thrown in thei nsight_objectschema_import.log file:
            {noformat}
            2023-11-21 11:37:04,913+0000 insight-InsightThreadGroup-worker-thread-15 ERROR lipkase 696x811974x1 ig6upg 77.10.1.157,10.4.6.199,10.3.19.10 /rest/insight/1.0/objectschemaimport/import/server [c.r.j.p.i.s.imports.schema.ObjectSchemaImportServiceImpl] Failed to read from jira-configuration.xml from dir: /opt/atlassian/jira/temp/insight_import1049541240897247450
            java.io.FileNotFoundException: /opt/atlassian/jira/temp/insight_import1049541240897247450/jira-configuration.xml (No such file or directory)
            at java.base/java.io.FileInputStream.open0(Native Method)
            at java.base/java.io.FileInputStream.open(FileInputStream.java:219)
            at java.base/java.io.FileInputStream.<init>(FileInputStream.java:157)
            at com.riadalabs.jira.plugins.insight.services.imports.schema.ObjectSchemaImportServiceImpl.readImportJIRAConfigurationXml(ObjectSchemaImportServiceImpl.java:1215)
            at com.riadalabs.jira.plugins.insight.services.imports.schema.ObjectSchemaImportServiceImpl.importObjectSchemaWithObjects(ObjectSchemaImportServiceImpl.java:438)
            at com.riadalabs.jira.plugins.insight.services.imports.schema.ObjectSchemaImportServiceImpl.lambda$importObjectSchemaDefinition$0(ObjectSchemaImportServiceImpl.java:302)
            at com.atlassian.sal.core.executor.ThreadLocalDelegateCallable.call(ThreadLocalDelegateCallable.java:38)
            at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
            at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
            at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
            at java.base/java.lang.Thread.run(Thread.java:829){noformat}
            followed by
            {noformat}
            2023-11-21 11:37:04,913 [insight-InsightThreadGroup-worker-thread-15] | Error when importing object schema and objects, object schema id: 8
            java.lang.NullPointerException
            at com.riadalabs.jira.plugins.insight.services.imports.schema.ObjectSchemaImportServiceImpl.importObjects(ObjectSchemaImportServiceImpl.java:1362)
            at com.riadalabs.jira.plugins.insight.services.imports.schema.ObjectSchemaImportServiceImpl.importObjectSchemaWithObjects(ObjectSchemaImportServiceImpl.java:443)
            at com.riadalabs.jira.plugins.insight.services.imports.schema.ObjectSchemaImportServiceImpl.lambda$importObjectSchemaDefinition$0(ObjectSchemaImportServiceImpl.java:302)
            at com.atlassian.sal.core.executor.ThreadLocalDelegateCallable.call(ThreadLocalDelegateCallable.java:38)
            at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
            at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
            at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
            at java.base/java.lang.Thread.run(Thread.java:829)
            {noformat}
            h3. Workaround

            If zip is using password, try to recreate the zip file without a password - example:
             * On Jira server, extract the files from the zip file
             * Add the files to a new zip archive without any password
             * Try re-importing the file

            If workaround above does not work, you can:
             * Use the [REST API|https://confluence.atlassian.com/display/JIRAKB/How+to+import+Assets+object+schema+using+REST+API] method to import the schema.
             * Use [Object schema import type|https://confluence.atlassian.com/servicemanagementserver/object-schema-import-1044784494.html] to import the data from the source Jira instance directly.
            New: h3. Issue Summary

            Importing Object Schema ends up in error and does not import any objects

            This is reproducible on Data Center: yes
            h3. Steps to Reproduce
             # Create and Object Schema export (zip file)
             # Import the Schema zip file on another instance

            h3. Expected Results

            The Schema gets imported without any problems.
            h3. Actual Results

            The import process finishes in erroneous state and does not import any objects.
            !image-2024-02-01-10-45-59-801.png!

            The below exception is thrown in thei nsight_objectschema_import.log file:
            {noformat}
            2023-11-21 11:37:04,913+0000 insight-InsightThreadGroup-worker-thread-15 ERROR lipkase 696x811974x1 ig6upg 77.10.1.157,10.4.6.199,10.3.19.10 /rest/insight/1.0/objectschemaimport/import/server [c.r.j.p.i.s.imports.schema.ObjectSchemaImportServiceImpl] Failed to read from jira-configuration.xml from dir: /opt/atlassian/jira/temp/insight_import1049541240897247450
            java.io.FileNotFoundException: /opt/atlassian/jira/temp/insight_import1049541240897247450/jira-configuration.xml (No such file or directory)
            at java.base/java.io.FileInputStream.open0(Native Method)
            at java.base/java.io.FileInputStream.open(FileInputStream.java:219)
            at java.base/java.io.FileInputStream.<init>(FileInputStream.java:157)
            at com.riadalabs.jira.plugins.insight.services.imports.schema.ObjectSchemaImportServiceImpl.readImportJIRAConfigurationXml(ObjectSchemaImportServiceImpl.java:1215)
            at com.riadalabs.jira.plugins.insight.services.imports.schema.ObjectSchemaImportServiceImpl.importObjectSchemaWithObjects(ObjectSchemaImportServiceImpl.java:438)
            at com.riadalabs.jira.plugins.insight.services.imports.schema.ObjectSchemaImportServiceImpl.lambda$importObjectSchemaDefinition$0(ObjectSchemaImportServiceImpl.java:302)
            at com.atlassian.sal.core.executor.ThreadLocalDelegateCallable.call(ThreadLocalDelegateCallable.java:38)
            at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
            at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
            at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
            at java.base/java.lang.Thread.run(Thread.java:829){noformat}
            followed by
            {noformat}
            2023-11-21 11:37:04,913 [insight-InsightThreadGroup-worker-thread-15] | Error when importing object schema and objects, object schema id: 8
            java.lang.NullPointerException
            at com.riadalabs.jira.plugins.insight.services.imports.schema.ObjectSchemaImportServiceImpl.importObjects(ObjectSchemaImportServiceImpl.java:1362)
            at com.riadalabs.jira.plugins.insight.services.imports.schema.ObjectSchemaImportServiceImpl.importObjectSchemaWithObjects(ObjectSchemaImportServiceImpl.java:443)
            at com.riadalabs.jira.plugins.insight.services.imports.schema.ObjectSchemaImportServiceImpl.lambda$importObjectSchemaDefinition$0(ObjectSchemaImportServiceImpl.java:302)
            at com.atlassian.sal.core.executor.ThreadLocalDelegateCallable.call(ThreadLocalDelegateCallable.java:38)
            at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
            at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
            at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
            at java.base/java.lang.Thread.run(Thread.java:829)
            {noformat}
            h3. Workaround

            Try to recreate a new zip file (make sure it is without a password) - example:
             * On Jira server, extract the files from the zip file
             * Add the files to a new zip archive without any password
             * Try re-importing the file

            If workaround above does not work, you can:
             * Use the [REST API|https://confluence.atlassian.com/display/JIRAKB/How+to+import+Assets+object+schema+using+REST+API] method to import the schema.
             * Use [Object schema import type|https://confluence.atlassian.com/servicemanagementserver/object-schema-import-1044784494.html] to import the data from the source Jira instance directly.
            SET Analytics Bot made changes -
            UIS New: 2
            SET Analytics Bot made changes -
            Support reference count New: 1
            Marko Filipan made changes -
            Description Original: h3. Issue Summary

            Importing Object Schema ends up in error and does not import any objects

            This is reproducible on Data Center: yes
            h3. Steps to Reproduce
             # Create and Object Schema export (zip file)
             # Import the Schema zip file on another instance

            h3. Expected Results

            The Schema gets imported without any problems.
            h3. Actual Results

            The import process finishes in erroneous state and does not import any objects.

            The below exception is thrown in thei nsight_objectschema_import.log file:
            {noformat}
            2023-11-21 11:37:04,913+0000 insight-InsightThreadGroup-worker-thread-15 ERROR lipkase 696x811974x1 ig6upg 77.10.1.157,10.4.6.199,10.3.19.10 /rest/insight/1.0/objectschemaimport/import/server [c.r.j.p.i.s.imports.schema.ObjectSchemaImportServiceImpl] Failed to read from jira-configuration.xml from dir: /opt/atlassian/jira/temp/insight_import1049541240897247450
            java.io.FileNotFoundException: /opt/atlassian/jira/temp/insight_import1049541240897247450/jira-configuration.xml (No such file or directory)
            at java.base/java.io.FileInputStream.open0(Native Method)
            at java.base/java.io.FileInputStream.open(FileInputStream.java:219)
            at java.base/java.io.FileInputStream.<init>(FileInputStream.java:157)
            at com.riadalabs.jira.plugins.insight.services.imports.schema.ObjectSchemaImportServiceImpl.readImportJIRAConfigurationXml(ObjectSchemaImportServiceImpl.java:1215)
            at com.riadalabs.jira.plugins.insight.services.imports.schema.ObjectSchemaImportServiceImpl.importObjectSchemaWithObjects(ObjectSchemaImportServiceImpl.java:438)
            at com.riadalabs.jira.plugins.insight.services.imports.schema.ObjectSchemaImportServiceImpl.lambda$importObjectSchemaDefinition$0(ObjectSchemaImportServiceImpl.java:302)
            at com.atlassian.sal.core.executor.ThreadLocalDelegateCallable.call(ThreadLocalDelegateCallable.java:38)
            at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
            at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
            at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
            at java.base/java.lang.Thread.run(Thread.java:829){noformat}
            followed by
            {noformat}
            2023-11-21 11:37:04,913 [insight-InsightThreadGroup-worker-thread-15] | Error when importing object schema and objects, object schema id: 8
            java.lang.NullPointerException
            at com.riadalabs.jira.plugins.insight.services.imports.schema.ObjectSchemaImportServiceImpl.importObjects(ObjectSchemaImportServiceImpl.java:1362)
            at com.riadalabs.jira.plugins.insight.services.imports.schema.ObjectSchemaImportServiceImpl.importObjectSchemaWithObjects(ObjectSchemaImportServiceImpl.java:443)
            at com.riadalabs.jira.plugins.insight.services.imports.schema.ObjectSchemaImportServiceImpl.lambda$importObjectSchemaDefinition$0(ObjectSchemaImportServiceImpl.java:302)
            at com.atlassian.sal.core.executor.ThreadLocalDelegateCallable.call(ThreadLocalDelegateCallable.java:38)
            at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
            at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
            at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
            at java.base/java.lang.Thread.run(Thread.java:829)
            {noformat}

            h3. Workaround

            If zip is using password, try to recreate the zip file without a password - example:
             * On Jira server, extract the files from the zip file
             * Add the files to a new zip archive without any password
             * Try re-importing the file

            If workaround above does not work, you can:
             * Use the [REST API|https://confluence.atlassian.com/display/JIRAKB/How+to+import+Assets+object+schema+using+REST+API] method to import the schema.
             * Use [Object schema import type|https://confluence.atlassian.com/servicemanagementserver/object-schema-import-1044784494.html] to import the data from the source Jira instance directly.
            New: h3. Issue Summary

            Importing Object Schema ends up in error and does not import any objects

            This is reproducible on Data Center: yes
            h3. Steps to Reproduce
             # Create and Object Schema export (zip file)
             # Import the Schema zip file on another instance

            h3. Expected Results

            The Schema gets imported without any problems.
            h3. Actual Results

            The import process finishes in erroneous state and does not import any objects.
            !image-2024-02-01-10-45-59-801.png!

            The below exception is thrown in thei nsight_objectschema_import.log file:
            {noformat}
            2023-11-21 11:37:04,913+0000 insight-InsightThreadGroup-worker-thread-15 ERROR lipkase 696x811974x1 ig6upg 77.10.1.157,10.4.6.199,10.3.19.10 /rest/insight/1.0/objectschemaimport/import/server [c.r.j.p.i.s.imports.schema.ObjectSchemaImportServiceImpl] Failed to read from jira-configuration.xml from dir: /opt/atlassian/jira/temp/insight_import1049541240897247450
            java.io.FileNotFoundException: /opt/atlassian/jira/temp/insight_import1049541240897247450/jira-configuration.xml (No such file or directory)
            at java.base/java.io.FileInputStream.open0(Native Method)
            at java.base/java.io.FileInputStream.open(FileInputStream.java:219)
            at java.base/java.io.FileInputStream.<init>(FileInputStream.java:157)
            at com.riadalabs.jira.plugins.insight.services.imports.schema.ObjectSchemaImportServiceImpl.readImportJIRAConfigurationXml(ObjectSchemaImportServiceImpl.java:1215)
            at com.riadalabs.jira.plugins.insight.services.imports.schema.ObjectSchemaImportServiceImpl.importObjectSchemaWithObjects(ObjectSchemaImportServiceImpl.java:438)
            at com.riadalabs.jira.plugins.insight.services.imports.schema.ObjectSchemaImportServiceImpl.lambda$importObjectSchemaDefinition$0(ObjectSchemaImportServiceImpl.java:302)
            at com.atlassian.sal.core.executor.ThreadLocalDelegateCallable.call(ThreadLocalDelegateCallable.java:38)
            at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
            at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
            at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
            at java.base/java.lang.Thread.run(Thread.java:829){noformat}
            followed by
            {noformat}
            2023-11-21 11:37:04,913 [insight-InsightThreadGroup-worker-thread-15] | Error when importing object schema and objects, object schema id: 8
            java.lang.NullPointerException
            at com.riadalabs.jira.plugins.insight.services.imports.schema.ObjectSchemaImportServiceImpl.importObjects(ObjectSchemaImportServiceImpl.java:1362)
            at com.riadalabs.jira.plugins.insight.services.imports.schema.ObjectSchemaImportServiceImpl.importObjectSchemaWithObjects(ObjectSchemaImportServiceImpl.java:443)
            at com.riadalabs.jira.plugins.insight.services.imports.schema.ObjectSchemaImportServiceImpl.lambda$importObjectSchemaDefinition$0(ObjectSchemaImportServiceImpl.java:302)
            at com.atlassian.sal.core.executor.ThreadLocalDelegateCallable.call(ThreadLocalDelegateCallable.java:38)
            at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
            at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
            at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
            at java.base/java.lang.Thread.run(Thread.java:829)
            {noformat}
            h3. Workaround

            If zip is using password, try to recreate the zip file without a password - example:
             * On Jira server, extract the files from the zip file
             * Add the files to a new zip archive without any password
             * Try re-importing the file

            If workaround above does not work, you can:
             * Use the [REST API|https://confluence.atlassian.com/display/JIRAKB/How+to+import+Assets+object+schema+using+REST+API] method to import the schema.
             * Use [Object schema import type|https://confluence.atlassian.com/servicemanagementserver/object-schema-import-1044784494.html] to import the data from the source Jira instance directly.

              Unassigned Unassigned
              mfilipan Marko Filipan
              Affected customers:
              0 This affects my team
              Watchers:
              2 Start watching this issue

                Created:
                Updated: