Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
RE: Upgrade from 6.2 to 7.2
I'm upgrading from 6.2-ee-sp20 to 7.2.10 GA1 and am getting the following failed upgrade process:
(It's for a start only a MySQL DB upgrade)
2019-10-19 15:02:37.767 INFO [main][UpgradeProcess:107] Failed upgrade process com.liferay.portal.upgrade.v7_0_0.UpgradeLastPublishDate in 5 ms
2019-10-19 15:02:37.768 INFO [main][UpgradeProcess:107] Failed upgrade process com.liferay.portal.upgrade.UpgradeProcess_7_0_0 in 7377 ms
Following is part of the upgrade.log
2019-10-19 15:02:37.417 INFO [main][LoggingTimer:43] Completed com.liferay.portal.kernel.upgrade.RenameUpgradePortalPreferences#updatePreferences#PortalPreferences in 1 ms
2019-10-19 15:02:37.418 INFO [main][UpgradeProcess:107] Completed upgrade process com.liferay.portal.upgrade.v7_0_0.UpgradeEmailNotificationPreferences in 35 ms
2019-10-19 15:02:37.418 INFO [main][UpgradeProcess:93] Upgrading com.liferay.portal.upgrade.v7_0_0.UpgradeExpando
2019-10-19 15:02:37.419 INFO [main][LoggingTimer:83] Starting com.liferay.portal.kernel.upgrade.UpgradeProcess#alter
2019-10-19 15:02:37.431 INFO [main][LoggingTimer:43] Completed com.liferay.portal.kernel.upgrade.UpgradeProcess#alter in 11 ms
2019-10-19 15:02:37.432 INFO [main][LoggingTimer:83] Starting com.liferay.portal.kernel.upgrade.UpgradeProcess#alter
2019-10-19 15:02:37.444 INFO [main][LoggingTimer:43] Completed com.liferay.portal.kernel.upgrade.UpgradeProcess#alter in 12 ms
2019-10-19 15:02:37.444 INFO [main][UpgradeProcess:107] Completed upgrade process com.liferay.portal.upgrade.v7_0_0.UpgradeExpando in 26 ms
2019-10-19 15:02:37.445 INFO [main][UpgradeProcess:93] Upgrading com.liferay.portal.upgrade.v7_0_0.UpgradeGroup
2019-10-19 15:02:37.446 INFO [main][LoggingTimer:83] Starting com.liferay.portal.kernel.upgrade.UpgradeProcess#alter
2019-10-19 15:02:37.485 INFO [main][LoggingTimer:43] Completed com.liferay.portal.kernel.upgrade.UpgradeProcess#alter in 39 ms
2019-10-19 15:02:37.485 INFO [main][LoggingTimer:83] Starting com.liferay.portal.upgrade.v7_0_0.UpgradeGroup#createIndex
2019-10-19 15:02:37.493 INFO [main][LoggingTimer:43] Completed com.liferay.portal.upgrade.v7_0_0.UpgradeGroup#createIndex in 8 ms
2019-10-19 15:02:37.761 INFO [main][UpgradeProcess:107] Completed upgrade process com.liferay.portal.upgrade.v7_0_0.UpgradeGroup in 316 ms
2019-10-19 15:02:37.762 INFO [main][UpgradeProcess:93] Upgrading com.liferay.portal.upgrade.v7_0_0.UpgradeLastPublishDate
2019-10-19 15:02:37.762 INFO [main][LoggingTimer:83] Starting com.liferay.portal.upgrade.v7_0_0.UpgradeLastPublishDate#upgradeAssetCategoriesAdmin
2019-10-19 15:02:37.762 INFO [main][LoggingTimer:83] Starting com.liferay.portal.kernel.upgrade.BaseUpgradeLastPublishDate#addLastPublishDateColumn#AssetCategory
2019-10-19 15:02:37.767 INFO [main][LoggingTimer:43] Completed com.liferay.portal.kernel.upgrade.BaseUpgradeLastPublishDate#addLastPublishDateColumn#AssetCategory in 5 ms
2019-10-19 15:02:37.767 INFO [main][LoggingTimer:43] Completed com.liferay.portal.upgrade.v7_0_0.UpgradeLastPublishDate#upgradeAssetCategoriesAdmin in 5 ms
2019-10-19 15:02:37.767 INFO [main][UpgradeProcess:107] Failed upgrade process com.liferay.portal.upgrade.v7_0_0.UpgradeLastPublishDate in 5 ms
2019-10-19 15:02:37.768 INFO [main][UpgradeProcess:107] Failed upgrade process com.liferay.portal.upgrade.UpgradeProcess_7_0_0 in 7377 ms
com.liferay.portal.kernel.upgrade.UpgradeException: com.liferay.portal.kernel.upgrade.UpgradeException: java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(6) null' at line 1
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:171)
at com.liferay.portal.tools.DBUpgrader.main(DBUpgrader.java:104)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at com.liferay.portal.tools.db.upgrade.client.DBUpgraderLauncher.main(DBUpgraderLauncher.java:55)
Caused by: com.liferay.portal.kernel.upgrade.UpgradeException: java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(6) null' at line 1
at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:101)
at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:141)
at com.liferay.portal.upgrade.UpgradeProcess_7_0_0.doUpgrade(UpgradeProcess_7_0_0.java:93)
at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:96)
... 12 more
Caused by: java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(6) null' at line 1
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:120)
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97)
at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)
at com.mysql.cj.jdbc.StatementImpl.executeUpdateInternal(StatementImpl.java:1355)
at com.mysql.cj.jdbc.StatementImpl.executeLargeUpdate(StatementImpl.java:2128)
at com.mysql.cj.jdbc.StatementImpl.executeUpdate(StatementImpl.java:1264)
at com.zaxxer.hikari.pool.ProxyStatement.executeUpdate(ProxyStatement.java:117)
at com.zaxxer.hikari.pool.HikariProxyStatement.executeUpdate(HikariProxyStatement.java)
at com.liferay.portal.dao.db.BaseDB.runSQL(BaseDB.java:344)
at com.liferay.portal.dao.db.BaseDB.runSQL(BaseDB.java:310)
at com.liferay.portal.kernel.dao.db.BaseDBProcess.runSQL(BaseDBProcess.java:66)
at com.liferay.portal.kernel.upgrade.BaseUpgradeLastPublishDate.addLastPublishDateColumn(BaseUpgradeLastPublishDate.java:51)
at com.liferay.portal.upgrade.v7_0_0.UpgradeLastPublishDate.upgradeAssetCategoriesAdmin(UpgradeLastPublishDate.java:39)
at com.liferay.portal.upgrade.v7_0_0.UpgradeLastPublishDate.doUpgrade(UpgradeLastPublishDate.java:27)
at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:96)
... 15 more
Would be very welcoming if any ideas...Thanks
(It's for a start only a MySQL DB upgrade)
2019-10-19 15:02:37.767 INFO [main][UpgradeProcess:107] Failed upgrade process com.liferay.portal.upgrade.v7_0_0.UpgradeLastPublishDate in 5 ms
2019-10-19 15:02:37.768 INFO [main][UpgradeProcess:107] Failed upgrade process com.liferay.portal.upgrade.UpgradeProcess_7_0_0 in 7377 ms
Following is part of the upgrade.log
2019-10-19 15:02:37.417 INFO [main][LoggingTimer:43] Completed com.liferay.portal.kernel.upgrade.RenameUpgradePortalPreferences#updatePreferences#PortalPreferences in 1 ms
2019-10-19 15:02:37.418 INFO [main][UpgradeProcess:107] Completed upgrade process com.liferay.portal.upgrade.v7_0_0.UpgradeEmailNotificationPreferences in 35 ms
2019-10-19 15:02:37.418 INFO [main][UpgradeProcess:93] Upgrading com.liferay.portal.upgrade.v7_0_0.UpgradeExpando
2019-10-19 15:02:37.419 INFO [main][LoggingTimer:83] Starting com.liferay.portal.kernel.upgrade.UpgradeProcess#alter
2019-10-19 15:02:37.431 INFO [main][LoggingTimer:43] Completed com.liferay.portal.kernel.upgrade.UpgradeProcess#alter in 11 ms
2019-10-19 15:02:37.432 INFO [main][LoggingTimer:83] Starting com.liferay.portal.kernel.upgrade.UpgradeProcess#alter
2019-10-19 15:02:37.444 INFO [main][LoggingTimer:43] Completed com.liferay.portal.kernel.upgrade.UpgradeProcess#alter in 12 ms
2019-10-19 15:02:37.444 INFO [main][UpgradeProcess:107] Completed upgrade process com.liferay.portal.upgrade.v7_0_0.UpgradeExpando in 26 ms
2019-10-19 15:02:37.445 INFO [main][UpgradeProcess:93] Upgrading com.liferay.portal.upgrade.v7_0_0.UpgradeGroup
2019-10-19 15:02:37.446 INFO [main][LoggingTimer:83] Starting com.liferay.portal.kernel.upgrade.UpgradeProcess#alter
2019-10-19 15:02:37.485 INFO [main][LoggingTimer:43] Completed com.liferay.portal.kernel.upgrade.UpgradeProcess#alter in 39 ms
2019-10-19 15:02:37.485 INFO [main][LoggingTimer:83] Starting com.liferay.portal.upgrade.v7_0_0.UpgradeGroup#createIndex
2019-10-19 15:02:37.493 INFO [main][LoggingTimer:43] Completed com.liferay.portal.upgrade.v7_0_0.UpgradeGroup#createIndex in 8 ms
2019-10-19 15:02:37.761 INFO [main][UpgradeProcess:107] Completed upgrade process com.liferay.portal.upgrade.v7_0_0.UpgradeGroup in 316 ms
2019-10-19 15:02:37.762 INFO [main][UpgradeProcess:93] Upgrading com.liferay.portal.upgrade.v7_0_0.UpgradeLastPublishDate
2019-10-19 15:02:37.762 INFO [main][LoggingTimer:83] Starting com.liferay.portal.upgrade.v7_0_0.UpgradeLastPublishDate#upgradeAssetCategoriesAdmin
2019-10-19 15:02:37.762 INFO [main][LoggingTimer:83] Starting com.liferay.portal.kernel.upgrade.BaseUpgradeLastPublishDate#addLastPublishDateColumn#AssetCategory
2019-10-19 15:02:37.767 INFO [main][LoggingTimer:43] Completed com.liferay.portal.kernel.upgrade.BaseUpgradeLastPublishDate#addLastPublishDateColumn#AssetCategory in 5 ms
2019-10-19 15:02:37.767 INFO [main][LoggingTimer:43] Completed com.liferay.portal.upgrade.v7_0_0.UpgradeLastPublishDate#upgradeAssetCategoriesAdmin in 5 ms
2019-10-19 15:02:37.767 INFO [main][UpgradeProcess:107] Failed upgrade process com.liferay.portal.upgrade.v7_0_0.UpgradeLastPublishDate in 5 ms
2019-10-19 15:02:37.768 INFO [main][UpgradeProcess:107] Failed upgrade process com.liferay.portal.upgrade.UpgradeProcess_7_0_0 in 7377 ms
com.liferay.portal.kernel.upgrade.UpgradeException: com.liferay.portal.kernel.upgrade.UpgradeException: java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(6) null' at line 1
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:171)
at com.liferay.portal.tools.DBUpgrader.main(DBUpgrader.java:104)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at com.liferay.portal.tools.db.upgrade.client.DBUpgraderLauncher.main(DBUpgraderLauncher.java:55)
Caused by: com.liferay.portal.kernel.upgrade.UpgradeException: java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(6) null' at line 1
at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:101)
at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:141)
at com.liferay.portal.upgrade.UpgradeProcess_7_0_0.doUpgrade(UpgradeProcess_7_0_0.java:93)
at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:96)
... 12 more
Caused by: java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(6) null' at line 1
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:120)
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97)
at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)
at com.mysql.cj.jdbc.StatementImpl.executeUpdateInternal(StatementImpl.java:1355)
at com.mysql.cj.jdbc.StatementImpl.executeLargeUpdate(StatementImpl.java:2128)
at com.mysql.cj.jdbc.StatementImpl.executeUpdate(StatementImpl.java:1264)
at com.zaxxer.hikari.pool.ProxyStatement.executeUpdate(ProxyStatement.java:117)
at com.zaxxer.hikari.pool.HikariProxyStatement.executeUpdate(HikariProxyStatement.java)
at com.liferay.portal.dao.db.BaseDB.runSQL(BaseDB.java:344)
at com.liferay.portal.dao.db.BaseDB.runSQL(BaseDB.java:310)
at com.liferay.portal.kernel.dao.db.BaseDBProcess.runSQL(BaseDBProcess.java:66)
at com.liferay.portal.kernel.upgrade.BaseUpgradeLastPublishDate.addLastPublishDateColumn(BaseUpgradeLastPublishDate.java:51)
at com.liferay.portal.upgrade.v7_0_0.UpgradeLastPublishDate.upgradeAssetCategoriesAdmin(UpgradeLastPublishDate.java:39)
at com.liferay.portal.upgrade.v7_0_0.UpgradeLastPublishDate.doUpgrade(UpgradeLastPublishDate.java:27)
at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:96)
... 15 more
Would be very welcoming if any ideas...Thanks
The process is failing executing this SQL statement (adapt to MySQL syntax if necessary since we also do it before executing it):alter table AssetCategory add lastPublishDate DATE nullCan you execute it manually before the upgrade? you shouldn't get the error after this since the process validates it.Remember to use a aupported Mysql version.
Thanks @Alberto I'll give it a try...

