フォーラム

ホーム » Liferay Portal » English » 3. Development

構造的に表示 平面上に表示 ツリー上に表示
スレッド [ 前へ | 次へ ]
toggle
Jordi Fontanals
Context.xml is ignored in LR 6.1.1 GA2
2012/08/16 11:01
答え

Jordi Fontanals

ランク: New Member

投稿: 3

参加年月日: 2012/01/26

最近の投稿

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
2012/08/20 2:06
答え

Philipp Glatzl

ランク: New Member

投稿: 17

参加年月日: 2012/02/27

最近の投稿

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
2012/08/24 2:42
答え

Domingo Piña

ランク: Junior Member

投稿: 28

参加年月日: 2009/04/03

最近の投稿

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
2012/09/07 0:20
答え

Philipp Glatzl

ランク: New Member

投稿: 17

参加年月日: 2012/02/27

最近の投稿

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
2012/09/07 0:34
答え

Harish Kumar

ランク: Expert

投稿: 473

参加年月日: 2010/07/31

最近の投稿

may be you guys are interested in this link
Jordi Fontanals
RE: Context.xml is ignored in LR 6.1.1 GA2
2012/09/07 1:33
答え

Jordi Fontanals

ランク: New Member

投稿: 3

参加年月日: 2012/01/26

最近の投稿

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
2012/09/07 17:56
答え

Shinn Lok

LIFERAY STAFF

ランク: Junior Member

投稿: 86

参加年月日: 2011/01/14

最近の投稿

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
2012/09/08 3:48
答え

Jordi Fontanals

ランク: New Member

投稿: 3

参加年月日: 2012/01/26

最近の投稿

Thank you very much!!
David J Godbey
RE: Context.xml is ignored in LR 6.1.1 GA2
2013/04/22 9:31
答え

David J Godbey

ランク: New Member

投稿: 2

参加年月日: 2010/10/14

最近の投稿

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
2013/07/05 12:49
答え

Rasto Rehak

ランク: Junior Member

投稿: 63

参加年月日: 2007/03/08

最近の投稿

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