Unable to set auto deploy directory on Liferay Portal 6.0

喜夏-厌秋 提交于 2020-01-05 04:33:07

问题


I am working with Liferay 6.0 on JBoss 5.1.1, Windows 8 is the OS. On server startup I always get the following error explaining the auto deploy directory can't be found:

ERROR [AutoDeployDir:90] Directory F:\liferay-portal-ee-6.0\deploy could not be created

This makes sense because I don't have an F: drive. However, I'm unable to configure it in the portal-ext.properties file as explained here. When I log into the Liferay control panel, and look under Portal Administration -> Portal Properties, I can see that the value I put in ext.properties is indeed displayed as the value for auto.deploy.deploy.dir. However, when the server starts up, it is using F:\liferay-portal-ee-6.0\deploy as the auto deploy directory and logging the error above. I have debugged the GlobalStartupAction class which initializes Liferay's auto deploy and I can see that it's calling PrefsPropsUtil.getString(String, String) to retrieve the value for the auto deploy directory and it's passing the value I set in portal-ext.properties as the second argument, according to the PrefsPropsUtil Java doc the second argument is a default value. When I dig down into the PrefsPropsUtil.getString call I can see that it's using an instance of PortalPreferencesLocalServiceImpl to retrieve a list of properties by companyId, ownerId and ownerType which are set to 0, 0 and 1 respectively. Since the PortalPreferencesLocalServiceImpl is "local" I'm assuming it's not going to a different machine to retrieve values. I've done extensive directory and file searching for references to auto.deploy.deploy.dir and values like F:\liferay-portal-ee-6.0 and I'm unable to fine where this property is getting set. Where is this value coming from and why isn't my override being used?


回答1:


Since you are using Liferay 6.0, go to Control Panel-> Plugins Installation -> Install More Portlets -> Configuration.

In the configuration tab, you may see the Deploy directory set to be F:\liferay-portal-ee-6.0\deploy

This may be because either someone has modified the value from the control panel or you are using database dump from some other existing Liferay installation.




回答2:


You can use auto.deploy.dest.dir property in portal-ext.properties to set auto deploy path.

i.e

auto.deploy.dest.dir=C:/../../autodeploy

HTH



来源:https://stackoverflow.com/questions/17559327/unable-to-set-auto-deploy-directory-on-liferay-portal-6-0

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!