You're welcome Soren, let us know if you get any other related issue.
Do you know @Alberto if there is a Liferay SQL fix pack where the issue is getting sorted?
Soren Pedersen:
You said you upgraded to 7.2 GA1, at the time when SP1 was already available - updates to upgrade routines always are embedded in later versions, and you should always use the latest available release for executing an upgrade, to get all the latest fixes.
Do you know @Alberto if there is a Liferay SQL fix pack where the issue is getting sorted?
You may want to try the same process on DXP 7.2 SP1. If the issue still occurs, open a ticket to make sure this is known and can be rolled into the next Fixpack.
Hi Soren,
I am almost sure that there is no bug here. This upgrade process belongs to the upgrade to 7.0 and thousands of upgrades have been executed successfully during this time. In fact, the code just executes this:
alter table AssetCategory add lastPublishDate DATE null
And that's perfectly good for Mysql syntax.
Please, verify that you are using Mysql 8 and execute the query using a SQL client to see what's the reason for failing. My guess is that it's related to your configuration or infrastructure.
Cheers.
I am almost sure that there is no bug here. This upgrade process belongs to the upgrade to 7.0 and thousands of upgrades have been executed successfully during this time. In fact, the code just executes this:
alter table AssetCategory add lastPublishDate DATE null
And that's perfectly good for Mysql syntax.
Please, verify that you are using Mysql 8 and execute the query using a SQL client to see what's the reason for failing. My guess is that it's related to your configuration or infrastructure.
Cheers.
Thanks for now Alberto... I'm all sorted out now, and you are very right it was my infrastructure... ;)
Glad to help! Thanks for the update Soren!
Copyright © 2025 Liferay, Inc
• Privacy Policy
Powered by Liferay™