com.atlassian.servicedesk.bootstrap.upgrade.SyncUpgradeTaskException: Failed running SyncUpgradeTask: SyncUpgradeTaskFixOldStyleRequestChannelIssueProperties

Atlassian JIRA | Joao Palharini [Atlassian] | 4 months ago
  1. 0

    h3. Summary When installing Service Desk 3.2.0 on the final release of JIRA 7.2.0 with PostgreSQL backend, {{SyncUpgradeTaskFixOldStyleRequestChannelIssueProperties}} fails with a SQL exception. h3. Expected Behavior Complete upgrade task successfully. h3. Actual Behavior Upgrade task fails with the below error in logs. However, Service Desk is enabled successfully. {code} 2016-08-22 14:19:47,366 http-nio-8080-exec-23 ERROR anonymous 859x18x1 1736jjh 0:0:0:0:0:0:0:1 /secure/SetupMailNotifications.jspa [c.a.servicedesk.bootstrap.lifecycle] Failed running SyncUpgradeTask: SyncUpgradeTaskFixOldStyleRequestChannelIssueProperties com.atlassian.servicedesk.bootstrap.upgrade.SyncUpgradeTaskException: Failed running SyncUpgradeTask: SyncUpgradeTaskFixOldStyleRequestChannelIssueProperties at com.atlassian.servicedesk.bootstrap.upgrade.SyncUpgradeTaskServiceImpl.runTask(SyncUpgradeTaskServiceImpl.java:79) at com.atlassian.servicedesk.bootstrap.upgrade.SyncUpgradeTaskServiceImpl.runAll(SyncUpgradeTaskServiceImpl.java:48) at com.atlassian.servicedesk.bootstrap.lifecycle.PluginLifeCycle.runSyncUpgradeTasks(PluginLifeCycle.java:319) at com.atlassian.servicedesk.bootstrap.lifecycle.PluginLifeCycle.checkAndRunUpgrades(PluginLifeCycle.java:272) at com.atlassian.servicedesk.bootstrap.lifecycle.PluginLifeCycle.runPluginStartupSideEffectsImpl(PluginLifeCycle.java:183) at com.atlassian.servicedesk.bootstrap.lifecycle.LifecycleLock.writeImpl(LifecycleLock.java:97) at com.atlassian.servicedesk.bootstrap.lifecycle.LifecycleLock.runOnStartup(LifecycleLock.java:75) at com.atlassian.servicedesk.bootstrap.lifecycle.PluginLifeCycle.onPluginStarted(PluginLifeCycle.java:126) at com.atlassian.servicedesk.bootstrap.lifecycle.Launcher.onStartCompleted(Launcher.java:75) at com.atlassian.servicedesk.bootstrap.lifecycle.Launcher.access$000(Launcher.java:23) at com.atlassian.servicedesk.bootstrap.lifecycle.Launcher$1$1.run(Launcher.java:42) at com.atlassian.pocketknife.api.util.runners.SealedRunner.checkSeals(SealedRunner.java:111) at com.atlassian.pocketknife.api.util.runners.SealedRunner.breakSeal(SealedRunner.java:68) at com.atlassian.servicedesk.bootstrap.lifecycle.Launcher.onStart(Launcher.java:68) at com.atlassian.sal.core.lifecycle.DefaultLifecycleManager$4.consume(DefaultLifecycleManager.java:310) at com.atlassian.sal.core.lifecycle.DefaultLifecycleManager$4.consume(DefaultLifecycleManager.java:306) at com.atlassian.sal.core.lifecycle.DefaultLifecycleManager.notifyLifecyleAware(DefaultLifecycleManager.java:344) at com.atlassian.sal.core.lifecycle.DefaultLifecycleManager.notifyOnStartIfStartedAndEnabled(DefaultLifecycleManager.java:304) at com.atlassian.sal.core.lifecycle.DefaultLifecycleManager.access$300(DefaultLifecycleManager.java:50) at com.atlassian.sal.core.lifecycle.DefaultLifecycleManager$3.evaluate(DefaultLifecycleManager.java:261) at com.atlassian.sal.core.lifecycle.DefaultLifecycleManager$3.evaluate(DefaultLifecycleManager.java:257) at com.atlassian.sal.core.lifecycle.DefaultLifecycleManager.notifyLifecycleAwares(DefaultLifecycleManager.java:286) at com.atlassian.sal.core.lifecycle.DefaultLifecycleManager.notifyStartableLifecycleAwares(DefaultLifecycleManager.java:255) at com.atlassian.sal.core.lifecycle.DefaultLifecycleManager.startIfApplicationSetup(DefaultLifecycleManager.java:241) at com.atlassian.sal.core.lifecycle.DefaultLifecycleManager.start(DefaultLifecycleManager.java:230) at com.atlassian.sal.jira.lifecycle.JiraLifecycleManager.onJiraStart(JiraLifecycleManager.java:64) ... 3 filtered at java.lang.reflect.Method.invoke(Method.java:498) at com.atlassian.event.internal.SingleParameterMethodListenerInvoker.invoke(SingleParameterMethodListenerInvoker.java:36) at com.atlassian.event.internal.AsynchronousAbleEventDispatcher$1$1.run(AsynchronousAbleEventDispatcher.java:48) at com.google.common.util.concurrent.MoreExecutors$DirectExecutorService.execute(MoreExecutors.java:299) at com.atlassian.event.internal.AsynchronousAbleEventDispatcher.dispatch(AsynchronousAbleEventDispatcher.java:107) at com.atlassian.event.internal.EventPublisherImpl.invokeListeners(EventPublisherImpl.java:160) at com.atlassian.event.internal.EventPublisherImpl.publish(EventPublisherImpl.java:79) at com.atlassian.plugin.event.impl.DefaultPluginEventManager.broadcast(DefaultPluginEventManager.java:73) at com.atlassian.jira.web.action.setup.SetupComplete.doExecute(SetupComplete.java:90) ... 1 filtered at com.atlassian.jira.action.JiraActionSupport.execute(JiraActionSupport.java:63) ... 7 filtered at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) ... 52 filtered at com.atlassian.servicedesk.internal.web.OperationalStatusAwareHttpFilter.doFilterWhenNotLicensed(OperationalStatusAwareHttpFilter.java:71) at com.atlassian.servicedesk.internal.web.OperationalStatusAwareHttpFilter.doFilter(OperationalStatusAwareHttpFilter.java:33) ... 4 filtered at com.atlassian.greenhopper.jira.filters.ClassicBoardRouter.doFilter(ClassicBoardRouter.java:62) ... 7 filtered at com.atlassian.web.servlet.plugin.request.RedirectInterceptingFilter.doFilter(RedirectInterceptingFilter.java:21) ... 58 filtered at com.atlassian.jira.security.JiraSecurityFilter.lambda$doFilter$0(JiraSecurityFilter.java:76) ... 1 filtered at com.atlassian.jira.security.JiraSecurityFilter.doFilter(JiraSecurityFilter.java:74) ... 36 filtered at com.atlassian.jira.servermetrics.CorrelationIdPopulatorFilter.doFilter(CorrelationIdPopulatorFilter.java:30) ... 5 filtered at com.atlassian.servicedesk.internal.web.CustomerContextSettingFilter.lambda$invokeFilterChain$0(CustomerContextSettingFilter.java:181) at com.atlassian.servicedesk.internal.utils.context.ReentrantThreadLocalBasedCodeContext.rteInvoke(ReentrantThreadLocalBasedCodeContext.java:142) at com.atlassian.servicedesk.internal.utils.context.ReentrantThreadLocalBasedCodeContext.runOutOfContext(ReentrantThreadLocalBasedCodeContext.java:94) at com.atlassian.servicedesk.internal.utils.context.CustomerContextServiceImpl.runOutOfCustomerContext(CustomerContextServiceImpl.java:64) at com.atlassian.servicedesk.internal.web.CustomerContextSettingFilter.outOfCustomerContext(CustomerContextSettingFilter.java:174) at com.atlassian.servicedesk.internal.web.CustomerContextSettingFilter.doFilterImpl(CustomerContextSettingFilter.java:130) at com.atlassian.servicedesk.internal.web.CustomerContextSettingFilter.doFilter(CustomerContextSettingFilter.java:121) ... 4 filtered at com.atlassian.jwt.internal.servlet.JwtAuthFilter.doFilter(JwtAuthFilter.java:32) ... 8 filtered at com.atlassian.web.servlet.plugin.request.RedirectInterceptingFilter.doFilter(RedirectInterceptingFilter.java:21) ... 4 filtered at com.atlassian.web.servlet.plugin.LocationCleanerFilter.doFilter(LocationCleanerFilter.java:36) ... 29 filtered at com.atlassian.jira.servermetrics.MetricsCollectorFilter.doFilter(MetricsCollectorFilter.java:25) ... 27 filtered at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:745) Caused by: com.querydsl.core.QueryException: Caught PSQLException for select "JIRAISSUE"."ID" from "JIRAISSUE" "JIRAISSUE" join "AO_54307E_SERVICEDESK" "AO_54307E_SERVICEDESK" on "AO_54307E_SERVICEDESK"."PROJECT_ID" = "JIRAISSUE"."PROJECT" order by "JIRAISSUE"."ID" asc at com.querydsl.sql.DefaultSQLExceptionTranslator.translate(DefaultSQLExceptionTranslator.java:50) at com.querydsl.sql.Configuration.translate(Configuration.java:453) at com.querydsl.sql.AbstractSQLQuery.iterateSingle(AbstractSQLQuery.java:410) at com.querydsl.sql.AbstractSQLQuery.iterate(AbstractSQLQuery.java:342) at com.atlassian.pocketknife.internal.querydsl.stream.StreamingQueryFactoryImpl.streamImpl(StreamingQueryFactoryImpl.java:53) at com.atlassian.servicedesk.bootstrap.upgrade.helper.AsyncUpgradeTaskServiceDeskIssuesDbHelper.getAllServiceDeskIssueIds(AsyncUpgradeTaskServiceDeskIssuesDbHelper.java:45) at com.atlassian.servicedesk.bootstrap.upgrade.helper.AsyncUpgradeTaskServiceDeskIssuesDbHelper.runEffects(AsyncUpgradeTaskServiceDeskIssuesDbHelper.java:49) at com.atlassian.servicedesk.bootstrap.upgrade.helper.AsyncUpgradeTaskServiceDeskIssuesDbHelper.lambda$applyEffectForAllServiceDeskIssues$1(AsyncUpgradeTaskServiceDeskIssuesDbHelper.java:59) at com.atlassian.pocketknife.internal.querydsl.DatabaseAccessorImpl.lambda$execute$0(DatabaseAccessorImpl.java:66) at com.atlassian.sal.core.rdbms.DefaultTransactionalExecutor.executeInternal(DefaultTransactionalExecutor.java:103) at com.atlassian.sal.core.rdbms.DefaultTransactionalExecutor$1.execute(DefaultTransactionalExecutor.java:50) at com.atlassian.sal.jira.rdbms.JiraHostConnectionAccessor.lambda$borrowConnectionAndExecute$0(JiraHostConnectionAccessor.java:62) at com.atlassian.jira.database.DatabaseAccessorImpl.executeQuery(DatabaseAccessorImpl.java:67) ... 2 filtered at java.lang.reflect.Method.invoke(Method.java:498) at com.atlassian.plugin.util.ContextClassLoaderSettingInvocationHandler.invoke(ContextClassLoaderSettingInvocationHandler.java:26) at com.sun.proxy.$Proxy463.executeQuery(Unknown Source) ... 2 filtered at java.lang.reflect.Method.invoke(Method.java:498) at com.atlassian.plugin.osgi.bridge.external.HostComponentFactoryBean$DynamicServiceInvocationHandler.invoke(HostComponentFactoryBean.java:136) at com.sun.proxy.$Proxy463.executeQuery(Unknown Source) at com.atlassian.sal.jira.rdbms.JiraHostConnectionAccessor.borrowConnectionAndExecute(JiraHostConnectionAccessor.java:50) at com.atlassian.sal.jira.rdbms.JiraHostConnectionAccessor.execute(JiraHostConnectionAccessor.java:35) at com.atlassian.sal.core.rdbms.DefaultTransactionalExecutor.execute(DefaultTransactionalExecutor.java:45) at com.atlassian.pocketknife.internal.querydsl.DatabaseAccessorImpl.execute(DatabaseAccessorImpl.java:64) at com.atlassian.pocketknife.internal.querydsl.DatabaseAccessorImpl.runInNewTransaction(DatabaseAccessorImpl.java:35) at com.atlassian.pocketknife.internal.querydsl.DatabaseAccessorImpl.run(DatabaseAccessorImpl.java:30) at com.atlassian.servicedesk.bootstrap.upgrade.helper.AsyncUpgradeTaskServiceDeskIssuesDbHelper.applyEffectForAllServiceDeskIssues(AsyncUpgradeTaskServiceDeskIssuesDbHelper.java:59) at com.atlassian.servicedesk.bootstrap.upgrade.tasks.SyncUpgradeTaskFixOldStyleRequestChannelIssueProperties.doUpgrade(SyncUpgradeTaskFixOldStyleRequestChannelIssueProperties.java:118) at com.atlassian.servicedesk.bootstrap.upgrade.SyncUpgradeTaskServiceImpl.runTask(SyncUpgradeTaskServiceImpl.java:71) ... 304 more Caused by: org.postgresql.util.PSQLException: ERROR: relation "JIRAISSUE" does not exist Position: 30 at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2101) at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1834) at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255) at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:510) at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:271) at org.apache.commons.dbcp2.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:83) at org.apache.commons.dbcp2.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:83) at com.querydsl.sql.AbstractSQLQuery.iterateSingle(AbstractSQLQuery.java:370) ... 334 more {code} According to [Postgres Case Sensitivity|http://stackoverflow.com/questions/21796446/postgres-case-sensitivity], when objects are surrounded by double quotes, PostgreSQL performs a case-sensitive search. In JIRA's default database schema, the table {{jiraissue}} is lower case. h3. Steps to Reproduce # Install JIRA 7.2.0; # Upload JIRA Service Desk 3.2.0 through *Administration > Applications > Versions & licenses*; h3. Workaround This issue was caused by a missing schema definition {{<schema-name>}} in the {{dbconfig.xml}} file, possibly due to JRA-47663. There are three possible ways to prevent or manually correct this problem. # Run the {{config.sh}} utility in visual mode and ensure the schema is set; # Use JIRA's Setup Wizard - shown upon first startup in the browser; # Manually specify {{<schema-name>name_of_schema</schema-name>}} just above the {{<jdbc-datasource>}} section on JIRA's {{dbconfig.xml}} file - located under {{<[JIRA_HOME|https://confluence.atlassian.com/display/JIRA/JIRA+Home+Directory]>/}};

    Atlassian JIRA | 4 months ago | Joao Palharini [Atlassian]
    com.atlassian.servicedesk.bootstrap.upgrade.SyncUpgradeTaskException: Failed running SyncUpgradeTask: SyncUpgradeTaskFixOldStyleRequestChannelIssueProperties

    Root Cause Analysis

    1. com.atlassian.servicedesk.bootstrap.upgrade.SyncUpgradeTaskException

      Failed running SyncUpgradeTask: SyncUpgradeTaskFixOldStyleRequestChannelIssueProperties

      at com.atlassian.servicedesk.bootstrap.upgrade.SyncUpgradeTaskServiceImpl.runTask()
    2. com.atlassian.servicedesk
      Launcher$1$1.run
      1. com.atlassian.servicedesk.bootstrap.upgrade.SyncUpgradeTaskServiceImpl.runTask(SyncUpgradeTaskServiceImpl.java:79)
      2. com.atlassian.servicedesk.bootstrap.upgrade.SyncUpgradeTaskServiceImpl.runAll(SyncUpgradeTaskServiceImpl.java:48)
      3. com.atlassian.servicedesk.bootstrap.lifecycle.PluginLifeCycle.runSyncUpgradeTasks(PluginLifeCycle.java:319)
      4. com.atlassian.servicedesk.bootstrap.lifecycle.PluginLifeCycle.checkAndRunUpgrades(PluginLifeCycle.java:272)
      5. com.atlassian.servicedesk.bootstrap.lifecycle.PluginLifeCycle.runPluginStartupSideEffectsImpl(PluginLifeCycle.java:183)
      6. com.atlassian.servicedesk.bootstrap.lifecycle.LifecycleLock.writeImpl(LifecycleLock.java:97)
      7. com.atlassian.servicedesk.bootstrap.lifecycle.LifecycleLock.runOnStartup(LifecycleLock.java:75)
      8. com.atlassian.servicedesk.bootstrap.lifecycle.PluginLifeCycle.onPluginStarted(PluginLifeCycle.java:126)
      9. com.atlassian.servicedesk.bootstrap.lifecycle.Launcher.onStartCompleted(Launcher.java:75)
      10. com.atlassian.servicedesk.bootstrap.lifecycle.Launcher.access$000(Launcher.java:23)
      11. com.atlassian.servicedesk.bootstrap.lifecycle.Launcher$1$1.run(Launcher.java:42)
      11 frames
    3. com.atlassian.pocketknife
      SealedRunner.breakSeal
      1. com.atlassian.pocketknife.api.util.runners.SealedRunner.checkSeals(SealedRunner.java:111)
      2. com.atlassian.pocketknife.api.util.runners.SealedRunner.breakSeal(SealedRunner.java:68)
      2 frames
    4. com.atlassian.servicedesk
      Launcher.onStart
      1. com.atlassian.servicedesk.bootstrap.lifecycle.Launcher.onStart(Launcher.java:68)
      1 frame
    5. com.atlassian.sal
      JiraLifecycleManager.onJiraStart
      1. com.atlassian.sal.core.lifecycle.DefaultLifecycleManager$4.consume(DefaultLifecycleManager.java:310)
      2. com.atlassian.sal.core.lifecycle.DefaultLifecycleManager$4.consume(DefaultLifecycleManager.java:306)
      3. com.atlassian.sal.core.lifecycle.DefaultLifecycleManager.notifyLifecyleAware(DefaultLifecycleManager.java:344)
      4. com.atlassian.sal.core.lifecycle.DefaultLifecycleManager.notifyOnStartIfStartedAndEnabled(DefaultLifecycleManager.java:304)
      5. com.atlassian.sal.core.lifecycle.DefaultLifecycleManager.access$300(DefaultLifecycleManager.java:50)
      6. com.atlassian.sal.core.lifecycle.DefaultLifecycleManager$3.evaluate(DefaultLifecycleManager.java:261)
      7. com.atlassian.sal.core.lifecycle.DefaultLifecycleManager$3.evaluate(DefaultLifecycleManager.java:257)
      8. com.atlassian.sal.core.lifecycle.DefaultLifecycleManager.notifyLifecycleAwares(DefaultLifecycleManager.java:286)
      9. com.atlassian.sal.core.lifecycle.DefaultLifecycleManager.notifyStartableLifecycleAwares(DefaultLifecycleManager.java:255)
      10. com.atlassian.sal.core.lifecycle.DefaultLifecycleManager.startIfApplicationSetup(DefaultLifecycleManager.java:241)
      11. com.atlassian.sal.core.lifecycle.DefaultLifecycleManager.start(DefaultLifecycleManager.java:230)
      12. com.atlassian.sal.jira.lifecycle.JiraLifecycleManager.onJiraStart(JiraLifecycleManager.java:64)
      12 frames