Issue
- Custom OSGi module stops working and fails after an application server (i.e. Tomcat) restarts, and needs to be redeployed to get it to work again.
Environment
- DXP 7.4
Resolution
- Blacklist the OSGi components before restarting the server, using the following steps:
-
In the Control Panel, navigate to Configuration → System Settings → Module Container. The Component Blacklist screen appears.
-
In the Component Blacklist screen, add the names of components to disable, and click the Save button. The components disable immediately.

-
To export the blacklist, click on the Component Blacklist module’s Actions button (
) and then click Export. The blacklist configuration file then downloads (com.liferay.portal.component.blacklist.internal.ComponentBlacklistConfiguration.config). Here are contents of the file produced from the example list: -
Add the names of any components not already listed (e.g., components of modules not yet installed) that you want to prevent from enabling.
Note: Configuration values can’t contain extra spaces. Extra spaces can short-circuit lists or invalidate the configuration entry.
-
To deploy the configuration file, copy it into the folder
[Liferay Home]/osgi/configs. The Liferay Home folder is typically the app server’s parent folder. - Restart server
Additional Information