掲示板

Context.xml is ignored in LR 6.1.1 GA2

thumbnail
11年前 に Jordi Fontanals によって更新されました。

Context.xml is ignored in LR 6.1.1 GA2

New Member 投稿: 3 参加年月日: 12/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:


<context>
	<loader delegate="true" loaderClass="com.liferay.support.tomcat.loader.PortalClassLoader" />
</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

<context antiJARLocking="true" antiResourceLocking="true" />


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
11年前 に Philipp Glatzl によって更新されました。

RE: Context.xml is ignored in LR 6.1.1 GA2

New Member 投稿: 23 参加年月日: 12/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
thumbnail
11年前 に Domingo Piña によって更新されました。

RE: Context.xml is ignored in LR 6.1.1 GA2

Junior Member 投稿: 28 参加年月日: 09/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.
11年前 に Philipp Glatzl によって更新されました。

RE: Context.xml is ignored in LR 6.1.1 GA2

New Member 投稿: 23 参加年月日: 12/02/27 最新の投稿
Hello is there a workaraound to use the context.xml i have wrote?
thumbnail
11年前 に Harish Kumar によって更新されました。

RE: Context.xml is ignored in LR 6.1.1 GA2

Expert 投稿: 483 参加年月日: 10/07/31 最新の投稿
may be you guys are interested in this link
thumbnail
11年前 に Jordi Fontanals によって更新されました。

RE: Context.xml is ignored in LR 6.1.1 GA2

New Member 投稿: 3 参加年月日: 12/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
thumbnail
11年前 に Shinn Lok によって更新されました。

RE: Context.xml is ignored in LR 6.1.1 GA2

Junior Member 投稿: 89 参加年月日: 11/01/14 最新の投稿
thumbnail
11年前 に Jordi Fontanals によって更新されました。

RE: Context.xml is ignored in LR 6.1.1 GA2

New Member 投稿: 3 参加年月日: 12/01/26 最新の投稿
Thank you very much!!
11年前 に David J Godbey によって更新されました。

RE: Context.xml is ignored in LR 6.1.1 GA2

New Member 投稿: 6 参加年月日: 10/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.
thumbnail
10年前 に Rasto Rehak によって更新されました。

RE: Context.xml is ignored in LR 6.1.1 GA2

Junior Member 投稿: 66 参加年月日: 07/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

      <host name="localhost" appbase="webapps" unpackwars="true" autodeploy="true" deployxml="false"></host>


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