-
Bug
-
Resolution: Fixed
-
High
-
None
-
None
-
7
-
Severity 3 - Minor
Issue Summary
Migration of JSM project from server to cloud using JCMA fails if any queues in the project have a NULL value in the AO_54307E_QUEUE.JQL database column. The problem only occurs if the value is set to NULL. An empty string in this column works correctly. When the value is NULL, the project fails to migrate and an error that includes these lines is logged in atlassian-jira.log:
2022-07-14 15:09:11,273+0000 pool-42-thread-5 ERROR [c.a.j.m.export.framework.DefaultExportFailureHandler] 556f8603-3767-4a27-a8f6-bbc010ddddce: Exporting referenced entities by Servicedesk 1 failed <snip> at com.atlassian.jira.migration.export.db.servicedesk.queue.Queue.<init>(Queue.kt)
Steps to Reproduce
I have not found a way to get Jira to create a queue with a NULL value in the AO_54307E_QUEUE.JQL database column. When I create a queue and save it with no criteria restrictions, that database column is set to an empty string value. To reproduce the problem I used this query to change one of the empty string JQL values to NULL in the database:
update "AO_54307E_QUEUE" set "JQL" = NULL where "NAME" = 'My Queue Name'
Once that query is executed, perform a server to cloud migration using JCMA.
Expected Results
The JSM project should migrate to the cloud. The NULL value should be treated the same as an empty string value.
Actual Results
The JSM migration fails to migrate. An error like the one below is logged in atlassian-jira.log:
2022-07-14 15:09:11,273+0000 pool-42-thread-5 ERROR [c.a.j.m.export.framework.DefaultExportFailureHandler] 556f8603-3767-4a27-a8f6-bbc010ddddce: Exporting referenced entities by Servicedesk 1 failed com.querydsl.core.types.ExpressionException at com.querydsl.core.types.ConstructorExpression.newInstance(ConstructorExpression.java:149) at com.querydsl.core.group.GroupByBuilder$4.transform(GroupByBuilder.java:168) at com.querydsl.core.group.GroupByBuilder$4.transform(GroupByBuilder.java:156) at com.querydsl.core.group.GroupByMap.transform(GroupByMap.java:72) at com.querydsl.core.group.GroupByMap.transform(GroupByMap.java:35) at com.querydsl.core.support.FetchableQueryBase.transform(FetchableQueryBase.java:55) at com.atlassian.jira.migration.export.db.servicedesk.queue.QueueReader.getQueuesForProject$lambda-0(QueueReader.kt:25) at com.atlassian.pocketknife.internal.querydsl.DatabaseAccessorImpl.lambda$execute$0(DatabaseAccessorImpl.java:69) at com.atlassian.sal.core.rdbms.DefaultTransactionalExecutor.executeInternal(DefaultTransactionalExecutor.java:87) at com.atlassian.sal.core.rdbms.DefaultTransactionalExecutor.lambda$execute$0(DefaultTransactionalExecutor.java:43) at com.atlassian.jira.database.DatabaseAccessorImpl.runInManagedTransaction(DatabaseAccessorImpl.java:131) at jdk.internal.reflect.GeneratedMethodAccessor158.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at com.atlassian.plugin.util.ContextClassLoaderSettingInvocationHandler.invoke(ContextClassLoaderSettingInvocationHandler.java:26) at com.sun.proxy.$Proxy181.runInManagedTransaction(Unknown Source) at jdk.internal.reflect.GeneratedMethodAccessor158.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at com.atlassian.plugin.osgi.bridge.external.HostComponentFactoryBean$DynamicServiceInvocationHandler.invoke(HostComponentFactoryBean.java:130) at com.sun.proxy.$Proxy181.runInManagedTransaction(Unknown Source) at com.atlassian.sal.jira.rdbms.JiraHostConnectionAccessor.runInStartedOrExistingTransaction(JiraHostConnectionAccessor.java:130) at com.atlassian.sal.jira.rdbms.JiraHostConnectionAccessor.execute(JiraHostConnectionAccessor.java:60) at com.atlassian.sal.core.rdbms.DefaultTransactionalExecutor.execute(DefaultTransactionalExecutor.java:40) at com.atlassian.pocketknife.internal.querydsl.DatabaseAccessorImpl.execute(DatabaseAccessorImpl.java:67) at com.atlassian.pocketknife.internal.querydsl.DatabaseAccessorImpl.runInTransaction(DatabaseAccessorImpl.java:43) at com.atlassian.pocketknife.api.querydsl.DatabaseAccessor.run(DatabaseAccessor.java:201) at com.atlassian.jira.migration.export.db.servicedesk.queue.QueueReader.getQueuesForProject(QueueReader.kt:18) at com.atlassian.jira.migration.export.servicedesk.ServiceDeskExporter.exportQueues(ServiceDeskExporter.kt:129) at com.atlassian.jira.migration.export.servicedesk.ServiceDeskExporter$childrenActions$1.invoke(ServiceDeskExporter.kt:102) at com.atlassian.jira.migration.export.servicedesk.ServiceDeskExporter$childrenActions$1.invoke(ServiceDeskExporter.kt:101) at com.atlassian.jira.migration.export.framework.ExportService.continueWithChildrenActions(ExportService.kt:310) at com.atlassian.jira.migration.export.framework.ExportService.exportByEntityImpl(ExportService.kt:239) at com.atlassian.jira.migration.export.framework.ExportService.exportByEntityImpl$default(ExportService.kt:215) at com.atlassian.jira.migration.export.framework.ExportService.exportOrThrow(ExportService.kt:116) at com.atlassian.jira.migration.export.framework.ExportService.exportOrThrow$default(ExportService.kt:110) at com.atlassian.jira.migration.export.servicedesk.service.JsdExportServiceImpl.exportServiceDesk(JsdExportServiceImpl.kt:31) at com.atlassian.jira.migration.export.core.project.ProjectExporter.exportServiceDesk(ProjectExporter.kt:304) at com.atlassian.jira.migration.export.core.project.ProjectExporter.access$exportServiceDesk(ProjectExporter.kt:67) at com.atlassian.jira.migration.export.core.project.ProjectExporter$childrenActions$3.invoke(ProjectExporter.kt:177) at com.atlassian.jira.migration.export.core.project.ProjectExporter$childrenActions$3.invoke(ProjectExporter.kt:174) at com.atlassian.jira.migration.export.framework.ExportService.continueWithChildrenActions(ExportService.kt:310) at com.atlassian.jira.migration.export.framework.ExportService.exportByEntityImpl(ExportService.kt:239) at com.atlassian.jira.migration.export.framework.ExportService.exportByEntityImpl$default(ExportService.kt:215) at com.atlassian.jira.migration.export.framework.ExportService.exportOrThrow(ExportService.kt:116) at com.atlassian.jira.migration.export.framework.ExportService.exportOrThrow$default(ExportService.kt:110) at com.atlassian.jira.migration.export.ExportFacade.exportProjectData(ExportFacade.kt:162) at com.atlassian.jira.migration.workers.AbstractProjectProcessor$exportProjectData$1.invoke(AbstractProjectProcessor.kt:154) at com.atlassian.jira.migration.workers.AbstractProjectProcessor$exportProjectData$1.invoke(AbstractProjectProcessor.kt:145) at com.atlassian.jira.migration.tracking.tasks.OperationProcessor$runTimedOperationWithResult$1.invoke(OperationProcessor.kt:52) at com.atlassian.jira.migration.events.JiraEventDetectionService.runAndDetect(JiraEventDetectionService.kt:69) at com.atlassian.jira.migration.tracking.tasks.OperationProcessor.runTimedOperationWithResult(OperationProcessor.kt:49) at com.atlassian.jira.migration.workers.AbstractProjectProcessor.exportProjectData(AbstractProjectProcessor.kt:145) at com.atlassian.jira.migration.workers.AbstractProjectProcessor.process(AbstractProjectProcessor.kt:66) at com.atlassian.jira.migration.workers.ProjectsWorker.process(ProjectsWorker.kt:80) at com.atlassian.jira.migration.tracking.polling.Poller.dispatchTask(Poller.kt:148) at com.atlassian.jira.migration.tracking.polling.Poller.pollForTaskAndDispatch(Poller.kt:143) at com.atlassian.jira.migration.tracking.polling.Poller.pollForTaskAndDispatchNoThrow(Poller.kt:82) at com.atlassian.jira.migration.tracking.polling.Poller.doPoll(Poller.kt:67) at com.atlassian.jira.migration.tracking.polling.AbstractPoller.execute(AbstractPoller.kt:62) at com.atlassian.jira.migration.tracking.polling.AbstractPoller.access$execute(AbstractPoller.kt:16) at com.atlassian.jira.migration.tracking.polling.AbstractPoller$startPolling$1.invoke(AbstractPoller.kt:35) at com.atlassian.jira.migration.tracking.polling.AbstractPoller$startPolling$1.invoke(AbstractPoller.kt:35) at com.atlassian.jira.migration.tracking.utils.ThreadUtils.safeExecutePeriodicallyUntilStopped(ThreadUtils.kt:43) at com.atlassian.jira.migration.tracking.polling.AbstractPoller.startPolling(AbstractPoller.kt:34) at com.atlassian.jira.migration.tracking.MigrationTracker.addAndStartWorkPoller$lambda-4$lambda-3(MigrationTracker.kt:78) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) 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) Caused by: java.lang.reflect.InvocationTargetException at jdk.internal.reflect.GeneratedConstructorAccessor555.newInstance(Unknown Source) at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490) at com.querydsl.core.types.ConstructorExpression.newInstance(ConstructorExpression.java:141) ... 70 more at com.atlassian.jira.migration.export.db.servicedesk.queue.Queue.<init>(Queue.kt) ... 74 more
Workaround
Locate the queue(s) that have a NULL value in the JQL column on the Jira server database using this SQL query:
select * from "AO_54307E_QUEUE" where "JQL" is NULL
If there are any results, use this SQL query to change the JQL value from NULL to an empty string:
update "AO_54307E_QUEUE" set "JQL" = '' where "JQL" is NULL
Alternatively, once the queue in question is located, go to that queue in the Jira application, edit the queue, and then click the Save button. This will convert the JQL value from NULL to an empty string.
- mentioned in
-
Page Loading...