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
Disabling failing upgrade process of knowledge-base-portlet (unused now)
Long time ago we used KB portlet, but it is undeployed now. When running 6.2 -> 7.1 upgrade process, it still tries to update KB related tables, however, it fails with very strange exception:
INFO - Upgrading com.liferay.knowledge.base.internal.upgrade.v1_1_0.UpgradeExpandoTable
2018-07-11 08:22:44.792 INFO [main][UpgradeProcess:103] Failed upgrade process com.liferay.knowledge.base.internal.upgrade.v1_1_0.UpgradeExpandoTable in 1ms
INFO - Failed upgrade process com.liferay.knowledge.base.internal.upgrade.v1_1_0.UpgradeExpandoTable in 1ms
2018-07-11 08:22:44.797 ERROR [main][com_liferay_portal_upgrade_impl:97] Invocation to listener threw exception
com.liferay.portal.kernel.upgrade.UpgradeException: java.lang.ArrayIndexOutOfBoundsException: 0
at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:97)
at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:134)
...
Caused by: java.lang.ArrayIndexOutOfBoundsException: 0
at com.liferay.portal.util.PortalInstances.getDefaultCompanyId(PortalInstances.java:202)
at com.liferay.portal.util.PortalImpl.getDefaultCompanyId(PortalImpl.java:2102)
at com.liferay.portal.kernel.util.PortalUtil.getDefaultCompanyId(PortalUtil.java:900)
at com.liferay.knowledge.base.internal.upgrade.v1_1_0.UpgradeExpandoTable.doUpgrade(UpgradeExpandoTable.java:33)
at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:92)
Not sure why it cannot determine default company, this method works fine in various places in my customization.
Anyway, is there recommended method how to skip this KB upgrading step?
I've deleted the corresponding 'knowledge-base-portlet' row in release_ table, but then upgrade process was run as if KB version was 0.0.0.
So I restored DB and increased the build version in the release_ table to 300, so the upgrading is skipped.
I am still curious why KB module is upgraded even not used in my portal. Is upgrading process performed regardless particular module is present or not?
How do we get to know its due to KB portlet? Since I am also facing similar issue when migrating from 6.2 to 7.2 sp1Please share your findings.If I delete knowledge-base-portlet from release_ table, will upgrade take care of adding an entry with 0.0 version ? --Thanks
I am also facing similar issue when migrating from 6.2 to 7.2 sp1
"SP1" implies Liferay DXP: If you're running into problems during upgrading, you should open a support ticket. Also, make sure to always upgrade to the latest available Fixpack: Upgrade routines are part of what's updated, and maybe this is a behavior that's fixed already.
Support might be able to tell you.