Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Prashant Mirajkar
Liferay third party web application deployment issues
February 13, 2013 2:45 AM
Answer

Prashant Mirajkar

Rank: New Member

Posts: 22

Join Date: November 23, 2008

Recent Posts

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
Hitoshi Ozawa
RE: Liferay third party web application deployment issues
February 13, 2013 1:23 PM
Answer

Hitoshi Ozawa

Rank: Liferay Legend

Posts: 7949

Join Date: March 23, 2010

Recent Posts

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
RE: Liferay third party web application deployment issues
February 19, 2013 12:20 AM
Answer

Prashant Mirajkar

Rank: New Member

Posts: 22

Join Date: November 23, 2008

Recent Posts

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
RE: Liferay third party web application deployment issues
February 28, 2013 2:07 AM
Answer

Prashant Mirajkar

Rank: New Member

Posts: 22

Join Date: November 23, 2008

Recent Posts

Kind of my bad!

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

cheers, Prashant