Set a wrong WebId causes "Unable to get company ID" after upgrade.
How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!
While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.
Legacy Article
You are viewing an article from our legacy "FastTrack"
publication program, made available for informational purposes. Articles
in this program were published without a requirement for independent
editing or verification and are provided"as is" without
guarantee.
Before using any information from this article, independently verify its
suitability for your situation and project.
Issue
- After upgrade from DXP 7.3 to 7.4 the following error is displayed:
2023-10-24 17:28:16.854 ERROR [SCR Component Actor][ROOT:47] bundle com.liferay.portal.properties.swapper:5.0.24 (179)[com.liferay.portal.properties.swapper.internal.SwapDefaultGuestGroupLogoPortalInstanceLifecycleListener(11661)] : The activate method has thrown an exception
java.lang.IllegalStateException: Unable to get default company ID
at com.liferay.portal.kernel.instance.PortalInstancePool.getDefaultCompanyId(PortalInstancePool.java:40) ~[portal-kernel.jar:?]
at com.liferay.portal.util.PortalInstances.getDefaultCompanyId(PortalInstances.java:226) ~[portal-impl.jar:?]
at com.liferay.portal.util.PortalImpl.getDefaultCompanyId(PortalImpl.java:2356) ~[portal-impl.jar:?]
at com.liferay.portal.properties.swapper.internal.SwapDefaultGuestGroupLogoPortalInstanceLifecycleListener.activate(SwapDefaultGuestGroupLogoPortalInstanceLifecycleListener.java:82) ~[?:?]
[...]
Resolution
- The main problem is that value of the property
company.default.web.id= in portal-ext.properties has been set to companyId instead of webId.
- In order to fix this problem, this property must be set with the Web Id value found in Control Panel > Configuration > Virtual Instances.
Did this article resolve your issue ?