1
votes

I am trying to migrate a Liferay6.2 database to 7.1.1 version. After setting up the database-upgrade-tool configuration and running db_upgrade.bat, I got the following error:

2019-01-12 12:52:45.959 INFO  [main][LoggingTimer:43] Completed com.liferay.portal.upgrade.v7_0_0.UpgradeMySQL#upgradeDatetimePrecision in 58896 ms
2019-01-12 12:52:45.959 INFO  [main][UpgradeProcess:107] Failed upgrade process com.liferay.portal.upgrade.v7_0_0.UpgradeMySQL in 58896 ms
2019-01-12 12:52:45.959 INFO  [main][UpgradeProcess:107] Failed upgrade process com.liferay.portal.upgrade.UpgradeProcess_7_0_0 in 85615 ms
com.liferay.portal.kernel.upgrade.UpgradeException: com.liferay.portal.kernel.upgrade.UpgradeException: java.lang.IllegalStateException: Table BookmarksEntry does not have column lastPublishDate

Exact versions are:

  • liferay-portal-6.2.0-ce-rc6
  • liferay-ce-portal-7.1.1-ga2

I am using \liferay-ce-portal-7.1.1-ga2\tools\portal-tools-db-upgrade-client on Windows 10.

Here are my db-tool configs:

app-server.properties

dir=E:/Projects/MyProject/liferay-ce-portal-7.1.1-ga2/tomcat-9.0.10
extra.lib.dirs=/bin
global.lib.dir=/lib
portal.dir=/webapps/ROOT
server.detector.server.id=tomcat

portal-upgrade-database.properties

jdbc.default.driverClassName=com.mysql.jdbc.Driver
jdbc.default.url=jdbc:mysql://localhost/ec711?characterEncoding=UTF-8&useUnicode=true&serverTimezone=GMT
jdbc.default.username=root
jdbc.default.password=pass

portal-upgrade-ext.properties

liferay.home=E:/Projects/MyProject/liferay-ce-portal-7.1.1-ga2
module.framework.base.dir=E:/Projects/MyProject/liferay-ce-portal-7.1.1-ga2/osgi

Did anyone experience something like this? Any advice much appreciated.

Thank you!

1
There's a very good chance that your source version is the root of the problems: You're stating that you're upgrading from an RC, and the upgrade routines are AFAIK tested on the released versions. I'd suggest to bring your 6.2 RC to a proper release first - while you're at it, I'd choose the last available 6.2 GA version. Once that runs properly, take care of the upgrade to 7.1Olaf Kock
Thanks Olaf, unfortunately that didn't work out. I've moved my database under 6.2 GA5 (the latest GA version), started it successfully, then tried the above migration steps and got the same error again. I guess there is probably some issues in the db-tool itself. Also, I then created an SQL of missing fields, which helped to get rid of the above error, but then I got a different one - for some reason is gave me "lportal.Account_ table cannot be found", even though this was a different database which wasn't mentioned in the db-tool configs.Artem Khojoyan
Hm - I've done an upgrade during, and upgrading 6.2 to 7.1 is precisely the scenario we cover in the Upgrade Training, which I've delivered last year, and there was no such issue. As of loprtal.Account_ not being found: This would be a cause for Liferay not running at all - did you validate that it's there, or that the database exists and the user you're using to connect to the database has access? If your installation ever touched Mysql/Windows, you might suffer from wrong capitalization of table names.Olaf Kock

1 Answers

1
votes

I've seen an error similar to this one when attempting an upgrade -- it was due to having an incompatible MySQL version.

I assume you're using MySQL as your database from your upgrade properties. Looking at Liferay's 7.1 DXP Compatibility Matrix, the only version of MySQL certified for 7.1 is MySQL 5.7; while I believe Liferay 6.2 could use either MySQL 5.5 and 5.6.

Make sure to back everything up beforehand, but try updating your database to MySQL 5.7 and running the upgrade again.