掲示板

Liferay 6.2 Hook not correctly deployed to weblogic server 12c

thumbnail
8年前 に GUILLAUME PASQUIER によって更新されました。

Liferay 6.2 Hook not correctly deployed to weblogic server 12c

New Member 投稿: 11 参加年月日: 14/08/12 最新の投稿
Hello to all,
Using LR 6.2 EE SP10 I usually build and deploy correctly my WAR Applications to a Weblogic server 12c using:
mvn liferay:direct-deploy -DunpackWar=false

It works fine for Portlets, Theme and Layout, but for Hooks it seems incorrect.
The hooks contains:
language properties,
some jsp,
documentlibrary.ftl

+ It Works fine on Tomcat7...!!

The deployment looks ok but the hooks seems never applied on the LR instance.
Has someone already seen this ?

The log seems ok + application appears also in the LR App manager :
18:28:41,622 INFO [[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'][HotDeployImpl:217] Deploying xxx-hook from queue
18:28:41,622 INFO [[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'][PluginPackageUtil:1016] Reading plugin package for xxx-hook
18:28:41,856 INFO [[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'][HookHotDeployListener:693] Registering hook for xxx-hook
18:28:41,887 INFO [[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'][HookHotDeployListener:821] Hook for xxx-hook is available for use

Any ideas ?

Thanks a lot
thumbnail
8年前 に Andew Jardine によって更新されました。

RE: Liferay 6.2 Hook not correctly deployed to weblogic server 12c

Liferay Legend 投稿: 2416 参加年月日: 10/12/22 最新の投稿
Hi John,

Can you up the logging level on this class com.liferay.portal.tools.deploy.BaseDeployer to see if there are any additional messages?

In case you aren't sure how to do this:
1. Control Panel > Server Administration
2. Choose Log Levels tab
3. Choose Add Category
4. Place the package and class name and then set the level to ALL.

Save and try to deploy the hook again to see if any more details pop up.
thumbnail
8年前 に John LrUser によって更新されました。

RE: Liferay 6.2 Hook not correctly deployed to weblogic server 12c

New Member 投稿: 11 参加年月日: 14/08/12 最新の投稿
Hi Andew,
Thanks for your feedback !
I redeployed with enhanced Log levels.
It gives the following output, I can see no "error"..

09:57:20,645 INFO [[] : '8' for queue: 'weblogic.kernel.Default (self-tuning)'][HotDeployEvent:145] Plugin xxx-hook requires marketplace-portlet
09:57:20,645 INFO [[] : '8' for queue: 'weblogic.kernel.Default (self-tuning)'][HotDeployImpl:217] Deploying xxx-hook from queue
09:57:20,645 DEBUG [[] : '8' for queue: 'weblogic.kernel.Default (self-tuning)'][PluginPackageHotDeployListener:104] Invoking deploy for xxx-hook
09:57:20,645 INFO [[] : '8' for queue: 'weblogic.kernel.Default (self-tuning)'][PluginPackageUtil:1016] Reading plugin package for xxx-hook
09:57:20,785 DEBUG [[] : '8' for queue: 'weblogic.kernel.Default (self-tuning)'][PluginPackageHotDeployListener:211] Unable to read service.properties
09:57:20,879 DEBUG [[] : '8' for queue: 'weblogic.kernel.Default (self-tuning)'][PluginPackageHotDeployListener:262] Unable to read portlet.properties
09:57:20,879 INFO [[] : '8' for queue: 'weblogic.kernel.Default (self-tuning)'][PluginPackageHotDeployListener:139] Plugin package liferay/xxx-hook/-1.02-SNAPSHOT/war registered successfully. It's now ready to be used.
09:57:20,895 DEBUG [[] : '8' for queue: 'weblogic.kernel.Default (self-tuning)'][HookHotDeployListener:682] Invoking deploy for xxx-hook
09:57:20,895 INFO [[] : '8' for queue: 'weblogic.kernel.Default (self-tuning)'][HookHotDeployListener:693] Registering hook for xxx-hook
09:57:20,910 DEBUG [[] : '8' for queue: 'weblogic.kernel.Default (self-tuning)'][HookHotDeployListener:1279] Custom JSP directory: /jsp
09:57:20,926 DEBUG [[] : '8' for queue: 'weblogic.kernel.Default (self-tuning)'][HookHotDeployListener:1310] Custom JSP files:_null/jsp/html/js/journal/edit_article.js.old_null/jsp/html/portlet/journal/article/content.jsp_null/jsp/WEB-INF/classes/com/liferay/portlet/dynamicdatamapping/dependencies/ddm/documentlibrary.ftl [Sanitized]
09:57:20,926 INFO [[] : '8' for queue: 'weblogic.kernel.Default (self-tuning)'][HookHotDeployListener:821] Hook for xxx-hook is available for use

I also tried in Admin console to clean the various LR Caches, with no better results..

The liferay-plugin-package.xml content is :
<?xml version="1.0"?>
<!DOCTYPE plugin-package PUBLIC "-//Liferay//DTD Plugin Package 6.2.0//EN" "http://www.liferay.com/dtd/liferay-plugin-package_6_2_0.dtd">
<plugin-package>
<name><![CDATA[xxx-hooks]]> Hook</name>
<module-id>liferay/xxx-hook/-1.02-SNAPSHOT/war</module-id>
<recommended-deployment-context>xxx-hook</recommended-deployment-context>
<required-deployment-contexts></required-deployment-contexts>
<types>
<type>hook</type>
</types>
<tags></tags>
<short-description><![CDATA[]]></short-description>
<long-description><![CDATA[]]></long-description>
<change-log><![CDATA[]]></change-log>
<page-url>http://www.liferay.com</page-url>
<author><![CDATA[Liferay, Inc.]]></author>
<licenses>
<license osi-approved="true">LGPL</license>
</licenses>
<liferay-versions>
<liferay-version>6.2.0+</liferay-version>
</liferay-versions>
</plugin-package>
thumbnail
8年前 に Andew Jardine によって更新されました。

RE: Liferay 6.2 Hook not correctly deployed to weblogic server 12c

Liferay Legend 投稿: 2416 参加年月日: 10/12/22 最新の投稿
Hey John,

I use Tomcat myself and have never actually deployed the portal on WebLogic but am willing to rubber duck with you emoticon. Output looks pretty normal, but this looks a little odd to me --

09:57:20,926 DEBUG [[] : '8' for queue: 'weblogic.kernel.Default (self-tuning)'][HookHotDeployListener:1310] Custom JSP files:_null/jsp/html/js/journal/edit_article.js.old_null/jsp/html/portlet/journal/article/content.jsp_null/jsp/WEB-INF/classes/com/liferay/portlet/dynamicdatamapping/dependencies/ddm/documentlibrary.ftl

That's a strange path and the _null? is that normal?

One other thought -- I have also in the past had issues sometimes where hooks roll out but the changes are not seen. It was "cache" related but for me I had to clear the Tomcat work and temp folders before restarting to make sure that all the precompiled and cached stuff was gone. Does WebLogic have something like that?

Lastly, you could try setting this property in your portal-ext.properties


    #
    # Set this to true to undeploy a plugin before deploying a new version. This
    # property will only be used if the property "hot.undeploy.enabled" is set
    # to true.
    #
    hot.undeploy.on.redeploy=true


I've had some success with clients facing similar issues (again though, always on Tomcat) whereby undeploying before redeploying seemed to ensure the "new stuff" was picked up.

Give these a shot and let me know what you get.
thumbnail
8年前 に John LrUser によって更新されました。

RE: Liferay 6.2 Hook not correctly deployed to weblogic server 12c

New Member 投稿: 11 参加年月日: 14/08/12 最新の投稿
Thanks Andew for your inputs!

You're right, the "_null" string is obviously strange.
On a Tomcat it points to the tomcat7/temp working directory :

13:44:28,640 DEBUG [localhost-startStop-3][HookHotDeployListener:1279] Custom JSP directory: /jsp
13:44:28,640 DEBUG [localhost-startStop-3][HookHotDeployListener:1310] Custom JSP files:_C:\Applications\liferay-developer-studio\liferay-portal-6.2-ee-sp10\tomcat-7.0.42\temp\8-xx-hook\/jsp/html/js/journal/edit_article.js.old_C:\Applications\liferay-developer-studio\liferay-portal-6.2-ee-sp10\tomcat-7.0.42\temp\8-xx-hook\/jsp/html/portlet/journal/article/content.jsp_C:\Applications\liferay-developer-studio\liferay-portal-6.2-ee-sp10\tomcat-7.0.42\temp\8-xx-hook\/jsp/WEB-INF/classes/com/liferay/portlet/dynamicdatamapping/dependencies/ddm/documentlibrary.ftl [Sanitized]

In the LR admin server properties it looks close to the java.io.tmpdir property.
thumbnail
8年前 に Andew Jardine によって更新されました。

RE: Liferay 6.2 Hook not correctly deployed to weblogic server 12c

Liferay Legend 投稿: 2416 参加年月日: 10/12/22 最新の投稿
What happens if you specify a different temp location?
thumbnail
8年前 に John LrUser によって更新されました。

RE: Liferay 6.2 Hook not correctly deployed to weblogic server 12c

New Member 投稿: 11 参加年月日: 14/08/12 最新の投稿
Hello,
I compared with my local Tomcat env, + using Debug mode and portal-master-src.

The possible guilty seems to be HookHotDeployListener : doInvokeDeploy
String webDir = servletContext.getRealPath(StringPool.SLASH);

works fine with tomcat.
Returns null on Weblogic..

I searched.. and found to add in weblogic.xml the classic magic line:
<show-archived-real-path-enabled>true</show-archived-real-path-enabled>

But this one is already in the weblogic.xml of liferay WEB-INF !
Looks like this is not taken into account...
thumbnail
8年前 に John LrUser によって更新されました。

RE: Liferay 6.2 Hook not correctly deployed to weblogic server 12c (回答)

New Member 投稿: 11 参加年月日: 14/08/12 最新の投稿
Solved it !!
Now the Log is OK on Weblogic12c, and the Hooks are all applied to Liferay !

16:04:54,724 INFO [[ACTIVE] ExecuteThread: '3' for queue: 'weblogic.kernel.Default (self-tuning)'][HookHotDeployListener:693] Registering hook for xx-hook
16:04:54,724 DEBUG [[ACTIVE] ExecuteThread: '3' for queue: 'weblogic.kernel.Default (self-tuning)'][HookHotDeployListener:1279] Custom JSP directory: /jsp
16:04:54,739 DEBUG [[ACTIVE] ExecuteThread: '3' for queue: 'weblogic.kernel.Default (self-tuning)'][HookHotDeployListener:1310] Custom JSP files:_E:\oracle\middleware_home\wlserver_1212\domaines\dg1\servers\mdmclgfr10\tmp\_WL_user\xx-hook\rlfzax\war\/jsp/html/portlet/journal/article/content.jsp_E:\oracle\middleware_home\wlserver_1212\domaines\dg1\servers\mdmclgfr10\tmp\_WL_user\xx-hook\rlfzax\war\/jsp/WEB-INF/classes/com/liferay/portlet/dynamicdatamapping/dependencies/ddm/documentlibrary.ftl [Sanitized]
16:04:54,755 INFO [[ACTIVE] ExecuteThread: '3' for queue: 'weblogic.kernel.Default (self-tuning)'][HookHotDeployListener:821] Hook for xx-hook is available for use

=> You have to override the WL config using Admin Console for the whole Domain:

1. Go to server admin console->Domain-> Web applications. Click the checkbox of Archived Real Path Enabled. This should make an entry into domain config.xml as below. or you can directly edit your domain config.xml and add the below entry.
<web-app-container>
<show-archived-real-path-enabled>true</show-archived-real-path-enabled>
</web-app-container>

For me it looks like Liferay bug because the <show-archived-real-path-enabled>true</show-archived-real-path-enabled> in weblogic.xml is not taken into account.
Anyway thanks a lot Andew for your great help!
thumbnail
8年前 に Andew Jardine によって更新されました。

RE: Liferay 6.2 Hook not correctly deployed to weblogic server 12c

Liferay Legend 投稿: 2416 参加年月日: 10/12/22 最新の投稿
GREAT! Glad to hear that you managed to work it out. I would suggest that you open an issue with liferay (http://issues.liferay.com) so that they can look into it As well. That way if it is a bug it can be resolved in a future release.
thumbnail
8年前 に Andew Jardine によって更新されました。

RE: Liferay 6.2 Hook not correctly deployed to weblogic server 12c

Liferay Legend 投稿: 2416 参加年月日: 10/12/22 最新の投稿
Hey John,

Did the examples you found showing the "magic line" also provide details on how to use it? Perhaps you need to write a plugin to override the logic for this class. Ar eyou using the CE or the EE version?
thumbnail
8年前 に John LrUser によって更新されました。

RE: Liferay 6.2 Hook not correctly deployed to weblogic server 12c

New Member 投稿: 11 参加年月日: 14/08/12 最新の投稿
Hi,
I am using 6.2 EE SP10 version.
I am fortunate that applying the change using Weblogic 12c Admin console solved the problem.