-
Bug
-
Resolution: Fixed
-
High
-
None
-
JCMA - 1.7.3
-
None
-
18
-
Minor
Issue Summary
This is reproducible on Data Center: (no)
Steps to Reproduce
- Portfolio for Jira/Advanced Roadmaps, MSSQL 15.0, JCMA v1.7.3, Jira Software 8.22.2
- Create a migration plan and run the pre-flight check
- Data preparation will fail to complete
Expected Results
- Data preparation should complete
Actual Results
Error from logs:
Caused by: com.querydsl.core.QueryException: Caught SQLServerException for select "AO_D9132D_ISSUE_SOURCE"."ID", "AO_D9132D_ISSUE_SOURCE"."CONVERSION_FACTOR", "AO_D9132D_ISSUE_SOURCE"."PLAN_ID", "AO_D9132D_ISSUE_SOURCE"."SOURCE_TYPE", "AO_D9132D_ISSUE_SOURCE"."SOURCE_VALUE" from "dbo"."AO_D9132D_ISSUE_SOURCE" "AO_D9132D_ISSUE_SOURCE" where "AO_D9132D_ISSUE_SOURCE"."SOURCE_VALUE" is null or len("AO_D9132D_ISSUE_SOURCE"."SOURCE_VALUE") = 0 or "AO_D9132D_ISSUE_SOURCE"."SOURCE_TYPE" = 'Project' and not ("AO_D9132D_ISSUE_SOURCE"."SOURCE_VALUE" in (select cast("PROJECT"."ID" as varchar) from "dbo"."project" "PROJECT")) or "AO_D9132D_ISSUE_SOURCE"."SOURCE_TYPE" = 'Filter' and not ("AO_D9132D_ISSUE_SOURCE"."SOURCE_VALUE" in (select cast("SEARCHREQUEST"."ID" as varchar) from "dbo"."searchrequest" "SEARCHREQUEST")) or "AO_D9132D_ISSUE_SOURCE"."SOURCE_TYPE" = 'Board' and not ("AO_D9132D_ISSUE_SOURCE"."SOURCE_VALUE" in ('1', '2', '3', '4', '5', '6', '7', '8', '9', '11', '12', '13', '14', '15', '17', '18', '19', '20', ... at com.querydsl.sql.DefaultSQLExceptionTranslator.translate(DefaultSQLExceptionTranslator.java:50) at com.querydsl.sql.Configuration.translate(Configuration.java:459) at com.querydsl.sql.AbstractSQLQuery.fetch(AbstractSQLQuery.java:502) at com.atlassian.jira.migration.export.db.advancedroadmaps.IssueSourceDataReader.getAllNonExistentIssueSources$lambda-15(IssueSourceDataReader.kt:169) at com.atlassian.pocketknife.internal.querydsl.DatabaseAccessorImpl.lambda$execute$0(DatabaseAccessorImpl.java:69) 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.GeneratedMethodAccessor140.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.base/java.lang.reflect.Method.invoke(Unknown Source) at com.atlassian.plugin.util.ContextClassLoaderSettingInvocationHandler.invoke(ContextClassLoaderSettingInvocationHandler.java:26) ... ... 3 more Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Argument data type ntext is invalid for argument 1 of len function. at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:262) at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(SQLServerStatement.java:1632) at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doExecutePreparedStatement(SQLServerPreparedStatement.java:602) at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement$PrepStmtExecCmd.doExecute(SQLServerPreparedStatement.java:524) at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:7418) at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLServerStatement.java:247) at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLServerStatement.java:222) at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.executeQuery(SQLServerPreparedStatement.java:446) at org.apache.commons.dbcp2.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:83) at org.apache.commons.dbcp2.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:83) at com.atlassian.jira.ofbiz.sql.PreparedStatementWrapper.executeQuery(PreparedStatementWrapper.java:42) at com.atlassian.jira.diagnostic.connection.DiagnosticPreparedStatement.lambda$executeQuery$5(DiagnosticPreparedStatement.java:59) at com.atlassian.diagnostics.internal.platform.monitor.db.DefaultDatabaseDiagnosticsCollector.recordExecutionTime(DefaultDatabaseDiagnosticsCollector.java:70) at com.atlassian.jira.diagnostic.connection.DatabaseDiagnosticsCollectorDelegate.recordExecutionTime(DatabaseDiagnosticsCollectorDelegate.java:55) at com.atlassian.jira.diagnostic.connection.DiagnosticPreparedStatement.executeQuery(DiagnosticPreparedStatement.java:59) at com.querydsl.sql.AbstractSQLQuery.fetch(AbstractSQLQuery.java:446) ... 40 more
Failing when running SQL query:
SELECT "AO_D9132D_ISSUE_SOURCE"."ID" ,"AO_D9132D_ISSUE_SOURCE"."CONVERSION_FACTOR" ,"AO_D9132D_ISSUE_SOURCE"."PLAN_ID" ,"AO_D9132D_ISSUE_SOURCE"."SOURCE_TYPE" ,"AO_D9132D_ISSUE_SOURCE"."SOURCE_VALUE" FROM "dbo"."AO_D9132D_ISSUE_SOURCE" "AO_D9132D_ISSUE_SOURCE" WHERE "AO_D9132D_ISSUE_SOURCE"."SOURCE_VALUE" is null or len("AO_D9132D_ISSUE_SOURCE"."SOURCE_VALUE") = 0 or "AO_D9132D_ISSUE_SOURCE"."SOURCE_TYPE" = 'Project' AND not ("AO_D9132D_ISSUE_SOURCE"."SOURCE_VALUE" IN ( SELECT cast("PROJECT"."ID" AS varchar) FROM "dbo"."project" "PROJECT")) or "AO_D9132D_ISSUE_SOURCE"."SOURCE_TYPE" = 'Filter' AND not ("AO_D9132D_ISSUE_SOURCE"."SOURCE_VALUE" IN ( SELECT cast("SEARCHREQUEST"."ID" AS varchar) FROM "dbo"."searchrequest" "SEARCHREQUEST")) or "AO_D9132D_ISSUE_SOURCE"."SOURCE_TYPE" = 'Board' AND not ("AO_D9132D_ISSUE_SOURCE"."SOURCE_VALUE" IN ('1')) or "AO_D9132D_ISSUE_SOURCE"."SOURCE_TYPE" = 'Board' AND ("AO_D9132D_ISSUE_SOURCE"."SOURCE_VALUE" IN ('1'));
Workaround
- Option 1: In JCMA v1.7.3, the customer can enable the dark feature:
- navigate to <jira_Server>/secure/SiteDarkFeatures!default.jspa
- enable: com.atlassian.jira.migration.skip.preflight.check.export.errors
- Option 2: Downgrade to JCMA v1.7.1
- navigate to <jira_Server>/secure/SiteDarkFeatures!default.jspa
- enable: com.atlassian.jira.migration.skip.app.outdated.check
- uninstall JCMA
- download JCMA 1.7.1 from the marketplace here