Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Jordi Fontanals
Context.xml is ignored in LR 6.1.1 GA2
August 16, 2012 11:01 AM
Answer

Jordi Fontanals

Rank: New Member

Posts: 3

Join Date: January 26, 2012

Recent Posts

Hi all,

I have upgraded from 6.1.0 to 6.1.1 and I have encountered a problem with a plugin. This plugin is based on the example struts plugin provided by liferay and it uses the portal ClassLoader, thus it needs to include in META-INF/context.xml the next code:

1
2<Context>
3    <Loader
4        delegate="true"
5        loaderClass="com.liferay.support.tomcat.loader.PortalClassLoader"
6    />
7</Context>


This plugin worked fine in version 6.1.0 but it doesn't work in version 6.1.1. Investigating a little I found out that the context.xml, after the plugin is deployed, has changed and now is
1
2<Context
3    antiJARLocking="true"
4    antiResourceLocking="true"
5/>


Debugging that, it seems the class BaseDepoyer has been modified in this version and now it ignores the context.xml provided by the plugin and just copies the context.xml placed in /portal-trunk/portal-impl/src/com/liferay/portal/deploy/dependencies/context.xml. So, the question is: How could I force my plugin to use the portal class loader if I can't define it in META-INF/context.xml?

Many thanks in advance.

Jordi
Philipp Glatzl
RE: Context.xml is ignored in LR 6.1.1 GA2
August 20, 2012 2:06 AM
Answer

Philipp Glatzl

Rank: New Member

Posts: 17

Join Date: February 27, 2012

Recent Posts

Hi Jordi, hi all,

I have the same problem. The only difference is that we define a path to the hibernate configuration inside our context.xml

Thanks in advance,
Philipp
Domingo Piña
RE: Context.xml is ignored in LR 6.1.1 GA2
August 24, 2012 2:42 AM
Answer

Domingo Piña

Rank: Junior Member

Posts: 28

Join Date: April 3, 2009

Recent Posts

Hi,

I have the same problem.
Portlets running in LR 6.0.6 CE and using context.xml to set the Loader, don't work in LR 6.1.1 GA2.
Philipp Glatzl
RE: Context.xml is ignored in LR 6.1.1 GA2
September 7, 2012 12:20 AM
Answer

Philipp Glatzl

Rank: New Member

Posts: 17

Join Date: February 27, 2012

Recent Posts

Hello is there a workaraound to use the context.xml i have wrote?
Harish Kumar
RE: Context.xml is ignored in LR 6.1.1 GA2
September 7, 2012 12:34 AM
Answer

Harish Kumar

Rank: Expert

Posts: 471

Join Date: July 31, 2010

Recent Posts

may be you guys are interested in this link
Jordi Fontanals
RE: Context.xml is ignored in LR 6.1.1 GA2
September 7, 2012 1:33 AM
Answer

Jordi Fontanals

Rank: New Member

Posts: 3

Join Date: January 26, 2012

Recent Posts

Hi Harish,

I'm afraid it's not the same issue: my (our) problem is that the context.xml file in /META-INF folder is ignored and is replaced by a completely different context.xml file during deployment. In the case of the link you provided the problem is that the elements in web.xml file are sorted alphabetically during deployment and breaks the order.

Thanks anyway!!

Jordi
Shinn Lok
RE: Context.xml is ignored in LR 6.1.1 GA2
September 7, 2012 5:56 PM
Answer

Shinn Lok

LIFERAY STAFF

Rank: Junior Member

Posts: 86

Join Date: January 14, 2011

Recent Posts

It has been fixed here:

http://issues.liferay.com/browse/LPS-29750
Jordi Fontanals
RE: Context.xml is ignored in LR 6.1.1 GA2
September 8, 2012 3:48 AM
Answer

Jordi Fontanals

Rank: New Member

Posts: 3

Join Date: January 26, 2012

Recent Posts

Thank you very much!!
David J Godbey
RE: Context.xml is ignored in LR 6.1.1 GA2
April 22, 2013 9:31 AM
Answer

David J Godbey

Rank: New Member

Posts: 2

Join Date: October 14, 2010

Recent Posts

We have the same problem, and I looked at this link. It doesn't appear to address the lost Resource and Environment tags from the plugin supplied context.xml file.

Did you create a patch for this issue?

I noticed you can workaround by manually editing the DEPLOYED context.xml file, but this is probably not recommended.
Rasto Rehak
RE: Context.xml is ignored in LR 6.1.1 GA2
July 5, 2013 12:49 PM
Answer

Rasto Rehak

Rank: Junior Member

Posts: 63

Join Date: March 8, 2007

Recent Posts

Hi
a bit late response but workaround for 6.1.1 CE is:
copy your desired META-INF/context.xml to <tomcat>/conf/Catalina/localhost/<your_webapp>.xml
Maybe also edit in <tomcat>/conf/server.xml

1      <Host name="localhost"  appBase="webapps"
2            unpackWARs="true" autoDeploy="true" deployXML="false" >


http://tomcat.apache.org/tomcat-7.0-doc/config/host.html