Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Sudhir Shakya
Deploying Hook on JBoss 7.1.3 domain
March 24, 2013 5:42 PM
Answer

Sudhir Shakya

Rank: New Member

Posts: 3

Join Date: September 27, 2012

Recent Posts

Hi,

We have a hook that we have deployed successfully on Tomcat and on Glassfish 3.1.2.2. So we are pretty confident that the hook works. When trying to deploy it to JBoss 7.1.3, I see JBoss reporting the hook being deployed successfully. But just above that line, there is this stacktrace (I have removed some lines). I infer that during hook deploy, Liferay is trying to replace its own JSP files with the JSP files from the hook during deploy. But the path "/content/liferay..." does not exist in JBoss domain mode as far as I am aware.

ERROR [HotDeployImpl:191] com.liferay.portal.kernel.deploy.hot.HotDeployException: Error registering hook for new-hook
com.liferay.portal.kernel.deploy.hot.HotDeployException: Error registering hook for new-hook
at com.liferay.portal.kernel.deploy.hot.BaseHotDeployListener.throwHotDeployException(BaseHotDeployListener.java:46)
at com.liferay.portal.deploy.hot.HookHotDeployListener.invokeDeploy(HookHotDeployListener.java:276)
at com.liferay.portal.deploy.hot.HotDeployImpl.doFireDeployEvent(HotDeployImpl.java:188)
at com.liferay.portal.deploy.hot.HotDeployImpl.fireDeployEvent(HotDeployImpl.java:96)
at com.liferay.portal.kernel.deploy.hot.HotDeployUtil.fireDeployEvent(HotDeployUtil.java:27)
at com.liferay.portal.kernel.servlet.PluginContextListener.fireDeployEvent(PluginContextListener.java:151)
...
Caused by: java.io.FileNotFoundException: /content/liferay-portal-6.1.1-ce-ga2-20120731132656558.war/html/portlet/login/login.jsp (No such file or directory)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(FileOutputStream.java:194)
at java.io.FileOutputStream.<init>(FileOutputStream.java:145)
at com.liferay.portal.util.FileImpl.copyFile(FileImpl.java:147)
at com.liferay.portal.util.FileImpl.copyFile(FileImpl.java:158)
at com.liferay.portal.util.FileImpl.copyFile(FileImpl.java:152)
at com.liferay.portal.kernel.util.FileUtil.copyFile(FileUtil.java:62)
at com.liferay.portal.deploy.hot.HookHotDeployListener.initCustomJspBag(HookHotDeployListener.java:1075)
at com.liferay.portal.deploy.hot.HookHotDeployListener.initCustomJspDir(HookHotDeployListener.java:1152)
at com.liferay.portal.deploy.hot.HookHotDeployListener.doInvokeDeploy(HookHotDeployListener.java:569)
at com.liferay.portal.deploy.hot.HookHotDeployListener.invokeDeploy(HookHotDeployListener.java:273)
... 18 more

JBoss 7.1.3 running in domain mode.
Liferay 6.1.1.ce-ga2-20120731132656558.

Thanks in advance.
Sudhir Shakya
Jack Chung
RE: Deploying Hook on JBoss 7.1.3 domain
March 25, 2013 9:55 PM
Answer

Jack Chung

Rank: New Member

Posts: 19

Join Date: November 30, 2011

Recent Posts

I didn't get beyond the initial test of just the liferay .war and dependencies for jboss 7 in domain mode, but one thing that I did notice that I had to deploy through the new web jboss console. That is probably where the /content/liferay, etc is coming from (my notes have it as possibly under the jboss-as/data/content directory). I don't know how you are attempting to deploy it currently, but I think you will want to setup a secondary deploy directory to output the post-processed hook using 'auto.deploy.default.dest.dir' if my memory serves, and then deploying the processed hook through the jboss console. Anyway, hope this helps.
Sudhir Shakya
RE: Deploying Hook on JBoss 7.1.3 domain
March 26, 2013 4:04 AM
Answer

Sudhir Shakya

Rank: New Member

Posts: 3

Join Date: September 27, 2012

Recent Posts

Jack,

This is how we have been deploying to JBoss domain.
1. We deploy the war files (themes, hooks, and portlets) to a JBoss 7 AS running in standalone mode. We do this by dropping the war files to the deploy directory in the Liferay home directory. The JBoss server is running on my computer and uses MySQL database on my computer.
2. We package the exploded application from standalone/deployments folder into a war file.
3. We then deploy the war file into our JBoss 7 AS server running in domain mode. This server is running on our server (Amazon EC2). We use the deploy command from JBoss's CLI. The exact command is "deploy our-hook.war --server-group=main-server-group".

The themes seem to be deployed correctly (if we set theme.css.fast.load=false). The portlets seem to deploy correctly.

Hope that helps
Thanks
Sudhir
Jack Chung
RE: Deploying Hook on JBoss 7.1.3 domain
March 26, 2013 4:46 PM
Answer

Jack Chung

Rank: New Member

Posts: 19

Join Date: November 30, 2011

Recent Posts

the only other suggestion that i have is that instead of looking for a specific file on the filesystem, which seems to be suggested in the error stack, you may want to change to code to look for a particular URL path or something similar, such as http://<host>/html/portlet/login.jsp . This area isn't my specialty, but hopefully, this may help to guide you in the right direction.