Uploaded image for project: 'Bamboo Data Center'
  1. Bamboo Data Center
  2. BAM-20879

Upgrading Bamboo results in the error - The data types ntext and varchar are incompatible in the equal to operator.

      Issue Summary

      When Bamboo is upgraded from 6.10.x to 7.0.2 with MSSQL 2012, we get this error

      ERROR [localhost-startStop-1] [AbstractUpgradeManager] com.microsoft.sqlserver.jdbc.SQLServerException: The data types ntext and varchar are incompatible in the equal to operator.
      

      Steps to Reproduce

      1. Upgrade Bamboo 6.10.2 running with SQL Server 2012 to Bamboo 7.0.2

      Expected Results

      Upgrade happens smoothly.

      Actual Results

      We get the below exception when Bamboo starts.

      atlassian-bamboo.log
      2020-03-25 09:25:58,992 ERROR [localhost-startStop-1] [AbstractUpgradeManager] com.microsoft.sqlserver.jdbc.SQLServerException: The data types ntext and varchar are incompatible in the equal to operator.
      com.microsoft.sqlserver.jdbc.SQLServerException: The data types ntext and varchar are incompatible in the equal to operator.
                    at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:256)
                    at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(SQLServerStatement.java:1621)
      ...
      ...
                    at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeUpdate(NewProxyPreparedStatement.java:462)
                    at com.atlassian.bamboo.upgrade.tasks.v7_0.UpgradeTask70003ChangeECDirectoryAttributeColumnType.lambda$doUpgrade$0(UpgradeTask70003ChangeECDirectoryAttributeColumnType.java:40)
                    at com.atlassian.bamboo.upgrade.AbstractBootstrapUpgradeTask.withDatabaseConnection(AbstractBootstrapUpgradeTask.java:65)
                    at com.atlassian.bamboo.upgrade.tasks.v7_0.UpgradeTask70003ChangeECDirectoryAttributeColumnType.doUpgrade(UpgradeTask70003ChangeECDirectoryAttributeColumnType.java:37)
                    at com.atlassian.bamboo.upgrade.AbstractUpgradeManager.runUpgradeTask(AbstractUpgradeManager.java:182)
                    at com.atlassian.bamboo.upgrade.BootstrapUpgradeManagerImpl.doUpgrade(BootstrapUpgradeManagerImpl.java:76)
                    at com.atlassian.bamboo.setup.DefaultBootstrapManager.performPersistenceUpgrade(DefaultBootstrapManager.java:286)
                    at com.atlassian.config.bootstrap.DefaultAtlassianBootstrapManager.init(DefaultAtlassianBootstrapManager.java:81)
                    at com.atlassian.bamboo.setup.BootstrapLoaderListener.contextInitialized(BootstrapLoaderListener.java:143)
                    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4699)
                    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5165)
                    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
                    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1412)
                    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1402)
                    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
                    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
                    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
                    at java.lang.Thread.run(Thread.java:748)
      2020-03-25 09:25:59,007 INFO [localhost-startStop-1] [AbstractUpgradeManager] Task 70003 completed successfully.
      2020-03-25 09:25:59,007 FATAL [localhost-startStop-1] [DefaultBootstrapManager] Pre-bootstrap upgrade tasks failed
      com.atlassian.upgrade.UpgradeException: Pre-bootstrap upgrade tasks failed: [Task for build 70003 failed with exception: The data types ntext and varchar are incompatible in the equal to operator.]
                    at com.atlassian.bamboo.setup.DefaultBootstrapManager.performPersistenceUpgrade(DefaultBootstrapManager.java:288)
                    at com.atlassian.config.bootstrap.DefaultAtlassianBootstrapManager.init(DefaultAtlassianBootstrapManager.java:81)
                    at com.atlassian.bamboo.setup.BootstrapLoaderListener.contextInitialized(BootstrapLoaderListener.java:143)
                    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4699)
                    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5165)
                    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
                    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1412)
                    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1402)
                    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
                    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
                    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
                    at java.lang.Thread.run(Thread.java:748)
      2020-03-25 09:25:59,007 INFO [localhost-startStop-1] [lifecycle] Bamboo home directory: E:\Bamboo
      2020-03-25 09:25:59,007 INFO [localhost-startStop-1] [lifecycle] Default charset: windows-1252, file name ecoding: Cp1252
      2020-03-25 09:25:59,023 INFO [localhost-startStop-1] [UpgradeLauncher] Upgrades not performed since the application has not been set up yet.
      2020-03-25 09:25:59,054 INFO [localhost-startStop-1] [CompressingFilter] CompressingFilter has initialized
      2020-03-25 09:26:00,101 INFO [localhost-startStop-1] [SpringObjectFactoryProxy] Deferring initialisation of com.atlassian.bamboo.plugin.xwork.SpringObjectFactoryProxy
      2020-03-25 09:26:01,179 INFO [localhost-startStop-1] [Dispatchers] Dispatcher org.apache.struts2.dispatcher.Dispatcher initialised
      2020-03-25 09:26:01,242 INFO [localhost-startStop-1] [SpringObjectFactoryProxy] Deferring initialisation of com.atlassian.bamboo.plugin.xwork.SpringObjectFactoryProxy
      2020-03-25 09:26:02,070 INFO [localhost-startStop-1] [SpringObjectFactoryProxy] Deferring initialisation of com.atlassian.bamboo.plugin.xwork.SpringObjectFactoryProxy
      2020-03-25 09:26:02,195 INFO [localhost-startStop-1] [Dispatchers] Dispatcher org.apache.struts2.dispatcher.Dispatcher initialised
      2020-03-25 09:26:02,257 INFO [localhost-startStop-1] [SpringObjectFactoryProxy] Deferring initialisation of com.atlassian.bamboo.plugin.xwork.SpringObjectFactoryProxy
      

      Workaround

      Currently there is no known workaround for this behavior. A workaround will be added here when available

            [BAM-20879] Upgrading Bamboo results in the error - The data types ntext and varchar are incompatible in the equal to operator.

            f308e0440e62, This error usually happens when you reran the upgrade. You may restore both <bamboo-home> and database to the previous state and rerun the upgrade.

            Cheers,
            Jey

            Jeyanthan I (Inactive) added a comment - f308e0440e62 , This error usually happens when you reran the upgrade. You may restore both <bamboo-home> and database to the previous state and rerun the upgrade. Cheers, Jey

            I have the same with SQL server 2016.

            Do I get it correctly that the only solution now is to wait for 7.0.3 ?

            Mariusz Dullak added a comment - I have the same with SQL server 2016. Do I get it correctly that the only solution now is to wait for 7.0.3 ?

              achystoprudov Alexey Chystoprudov
              jinbasekaran Jeyanthan I (Inactive)
              Affected customers:
              1 This affects my team
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: