Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-69276

ntext datatype is not converted to nvarchar

    Details

      Description

      Steps to reproduce/Testing done

      1. Setup Liferay 6.1 GA2 with SQL Server 2008 R2
      2. Startup and login to Liferay 6.1 GA2
      3. Shutdown Liferay 6.1 GA2
      4. Start an upgrade to DXP with the same database by using the upgrade tool.

      Expected Result: Upgrade successfully without errors.
      Actual Result: The following exception show up in the console:

      16:51:53,764 INFO  [main][LoggingTimer:70] Starting com.liferay.portal.upgrade.v7_0_0.UpgradeKernelPackage#upgradeTable#UserNotificationEvent
      16:51:53,770 INFO  [main][LoggingTimer:38] Completed com.liferay.portal.upgrade.v7_0_0.UpgradeKernelPackage#upgradeTable#UserNotificationEvent in 6 ms
      16:51:53,770 INFO  [main][UpgradeProcess:98] Completed upgrade process com.liferay.portal.upgrade.v7_0_0.UpgradeKernelPackage in 349ms
      16:51:53,770 INFO  [main][UpgradeProcess:98] Completed upgrade process com.liferay.portal.upgrade.UpgradeProcess_7_0_0 in 518ms
      com.liferay.portal.kernel.upgrade.UpgradeException: com.liferay.portal.kernel.upgrade.UpgradeException: com.liferay.portal.kernel.upgrade.UpgradeException: com.microsoft.sqlserver.jdbc.SQLServerException: Argument data type ntext is invalid for argument 1 of replace function.
      	at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:92)
      	at com.liferay.portal.kernel.upgrade.util.UpgradeProcessUtil._upgradeProcess(UpgradeProcessUtil.java:175)
      	at com.liferay.portal.kernel.upgrade.util.UpgradeProcessUtil.upgradeProcess(UpgradeProcessUtil.java:143)
      	at com.liferay.portal.kernel.upgrade.util.UpgradeProcessUtil.upgradeProcess(UpgradeProcessUtil.java:125)
      	at com.liferay.portal.events.StartupHelper.upgradeProcess(StartupHelper.java:164)
      	at com.liferay.portal.events.StartupHelperUtil.upgradeProcess(StartupHelperUtil.java:81)
      	at com.liferay.portal.tools.DBUpgrader.upgrade(DBUpgrader.java:153)
      	at com.liferay.portal.tools.DBUpgrader.main(DBUpgrader.java:99)
      Caused by: com.liferay.portal.kernel.upgrade.UpgradeException: com.liferay.portal.kernel.upgrade.UpgradeException: com.microsoft.sqlserver.jdbc.SQLServerException: Argument data type ntext is invalid for argument 1 of replace function.
      	at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:92)
      	at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:116)
      	at com.liferay.portal.upgrade.UpgradeProcess_7_0_0.doUpgrade(UpgradeProcess_7_0_0.java:69)
      	at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:89)
      	... 7 more
      Caused by: com.liferay.portal.kernel.upgrade.UpgradeException: com.microsoft.sqlserver.jdbc.SQLServerException: Argument data type ntext is invalid for argument 1 of replace function.
      	at com.liferay.portal.upgrade.v7_0_0.UpgradeKernelPackage.doUpgrade(UpgradeKernelPackage.java:76)
      	at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:89)
      	... 10 more
      Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Argument data type ntext is invalid for argument 1 of replace function.
      	at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:196)
      	at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(SQLServerStatement.java:1454)
      	at com.microsoft.sqlserver.jdbc.SQLServerStatement.doExecuteStatement(SQLServerStatement.java:786)
      	at com.microsoft.sqlserver.jdbc.SQLServerStatement$StmtExecCmd.doExecute(SQLServerStatement.java:685)
      	at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:4026)
      	at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:1416)
      	at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLServerStatement.java:185)
      	at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLServerStatement.java:160)
      	at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeUpdate(SQLServerStatement.java:642)
      	at com.liferay.portal.dao.db.BaseDB.runSQL(BaseDB.java:292)
      	at com.liferay.portal.dao.db.BaseDB.runSQL(BaseDB.java:262)
      	at com.liferay.portal.kernel.dao.db.BaseDBProcess.runSQL(BaseDBProcess.java:52)
      	at com.liferay.portal.upgrade.v7_0_0.UpgradeKernelPackage.upgradeTable(UpgradeKernelPackage.java:226)
      	at com.liferay.portal.upgrade.v7_0_0.UpgradeKernelPackage.upgradeLongTextTable(UpgradeKernelPackage.java:123)
      	at com.liferay.portal.upgrade.v7_0_0.UpgradeKernelPackage.doUpgrade(UpgradeKernelPackage.java:56)
      	... 11 more
      

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  2 years, 51 weeks ago

                  Packages

                  Version Package
                  7.0.0 DXP FP10
                  7.0.0 DXP SP2
                  7.0.3 CE GA4
                  Master