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: Oracle DB Migration from Liferay 6.2 to Liferay DXP 7.0
Hi,
I am trying to do DB migration from 6.2 to liferay DXP 7.0 . After running db_upgrade.bat file i am getting the following exceptions,
com.liferay.portal.kernel.upgrade.UpgradeException: com.liferay.portal.kernel.upgrade.UpgradeException: java.util.concurrent.ExecutionException: java.sql.SQLSyntaxErrorException: ORA-00904: "COMPANYID": invalid identifier
at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:97)
at com.liferay.portal.kernel.upgrade.util.UpgradeProcessUtil._upgradeProcess(UpgradeProcessUtil.java:177)
at com.liferay.portal.kernel.upgrade.util.UpgradeProcessUtil.upgradeProcess(UpgradeProcessUtil.java:144)
at com.liferay.portal.kernel.upgrade.util.UpgradeProcessUtil.upgradeProcess(UpgradeProcessUtil.java:126)
at com.liferay.portal.events.StartupHelper.upgradeProcess(StartupHelper.java:171)
at com.liferay.portal.events.StartupHelperUtil.upgradeProcess(StartupHelperUtil.java:81)
at com.liferay.portal.tools.DBUpgrader.upgrade(DBUpgrader.java:156)
at com.liferay.portal.tools.DBUpgrader.main(DBUpgrader.java:102)
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: java.util.concurrent.ExecutionException: java.sql.SQLSyntaxErrorException: ORA-00904: "COMPANYID": invalid identifier
at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:97)
at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:122)
at com.liferay.portal.upgrade.UpgradeProcess_7_0_0.doUpgrade(UpgradeProcess_7_0_0.java:78)
at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:92)
... 12 more
Caused by: java.util.concurrent.ExecutionException: java.sql.SQLSyntaxErrorException: ORA-00904: "COMPANYID": invalid identifier
at java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.util.concurrent.FutureTask.get(FutureTask.java:192)
at com.liferay.portal.upgrade.util.UpgradeCompanyId.doUpgrade(UpgradeCompanyId.java:65)
at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:92)
... 15 more
Upgrade logs are attached for reference.
I am trying to do DB migration from 6.2 to liferay DXP 7.0 . After running db_upgrade.bat file i am getting the following exceptions,
com.liferay.portal.kernel.upgrade.UpgradeException: com.liferay.portal.kernel.upgrade.UpgradeException: java.util.concurrent.ExecutionException: java.sql.SQLSyntaxErrorException: ORA-00904: "COMPANYID": invalid identifier
at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:97)
at com.liferay.portal.kernel.upgrade.util.UpgradeProcessUtil._upgradeProcess(UpgradeProcessUtil.java:177)
at com.liferay.portal.kernel.upgrade.util.UpgradeProcessUtil.upgradeProcess(UpgradeProcessUtil.java:144)
at com.liferay.portal.kernel.upgrade.util.UpgradeProcessUtil.upgradeProcess(UpgradeProcessUtil.java:126)
at com.liferay.portal.events.StartupHelper.upgradeProcess(StartupHelper.java:171)
at com.liferay.portal.events.StartupHelperUtil.upgradeProcess(StartupHelperUtil.java:81)
at com.liferay.portal.tools.DBUpgrader.upgrade(DBUpgrader.java:156)
at com.liferay.portal.tools.DBUpgrader.main(DBUpgrader.java:102)
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: java.util.concurrent.ExecutionException: java.sql.SQLSyntaxErrorException: ORA-00904: "COMPANYID": invalid identifier
at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:97)
at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:122)
at com.liferay.portal.upgrade.UpgradeProcess_7_0_0.doUpgrade(UpgradeProcess_7_0_0.java:78)
at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:92)
... 12 more
Caused by: java.util.concurrent.ExecutionException: java.sql.SQLSyntaxErrorException: ORA-00904: "COMPANYID": invalid identifier
at java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.util.concurrent.FutureTask.get(FutureTask.java:192)
at com.liferay.portal.upgrade.util.UpgradeCompanyId.doUpgrade(UpgradeCompanyId.java:65)
at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:92)
... 15 more
Upgrade logs are attached for reference.
Attachments:
Hi Syed,
It's really strange because the process which is failing verifies first if the column companyId exist and then update its value so it shouldn't return "COMPANYID": invalid identifier. I got some strange problems like this with Oracle when the user I have used to connect to the database has persmission to see other Liferay's schemas, could you verify this? If so, please use a user which only can see the schema which you are trying to upgrade.
I hope it helps.
Best regards.
It's really strange because the process which is failing verifies first if the column companyId exist and then update its value so it shouldn't return "COMPANYID": invalid identifier. I got some strange problems like this with Oracle when the user I have used to connect to the database has persmission to see other Liferay's schemas, could you verify this? If so, please use a user which only can see the schema which you are trying to upgrade.
I hope it helps.
Best regards.
Before trying liferay dxp 7.0 migration i was able to successfully migrate for liferay 7.1 CE from lifery 6.2. But in liferay dxp 7.0 i am getting these specific entries in log file,
2019-02-22 11:08:49.993 INFO [pool-3-thread-10][UpgradeCompanyId:116] Skipping the creation of companyId column for table Groups_Roles
2019-02-22 11:08:49.968 INFO [pool-3-thread-8][UpgradeCompanyId:116] Skipping the creation of companyId column for table DLSyncEvent
2019-02-22 11:08:49.968 INFO [pool-3-thread-1][UpgradeCompanyId:116] Skipping the creation of companyId column for table AnnouncementsFlag
2019-02-22 11:08:49.966 INFO [pool-3-thread-9][UpgradeCompanyId:116] Skipping the creation of companyId column for table Groups_Orgs
2019-02-22 11:08:49.966 INFO [pool-3-thread-3][UpgradeCompanyId:116] Skipping the creation of companyId column for table AssetEntries_AssetTags
Also getting this,
2019-02-25 12:10:12.376 WARN [main][UpgradeProcess:438] Attempting to upgrade table AssetEntry by recreating the table due to: ORA-22859: invalid modification of columns_ [Sanitized]
But was able to successfully create compay id coloumns in previous migration of 7.1 CE.
Any help in this matter is highly appreciated.
Thanks
2019-02-22 11:08:49.993 INFO [pool-3-thread-10][UpgradeCompanyId:116] Skipping the creation of companyId column for table Groups_Roles
2019-02-22 11:08:49.968 INFO [pool-3-thread-8][UpgradeCompanyId:116] Skipping the creation of companyId column for table DLSyncEvent
2019-02-22 11:08:49.968 INFO [pool-3-thread-1][UpgradeCompanyId:116] Skipping the creation of companyId column for table AnnouncementsFlag
2019-02-22 11:08:49.966 INFO [pool-3-thread-9][UpgradeCompanyId:116] Skipping the creation of companyId column for table Groups_Orgs
2019-02-22 11:08:49.966 INFO [pool-3-thread-3][UpgradeCompanyId:116] Skipping the creation of companyId column for table AssetEntries_AssetTags
Also getting this,
2019-02-25 12:10:12.376 WARN [main][UpgradeProcess:438] Attempting to upgrade table AssetEntry by recreating the table due to: ORA-22859: invalid modification of columns_ [Sanitized]
But was able to successfully create compay id coloumns in previous migration of 7.1 CE.
Any help in this matter is highly appreciated.
Thanks
Attachments:
Hi Syed,
As I said before, the reason for traces like this:
2019-02-22 11:08:49.993 INFO [pool-3-thread-10][UpgradeCompanyId:116] Skipping the creation of companyId column for table Groups_Roles
is because the column companyId already exists in the table. However after that the process fails because the column does not exist. For that reason, could you verify:
Regarding this:
2019-02-25 12:10:12.376 WARN [main][UpgradeProcess:438] Attempting to upgrade table AssetEntry by recreating the table due to: ORA-22859: invalid modification of columns_ [Sanitized]
This is normal in Oracle since some alter are not allowed so the portal needs to recreate the table (notice that it is a warning)
Best regards.
As I said before, the reason for traces like this:
2019-02-22 11:08:49.993 INFO [pool-3-thread-10][UpgradeCompanyId:116] Skipping the creation of companyId column for table Groups_Roles
is because the column companyId already exists in the table. However after that the process fails because the column does not exist. For that reason, could you verify:
- if the skipped tables contain that column?
- Could you also verify if the database user you are using can see other Liferay schemas in the database? (in this case the process can access to that schema instead of the one we are performing the upgrade and skip the creation of the column because in that schema the tables already contain the column)
Regarding this:
2019-02-25 12:10:12.376 WARN [main][UpgradeProcess:438] Attempting to upgrade table AssetEntry by recreating the table due to: ORA-22859: invalid modification of columns_ [Sanitized]
This is normal in Oracle since some alter are not allowed so the portal needs to recreate the table (notice that it is a warning)
Best regards.
Thanks Alberto, After shifting my old db to new server and then executing the upgrade process resolved all the issues and the migration is successful.
Attached all the log files of successful migration. Please can you go through it and let me know if it is 100% successfull.
Thanks again
Attached all the log files of successful migration. Please can you go through it and let me know if it is 100% successfull.
Thanks again
Attachments:
Hi Syed,
I am glad to hear that, in these cases to be sure that upgrade finished properly is recommended to execute the following commands in the Gogo console:
- upgrade:check (it returns pending upgrade processes)
- dm wtf (it returns pending modules which have any dependency unsatisfied. In some cases there are no pending upgrades because the dependencies are not fulfilled)
At first glance the log looks fine, you only got an error in the marketplace portlet but it's not problematic because its upgrade continues.
Best regards.
I am glad to hear that, in these cases to be sure that upgrade finished properly is recommended to execute the following commands in the Gogo console:
- upgrade:check (it returns pending upgrade processes)
- dm wtf (it returns pending modules which have any dependency unsatisfied. In some cases there are no pending upgrades because the dependencies are not fulfilled)
At first glance the log looks fine, you only got an error in the marketplace portlet but it's not problematic because its upgrade continues.
Best regards.