Project Configurator for Jira Server and DC

Null Pointer Error

Problem: A null pointer error referring to Priority Schemes is displayed when exporting projects. When exporting projects, the export process fails with an error similar to below related to Priority Schemes.

An error occurred: Trying to export Priority scheme found error: null"

Stack trace:
java.lang.NullPointerException
at com.awnaba.projectconfigurator.objectalias.IdKeysCentral.keyFor(IdKeysCentral.java:158)
at com.awnaba.projectconfigurator.projectconfigserialize.PrioritySchemeGlobalTable.keyFor(PrioritySchemeGlobalTable.java:81)
at com.awnaba.projectconfigurator.projectconfigserialize.PrioritySchemeGlobalTable.keyFor(PrioritySchemeGlobalTable.java:1)
at com.awnaba.projectconfigurator.projectconfigserialize.AbstractGlobalTable.findOrInsertObject(AbstractGlobalTable.java:21)
at com.awnaba.projectconfigurator.projectconfigserialize.ProjectGlobalTable.dumpPriorityScheme(ProjectGlobalTable.java:193)
at com.awnaba.projectconfigurator.projectconfigserialize.ProjectGlobalTable.insert(ProjectGlobalTable.java:123)
at com.awnaba.projectconfigurator.projectconfigserialize.ProjectGlobalTable.insert(ProjectGlobalTable.java:1)
at com.awnaba.projectconfigurator.projectconfigserialize.AbstractGlobalTable$1.doAndReturn(AbstractGlobalTable.java:26)
at com.awnaba.projectconfigurator.projectconfigserialize.AbstractGlobalTable$1.doAndReturn(AbstractGlobalTable.java:1)
at com.awnaba.projectconfigurator.utils.SmartErrorReporter.wrapSafely(SmartErrorReporter.java:99)
at com.awnaba.projectconfigurator.projectconfigserialize.ProjectConfigSerializingContext.wrapSafely(ProjectConfigSerializingContext.java:434)
at com.awnaba.projectconfigurator.projectconfigserialize.AbstractGlobalTable.findOrInsertObject(AbstractGlobalTable.java:22)
at com.awnaba.projectconfigurator.projectconfigserialize.ProjectGlobalTable.findOrInsertObject(ProjectGlobalTable.java:58)
at com.awnaba.projectconfigurator.projectconfigserialize.ExportManager.dumpProjectConfig(ExportManager.java:297)
at com.awnaba.projectconfigurator.projectconfigserialize.ExportManager.createJAXBTree(ExportManager.java:258)
at com.awnaba.projectconfigurator.projectconfigserialize.ExportManager.dumpConfigurations(ExportManager.java:99)
at com.awnaba.projectconfigurator.operationsapi.impl.ProjectConfigExporterImpl.doExport(ProjectConfigExporterImpl.java:165)
at com.awnaba.projectconfigurator.operationsapi.impl.ProjectConfigExporterImpl.access$0(ProjectConfigExporterImpl.java:158)
at com.awnaba.projectconfigurator.operationsapi.impl.ProjectConfigExporterImpl$ConfigExporterTask.call(ProjectConfigExporterImpl.java:152)
at com.awnaba.projectconfigurator.operationsapi.impl.ProjectConfigExporterImpl$ConfigExporterTask.call(ProjectConfigExporterImpl.java:1)
at com.awnaba.projectconfigurator.longrunningtasks.TaskHelperImpl$WrappingTask.call(TaskHelperImpl.java:108)
at com.awnaba.projectconfigurator.longrunningtasks.TaskHelperImpl$WrappingTask.call(TaskHelperImpl.java:1)
at com.atlassian.jira.task.TaskManagerImpl$TaskCallableDecorator.call(TaskManagerImpl.java:458)
at com.atlassian.jira.task.TaskManagerImpl$TaskCallableDecorator.call(TaskManagerImpl.java:426)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at com.atlassian.jira.task.ForkedThreadExecutor$ForkedRunnableDecorator.run(ForkedThreadExecutor.java:216)
at java.lang.Thread.run(Thread.java:748)
This error can be caused when an instance has been upgraded from an older version where Priority Schemes did not exist and where the upgrade process did not create valid Priority Scheme configuration in some of the upgraded projects.

Solution: In order to work around this error, you will need to review the projects which you are exporting to ensure they all have a Priority Scheme configured and to ensure the Priority Scheme has a default priority set before generating a new export file to import from.