Foros de discusión

Liferay third party web application deployment issues

Prashant Mirajkar, modificado hace 11 años.

Liferay third party web application deployment issues

New Member Mensajes: 22 Fecha de incorporación: 24/11/08 Mensajes recientes
Environment - Liferay version 6.1.1-ce-ga2, Tomcat 6.0.36, Ubuntu
The web application is in production with Liferay 5.2.3.

When I deploy web application war auto deploy copies files. Liferay emits message Portlets for xxx copied successfully. Deployment will start in a few seconds.

I have seen two behaviors after that -
1) Nothing happens OR
2) Context is reloaded for the application. Application context initialization fails due to autowiring failure in Spring. Webapp root is set to a subdirectory in system temporary directory.
The deployment creates application context configuration descriptor in ${catalina.base}/conf/Catalina/localhost directory.

When I restart Tomcat -

Tomcat deploys configuration descriptor of application before ROOT.xml is loaded. Webapp.root for the application is set to a subdirectory in system temporary directory. The application is copied in this subdir.
All application portlets are deployed successfully!

** Why does the deployment process create application context configuration descriptor in ${catalina.base}/conf/Catalina/localhost directory?
** Why webapp.root is set to subdirectory in system temp dir?
** Why application context is loaded before ROOT?


Addendum:

With Tomcat 7, application context configuration descriptor in ${catalina.base}/conf/Catalina/localhost directory is not created, however the webapp.root is set to system temp directory with application copied. And then I get application context errors failing to deploy portlets. If I create the configuration descriptor, then application runs!

thanks in advance,

Prashant
thumbnail
Hitoshi Ozawa, modificado hace 11 años.

RE: Liferay third party web application deployment issues

Liferay Legend Mensajes: 7942 Fecha de incorporación: 24/03/10 Mensajes recientes
Environment - Liferay version 6.1.1-ce-ga2, Tomcat 6.0.36, Ubuntu
The web application is in production with Liferay 5.2.3.


What do you mean by this? Are you using 6.1.1 GA2 or 5.2.3?

Portlets developed for 5.2.3 may not deploy properly on 6.1.1 GA2.
Prashant Mirajkar, modificado hace 11 años.

RE: Liferay third party web application deployment issues

New Member Mensajes: 22 Fecha de incorporación: 24/11/08 Mensajes recientes
It all depends upon how one manages the liferay dependencies. My portlets do work on 5.2.3 as well as 6.1.1 GA2.

My question is about the way deployment takes place. Just to elaborate....

when application is war is deployed under 6.1.1 GA2, all application files do get copied in webapps/{appname} folder as expected. However while running an application folder gets created in system temporary directory with all application files and tomcat uses these files/resources, i.e. system property webapp.root for application points to /tmp/0/{appname}

In case of 5.2.3, tomcat (same version used for both 5.2.3 and 6.1.1) uses all the files/resources in webapps/{appname}, i.e. system property webapp.root for application points to ${catalina.home}/webapps/{appname}.

Tomcat versions and configurations are same for both versions of liferay. That means liferay 6.1.1 creates context configuration descriptor in ${catalina.base}/conf/Catalina/localhost directory with default context path, i.e. blank and hence webapp.root system property changes to /tmp/0/{appname}. The manual work around is to change the context configuration with context path pointing to ${catalina.home}/webapps/{appname}. But I don't want to have any manual intervention in deploying the application.

cheers, Prashant
Prashant Mirajkar, modificado hace 11 años.

RE: Liferay third party web application deployment issues

New Member Mensajes: 22 Fecha de incorporación: 24/11/08 Mensajes recientes
Kind of my bad!

The issue is to do with antiResourceLocking parameter in context.xml of web application.

cheers, Prashant