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

UpgradeOrganization fails from 6.1/6.2 to master/7.2 on some databases

    Description

    Upgrade client process will fail when the user is on PostgreSQL, DB2, Oracle, or Sybase

    Steps to Reproduce:

    1. Download the attached sql file (dump from 6.2.10.21)
    2. Import into PostgreSQL 10
    3. Execute upgrade client at tools/portal-tools-db-upgrade-client/db_upgrade.sh

    Expected Result:
    Upgrade completes successfully on all supported databases.

    Actual Result:
    Upgrade fails:

    INFO  [main][UpgradeProcess:107] Failed upgrade process com.liferay.portal.upgrade.UpgradeProcess_7_0_0 in 3017 ms
    com.liferay.portal.kernel.upgrade.UpgradeException: com.liferay.portal.kernel.upgrade.UpgradeException: org.postgresql.util.PSQLException: ERROR: syntax error at or near "="
      Position: 73
    	at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:101)
    	at com.liferay.portal.kernel.upgrade.util.UpgradeProcessUtil._upgradeProcess(UpgradeProcessUtil.java:176)
    	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:151)
    	at com.liferay.portal.events.StartupHelperUtil.upgradeProcess(StartupHelperUtil.java:85)
    	at com.liferay.portal.tools.DBUpgrader.upgrade(DBUpgrader.java:172)
    	at com.liferay.portal.tools.DBUpgrader.main(DBUpgrader.java:107)
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    	at java.lang.reflect.Method.invoke(Method.java:498)
    	at com.liferay.portal.tools.db.upgrade.client.DBUpgraderLauncher.main(DBUpgraderLauncher.java:55)
    Caused by: com.liferay.portal.kernel.upgrade.UpgradeException: org.postgresql.util.PSQLException: ERROR: syntax error at or near "="
      Position: 73
    	at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:101)
    	at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:142)
    	at com.liferay.portal.upgrade.UpgradeProcess_7_0_0.doUpgrade(UpgradeProcess_7_0_0.java:101)
    	at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:96)
    	... 12 more
    Caused by: org.postgresql.util.PSQLException: ERROR: syntax error at or near "="
      Position: 73
    	at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2412)
    	at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2125)
    	at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:297)
    	at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:428)
    	at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:354)
    	at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:169)
    	at org.postgresql.jdbc.PgPreparedStatement.executeQuery(PgPreparedStatement.java:117)
    	at com.zaxxer.hikari.pool.ProxyPreparedStatement.executeQuery(ProxyPreparedStatement.java:52)
    	at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.executeQuery(HikariProxyPreparedStatement.java)
    	at com.liferay.portal.upgrade.v7_0_0.UpgradeOrganization.upgradeOrganizationLogoId(UpgradeOrganization.java:41)
    	at com.liferay.portal.upgrade.v7_0_0.UpgradeOrganization.doUpgrade(UpgradeOrganization.java:34)
    	at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:96)
    	... 15 more
    

    Note Reproduced on multiple different dumps from 6.2, doesn't appear to be related to content added.

    Sybase 16 error:

         [java] 2018-12-06 07:32:21.288 INFO  [main][UpgradeProcess:107] Failed upgrade process com.liferay.portal.upgrade.UpgradeProcess_7_0_0 in 9501 ms
         [java] com.liferay.portal.kernel.upgrade.UpgradeException: com.liferay.portal.kernel.upgrade.UpgradeException: com.sybase.jdbc4.jdbc.SybSQLException: Incorrect syntax near '&'.
         [java] 
         [java] 	at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:101)
         [java] 	at com.liferay.portal.kernel.upgrade.util.UpgradeProcessUtil._upgradeProcess(UpgradeProcessUtil.java:176)
         [java] 	at com.liferay.portal.kernel.upgrade.util.UpgradeProcessUtil.upgradeProcess(UpgradeProcessUtil.java:143)
         [java] 	at com.liferay.portal.kernel.upgrade.util.UpgradeProcessUtil.upgradeProcess(UpgradeProcessUtil.java:125)
         [java] 	at com.liferay.portal.events.StartupHelper.upgradeProcess(StartupHelper.java:151)
         [java] 	at com.liferay.portal.events.StartupHelperUtil.upgradeProcess(StartupHelperUtil.java:85)
         [java] 	at com.liferay.portal.tools.DBUpgrader.upgrade(DBUpgrader.java:172)
         [java] 	at com.liferay.portal.tools.DBUpgrader.main(DBUpgrader.java:107)
         [java] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         [java] 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
         [java] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
         [java] 	at java.lang.reflect.Method.invoke(Method.java:498)
         [java] 	at com.liferay.portal.tools.db.upgrade.client.DBUpgraderLauncher.main(DBUpgraderLauncher.java:55)
         [java] Caused by: com.liferay.portal.kernel.upgrade.UpgradeException: com.sybase.jdbc4.jdbc.SybSQLException: Incorrect syntax near '&'.
         [java] 
         [java] 	at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:101)
         [java] 	at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:142)
         [java] 	at com.liferay.portal.upgrade.UpgradeProcess_7_0_0.doUpgrade(UpgradeProcess_7_0_0.java:101)
         [java] 	at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:96)
         [java] 	... 12 more
         [java] Caused by: com.sybase.jdbc4.jdbc.SybSQLException: Incorrect syntax near '&'.
         [java] 
         [java] 	at com.sybase.jdbc4.tds.Tds.processEed(Tds.java:4003)
         [java] 	at com.sybase.jdbc4.tds.Tds.nextResult(Tds.java:3093)
         [java] 	at com.sybase.jdbc4.jdbc.ResultGetter.nextResult(ResultGetter.java:78)
         [java] 	at com.sybase.jdbc4.jdbc.SybStatement.nextResult(SybStatement.java:289)
         [java] 	at com.sybase.jdbc4.jdbc.SybStatement.nextResult(SybStatement.java:271)
         [java] 	at com.sybase.jdbc4.jdbc.SybStatement.queryLoop(SybStatement.java:2408)
         [java] 	at com.sybase.jdbc4.jdbc.SybStatement.executeQuery(SybStatement.java:2394)
         [java] 	at com.sybase.jdbc4.jdbc.SybPreparedStatement.executeQuery(SybPreparedStatement.java:258)
         [java] 	at com.zaxxer.hikari.pool.ProxyPreparedStatement.executeQuery(ProxyPreparedStatement.java:52)
         [java] 	at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.executeQuery(HikariProxyPreparedStatement.java)
         [java] 	at com.liferay.portal.upgrade.v7_0_0.UpgradeOrganization.upgradeOrganizationLogoId(UpgradeOrganization.java:41)
         [java] 	at com.liferay.portal.upgrade.v7_0_0.UpgradeOrganization.doUpgrade(UpgradeOrganization.java:34)
         [java] 	at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:96)
         [java] 	... 15 more
    

      Attachments

        Issue Links

          Activity

            People

            • Assignee:
              victor.ware Victor Ware
              Reporter:
              victor.ware Victor Ware
              Participants of an Issue:
              Recent user:
              Clarissa Velazquez
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                43 weeks, 4 days ago

                Packages

                Version Package
                7.0.0 DXP FP80
                7.0.10.11 DXP SP11
                7.0.X
                7.1.10 DXP FP7
                7.1.10.2 SP2
                7.1.3 CE GA4
                7.1.X
                Master