Uploaded image for project: 'Jira Software Data Center'
  1. Jira Software Data Center
  2. JSWSERVER-10769

Upgrade to JIRA Agile 6.4.0.3 fails with SQL Server 2005

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • High
    • 6.4.0.6
    • 6.4.0.3
    • None

    Description

      Environment

      Database: SQL Server 2005
      (The following Supported Databases are not affected by this bug: Oracle, PostgreSQL, MySQL or SQL Server 2008)

      Problem

      When attempting to upgrade JIRA Agile to 6.4.0.3, JIRA Agile fails to load with error: JIRA Agile is Currently Unavailable.

      Logs contain these errors:

      2014-06-02 12:52:37,414 pool-9-thread-1 INFO admin 603x187103x3 lwmzmx 128.49.213.107 /rest/plugins/1.0/ [greenhopper.upgrade.lexorank.RealLexoRankDatabaseMigratorImpl] [LexoRank] Migration started for customfield_11202 field
      2014-06-02 12:52:37,710 pool-9-thread-1 ERROR admin 603x187103x3 lwmzmx 128.49.213.107 /rest/plugins/1.0/ [sal.core.upgrade.PluginUpgrader] Upgrade failed: Failed to bulk insert LexoRank rows. SQL[INSERT INTO jiraschema.AO_60DB71_LEXORANK(FIELD_ID,ISSUE_ID,TYPE,RANK) VALUES (11301,10600,1,'0|10022g:'),(11301,10602,1,'0|100228:'),(11301,10603,1,'0|1004co:'),...;]
      com.atlassian.jira.exception.DataAccessException: Failed to bulk insert LexoRank rows. SQL[INSERT INTO jiraschema.AO_60DB71_LEXORANK(FIELD_ID,ISSUE_ID,TYPE,RANK) VALUES (11301,10600,1,'0|10022g:'),(11301,10602,1,'0|100228:'),(11301,10603,1,'0|1004co:'),...;]
      	at com.atlassian.greenhopper.manager.lexorank.LexoRankDaoImpl.createBulk(LexoRankDaoImpl.java:130)
      	at com.atlassian.greenhopper.upgrade.lexorank.LexoRankIssueIdsCreator.apply(LexoRankIssueIdsCreator.java:38)
      	at com.atlassian.greenhopper.upgrade.lexorank.RealLexoRankDatabaseMigratorImpl.migrate(RealLexoRankDatabaseMigratorImpl.java:42)
      	at com.atlassian.greenhopper.upgrade.lexorank.LexoRankMigrator.migrate(LexoRankMigrator.java:39)
      	at com.atlassian.greenhopper.upgrade.GhUpgradeTask044.performUpgrade(GhUpgradeTask044.java:81)
      	at com.atlassian.greenhopper.upgrade.AbstractGhUpgradeTask.doUpgrade(AbstractGhUpgradeTask.java:66)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      	at java.lang.reflect.Method.invoke(Unknown Source)
      	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
      	at org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:58)
      	at org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:62)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
      	at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
      	at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
      	at org.springframework.osgi.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:56)
      	at org.springframework.osgi.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:39)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
      	at org.springframework.osgi.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:59)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
      	at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
      	at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
      	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
      	at com.sun.proxy.$Proxy584.doUpgrade(Unknown Source)
      	at com.atlassian.sal.core.upgrade.PluginUpgrader.doUpgrade(PluginUpgrader.java:85)
      	at com.atlassian.sal.core.upgrade.PluginUpgrader.upgrade(PluginUpgrader.java:66)
      	at com.atlassian.sal.core.upgrade.DefaultPluginUpgradeManager.upgradePlugin(DefaultPluginUpgradeManager.java:204)
      	at com.atlassian.sal.core.upgrade.DefaultPluginUpgradeManager.upgradeInternal(DefaultPluginUpgradeManager.java:194)
      	at com.atlassian.sal.core.upgrade.DefaultPluginUpgradeManager$2.doInTransaction(DefaultPluginUpgradeManager.java:178)
      	at com.atlassian.sal.core.transaction.HostContextTransactionTemplate$1.doInTransaction(HostContextTransactionTemplate.java:25)
      	at com.atlassian.jira.DefaultHostContextAccessor.doInTransaction(DefaultHostContextAccessor.java:34)
      	at sun.reflect.GeneratedMethodAccessor155.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      	at java.lang.reflect.Method.invoke(Unknown Source)
      	at com.atlassian.plugin.osgi.hostcomponents.impl.DefaultComponentRegistrar$ContextClassLoaderSettingInvocationHandler.invoke(DefaultComponentRegistrar.java:129)
      	at com.sun.proxy.$Proxy315.doInTransaction(Unknown Source)
      	at sun.reflect.GeneratedMethodAccessor155.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      	at java.lang.reflect.Method.invoke(Unknown Source)
      	at com.atlassian.plugin.osgi.bridge.external.HostComponentFactoryBean$DynamicServiceInvocationHandler.invoke(HostComponentFactoryBean.java:154)
      	at com.sun.proxy.$Proxy315.doInTransaction(Unknown Source)
      	at com.atlassian.sal.core.transaction.HostContextTransactionTemplate.execute(HostContextTransactionTemplate.java:21)
      	at com.atlassian.sal.core.upgrade.DefaultPluginUpgradeManager.upgradeInTransaction(DefaultPluginUpgradeManager.java:174)
      	at com.atlassian.sal.core.upgrade.DefaultPluginUpgradeManager.onPluginEnabled(DefaultPluginUpgradeManager.java:95)
      	at sun.reflect.GeneratedMethodAccessor109.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      	at java.lang.reflect.Method.invoke(Unknown Source)
      	at com.atlassian.event.internal.SingleParameterMethodListenerInvoker.invoke(SingleParameterMethodListenerInvoker.java:36)
      	at com.atlassian.event.internal.AsynchronousAbleEventDispatcher$2.run(AsynchronousAbleEventDispatcher.java:66)
      	at com.atlassian.event.internal.AsynchronousAbleEventDispatcher$1.execute(AsynchronousAbleEventDispatcher.java:32)
      	at com.atlassian.event.internal.AsynchronousAbleEventDispatcher.dispatch(AsynchronousAbleEventDispatcher.java:60)
      	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:84)
      	at com.atlassian.plugin.manager.DefaultPluginManager.addPlugins(DefaultPluginManager.java:815)
      	at com.atlassian.plugin.manager.DefaultPluginManager.scanForNewPlugins(DefaultPluginManager.java:519)
      	at com.atlassian.plugin.manager.DefaultPluginManager.installPlugins(DefaultPluginManager.java:422)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      	at java.lang.reflect.Method.invoke(Unknown Source)
      	at com.atlassian.plugin.osgi.hostcomponents.impl.DefaultComponentRegistrar$ContextClassLoaderSettingInvocationHandler.invoke(DefaultComponentRegistrar.java:129)
      	at com.sun.proxy.$Proxy516.installPlugins(Unknown Source)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      	at java.lang.reflect.Method.invoke(Unknown Source)
      	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
      	at org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:58)
      	at org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:62)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
      	at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
      	at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
      	at org.springframework.osgi.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:56)
      	at org.springframework.osgi.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:39)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
      	at org.springframework.osgi.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:59)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
      	at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
      	at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
      	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
      	at com.sun.proxy.$Proxy1082.installPlugins(Unknown Source)
      	at com.atlassian.upm.PluginAccessorAndControllerImpl$1.doInTransaction(PluginAccessorAndControllerImpl.java:145)
      	at com.atlassian.upm.PluginAccessorAndControllerImpl$1.doInTransaction(PluginAccessorAndControllerImpl.java:127)
      	at com.atlassian.sal.core.transaction.HostContextTransactionTemplate$1.doInTransaction(HostContextTransactionTemplate.java:25)
      	at com.atlassian.jira.DefaultHostContextAccessor.doInTransaction(DefaultHostContextAccessor.java:34)
      	at sun.reflect.GeneratedMethodAccessor155.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      	at java.lang.reflect.Method.invoke(Unknown Source)
      	at com.atlassian.plugin.osgi.hostcomponents.impl.DefaultComponentRegistrar$ContextClassLoaderSettingInvocationHandler.invoke(DefaultComponentRegistrar.java:129)
      	at com.sun.proxy.$Proxy315.doInTransaction(Unknown Source)
      	at sun.reflect.GeneratedMethodAccessor155.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      	at java.lang.reflect.Method.invoke(Unknown Source)
      	at com.atlassian.plugin.osgi.bridge.external.HostComponentFactoryBean$DynamicServiceInvocationHandler.invoke(HostComponentFactoryBean.java:154)
      	at com.sun.proxy.$Proxy315.doInTransaction(Unknown Source)
      	at com.atlassian.sal.core.transaction.HostContextTransactionTemplate.execute(HostContextTransactionTemplate.java:21)
      	at sun.reflect.GeneratedMethodAccessor170.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      	at java.lang.reflect.Method.invoke(Unknown Source)
      	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
      	at org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:58)
      	at org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:62)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
      	at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
      	at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
      	at org.springframework.osgi.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:56)
      	at org.springframework.osgi.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:39)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
      	at org.springframework.osgi.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:59)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
      	at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
      	at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
      	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
      	at com.sun.proxy.$Proxy1296.execute(Unknown Source)
      	at com.atlassian.upm.PluginAccessorAndControllerImpl.installPlugin(PluginAccessorAndControllerImpl.java:126)
      	at com.atlassian.upm.impl.PluginArtifactInstallHandler.installPlugin(PluginArtifactInstallHandler.java:30)
      	at com.atlassian.upm.PluginInstaller.execute(PluginInstaller.java:164)
      	at com.atlassian.upm.PluginInstaller.install(PluginInstaller.java:119)
      	at com.atlassian.upm.rest.resources.install.InstallTask.installFromFile(InstallTask.java:111)
      	at com.atlassian.upm.rest.resources.install.InstallFromUriTask.executeTask(InstallFromUriTask.java:46)
      	at com.atlassian.upm.rest.resources.install.InstallTask.call(InstallTask.java:47)
      	at com.atlassian.upm.rest.resources.install.InstallTask.call(InstallTask.java:24)
      	at com.atlassian.upm.rest.async.AsynchronousTaskManager$1.call(AsynchronousTaskManager.java:81)
      	at com.atlassian.upm.rest.async.AsynchronousTaskManager$1.call(AsynchronousTaskManager.java:76)
      	at com.atlassian.sal.core.executor.ThreadLocalDelegateCallable.call(ThreadLocalDelegateCallable.java:42)
      	at java.util.concurrent.FutureTask.run(Unknown Source)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      	at java.lang.Thread.run(Unknown Source)
      Caused by: java.sql.SQLException: Incorrect syntax near ','.
      	at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:368)
      	at net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2820)
      	at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2258)
      	at net.sourceforge.jtds.jdbc.TdsCore.getMoreResults(TdsCore.java:632)
      	at net.sourceforge.jtds.jdbc.JtdsStatement.processResults(JtdsStatement.java:584)
      	at net.sourceforge.jtds.jdbc.JtdsStatement.executeSQL(JtdsStatement.java:546)
      	at net.sourceforge.jtds.jdbc.JtdsPreparedStatement.executeUpdate(JtdsPreparedStatement.java:506)
      	at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105)
      	at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105)
      	at com.atlassian.greenhopper.manager.lexorank.LexoRankDaoImpl.createBulk(LexoRankDaoImpl.java:120)
      	... 136 more
      
      • The result is JIRA Agile's AO tables in a half upgraded state.

      Cause

      JIRA Agile 6.4.0.3 introduces the new Lexoranking system. During the migration, the SQL queries use multi-row values, which are not compatible with SQL Server 2005. These were introduced as of SQL Server 2008.

      Workaround

      Install the latest version of JIRA Agile
      • Please back up your JIRA database
      • Uninstall JIRA Agile 6.4.0.3
      • Install the latest version of JIRA Agile
      • Note: With MS SQL Server 2005 the upgrade to JIRA Agile 6.4 will take much longer than normal. For example, if you have 50,000 issues in JIRA, the upgrade will take approximately 15 minutes. It may appear that the upgrade task is not doing anything during this time, even though the upgrade is still happening.

      If you think that the upgrade is taking too long (given the example above) or you run into other problems, please raise a support request.

      Attachments

        Issue Links

          Activity

            People

              ibosticky ivo (Inactive)
              dchan David Chan
              Votes:
              1 Vote for this issue
              Watchers:
              20 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: