RE: Facing issues with Hook and theme while restarting the server

thumbnail
Chitra Thambirajan, modified 12 Years ago. Junior Member Posts: 67 Join Date: 10/17/13 Recent Posts
Hi Friends,

Am using Liferay portal 6.1.2 with Eclipse Juno,Liferay Plugin SDK.

I have just created some post login hooks and themes and deployed it in liferay server.Its working fine.

My issue,
Lets assume that am not using liferay for 2 days.After that if I run liferay server it is working with the default features.

Am not able to see my post login hook and theme effects.Also one of my hook's portal.properties file also missing..So am creating it again every time.

If I re-deploy it again then it is working fine.

I need to understand the why this is happening.

Anyone faced this kind of issue..?

Note: I have just enabled development mode in liferay server.May be due to this it is happening...?

Please advice me.

Thanks
Chitra
thumbnail
Chitra Thambirajan, modified 12 Years ago. Junior Member Posts: 67 Join Date: 10/17/13 Recent Posts
These many views....but no one is answering...emoticon

As per my understanding,after disabled the developer mode in server,if I start server for the time pages are coming with some changes and some changes are missing..

If I re-deploy only one theme/hook,at the time all themes/hooks are getting deployed..

Still I don't know the exact problem.

Thanks
Chitra
thumbnail
Milorad Filipović, modified 12 Years ago. New Member Posts: 16 Join Date: 6/2/13 Recent Posts
Hi Chitra,
we had issuses with theme that gets "undeployed" after every server restart. I havent figured out the reason, but I came up with workaround. Since we are using linux server, i modified startup script for our tomcat server and added a line wich just copies theme war file into deploy folder before the server gets started so the theme gets deployed. Hope it helps emoticon
thumbnail
Chitra Thambirajan, modified 12 Years ago. Junior Member Posts: 67 Join Date: 10/17/13 Recent Posts
Oh...So it seems this is liferay's feature..I thought this is only happening to me..

Thank you so much Milorad..

Could u pls guide me to achieve this in Windows..?

Chitra
thumbnail
Milorad Filipović, modified 12 Years ago. New Member Posts: 16 Join Date: 6/2/13 Recent Posts
Well, I'm not really into Windows servers, but I can try emoticon
First, copy your war files to any folder on your server, lets call it "warsFolder" for now.
Then modify your startup.bat script (located in bin folder of your tomcat server) by adding lines which copy your war files to deploy folder in the beginning of the file.
Since windows copy command is "copy" it could go something like this:

copy path/to/warsFolder/my-theme.war /path/to/liferay/deploy
copy path/to/warsFolder/my-hook.war /path/to/liferay/deploy

So, this basically forces liferay to redeploy wars on each startup. If you can find a real solution, please let me know.
thumbnail
Chitra Thambirajan, modified 12 Years ago. Junior Member Posts: 67 Join Date: 10/17/13 Recent Posts
Thank you Milorad...Will give a try and update.
thumbnail
Chitra Thambirajan, modified 12 Years ago. Junior Member Posts: 67 Join Date: 10/17/13 Recent Posts
Hi Milorad,

Can I get the steps(script file commands) to do it in CentOS 6.3.

My work going to be moved to production.

Am sorry to say that I did not test it in my test (Windows) environment.

So it would be helpful if I get that for my production environment for auto deploying themes and hooks while restarting the server.

Thanks in advance
Chitra.