Issue
- After the upgrade from Liferay DXP 7.4 to update 75 or above, the following error is showing on the console for non-liferay user domains:
ERROR [main][BatchEngineUnitProcessorImpl:279] Unable to get default company ID com.liferay.portal.kernel.exception.NoSuchCompanyException: No Company exists with the key {webId=gmail.com}
at com.liferay.portal.service.persistence.impl.CompanyPersistenceImpl.findByWebId(CompanyPersistenceImpl.java:117) ~[portal-impl.jar:?]
at com.liferay.portal.service.impl.CompanyLocalServiceImpl.getCompanyByWebId(CompanyLocalServiceImpl.java:611) ~[portal-impl.jar:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_221]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_221]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_221]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_221]
Environment
- Liferay DXP 7.4
Resolution
- The cause of the issue is that the default company was created with the domain gmail.com on a previous version; however, on update 75 or above, there were some changes and you need to set that property explicity, otherwise liferay.com is used by default.
- In order to address this issue, the user should need to add this property
company.default.web.id=gmail.com
intotools/portal-tools-db-upgrade-client/portal-upgrade-ext.properties
before running the upgrade client tool.
Note: The user must specify the domain that they've used in their previous update. -
Additionally, to perform the upgrade properly, user should copy all the relevant properties, including
company.default.web.id
, intoportal-upgrade-ext.properties
file.
Additional Information
-
If the user doesn’t want to re-run the upgrade, they should set
company.default.web.id=gmail.com
inportal-ext.properties
orportal-setup-wizard.properties
file. - See also this Liferay blog post: Unable to get default company ID Exceptions
- Admin will not be allowed if they doesn't contain the domain @liferay.com