In Liferay 7, I have put a module JAR into deploy/
, then I uninstalled it via Gogo Shell, and now I want to install it again.
PROBLEM: When I copy it again into deploy/
I get this error:
INFO [com.liferay.portal.kernel.deploy.auto.AutoDeployScanner][AutoDeployDir:252] Processing httpclient-osgi-4.5.3.jar
WARN [fileinstall-/home/nico/liferay/osgi/modules][org_apache_felix_fileinstall:103] Failed to update bundle: /home/nico/liferay/osgi/modules/httpclient-osgi-4.5.3.jar with ID 1088. The bundle has been uninstalled
How to solve this?
When you deploy something via Liferay's deploy
folder, it gets introduced into the OSGi runtime through a mechanism called FileInstall.
When you undeploy from the running system through Gogo shell, the component gets uninstalled, but the directory which is backing FileInstall still contains the bundle (meaning that it would be reinstalled on next deployment). Typically this is not what you want.
Rule of thumb: When you deploy through FileInstall, undeploy through FileInstall. When you deploy through Gogo Shell, undeploy through Gogo Shell. Do not mix both. Decide for one.
As Liferay is only using FileInstall, it's safe not to use Gogo Shell for productive deployments. Plus: Bundles installed through Gogo Shell won't end up in the directory that backs FileInstall. The bundle might not be there after redeployment (especially when you delete the osgi/state
folder, which is sometimes asked for.