Portlet not getting deployed
Asked Answered
H

7

6

I have this strange problem at which I have spent stupid amount of time. To build my portlet, I haven't used sdk and I am using my own ant script do the job. It works all well till this wierd situation.

I am basically using a lot class from portal-service.jar to change role settings etc. When I include it in my build path and deploy it again. It doesn't get deployed. On shell it shows the deployment, below is the log:

Copying 1 file to C:\liferay-portal\tomcat-6.0.29\webapps\ch1_HelloWorld

Deleting directory C:\liferay-portal\tomcat-6.0.29\temp\20121016060846753

06:08:47,887 INFO [PortletAutoDeployListener:81] Portlets for C:\liferay-portal\tomcat-6.0.29\deploy\ch1_HelloWorld.war copied successfully.

Deployment will start in a few seconds. 16 Oct, 2012 6:08:56 AM org.apache.catalina.startup.HostConfig checkResources

INFO: Reloading context [/ch1_HelloWorld]

That's it! Later it doesnt show (as it does normally) that the portlet is available to use. In browser, under the "add tab", the option is never shown. What can be the issue for this. The portlet is a simple hello world portlet that access role information

Henrietta answered 16/10, 2012 at 6:20 Comment(5)
Am I understand correctly that your portlet is deployed normally and then works but isn't shown in the "Add > More..." menu?Inviting
Yes! it doesn't show inside the Add tabHenrietta
Infact the folder inside webapps is perfect.Henrietta
This question "unable to view deployed liferay portlet in the add >> more option" and the answer might help you, if you have not already tried the things mentioned in the answers :-)Unmusical
Are you able to post your ant script?Hardman
C
4

I am basically using a lot class from portal-service.jar to change role settings etc. When I include it in my build path and deploy it again. It doesn't get deployed. On shell it shows the deployment, below is the log:

Did you put portal-service.jar to WEB-INF/lib? If so remove it from there and add it to some other (my_project/lib) directory than add it to build path.

Also make sure that after deployment portal-service.jar is not in your deployed WEB-INF/lib. Better yet, first undeploy than redeploy.

Cementation answered 17/10, 2012 at 14:12 Comment(3)
Thanks will try that. Currently in my built path, I have linked it to the jar lying in tomcat/lib/ext directly. Can there be any issues with that?Henrietta
no issues if you do it like that, just make sure you do not have copy of portal-service.jar in your WEB-INF/lib. (in project and in tomcat/webapps/my_project/WEB-INF/lib). Can you list changes (beside portal-service.jar) that you made between successful deploy and current problem, if anyCementation
Hmm, is this "ch1_HelloWorld" from "Portlets in Action"? If so, you just added "portal-service.jar" and used some liferay service? And please tell exactly which version of Liferay do you use.Cementation
H
2

Is this properly set in your liferay-display.xml ?

<display>
    <category name="yourCategoryUnderAddMenu">
        <portlet id="yourPortletId"></portlet>
    </category>
</display>
Henslowe answered 17/10, 2012 at 12:24 Comment(0)
P
2

Late answer, but maybe it will help someone:

- just shutdown your server;
- delete the portlet from the "webapps" tomcat folder;
- you should delete "temp" and "work" folders content;
- restart your server and deploy your portlet.

Everything should be OK. I do not know why this happens, but I encounter this problem many times and fix it with the same solution.

Bye!

Pulverulent answered 16/5, 2014 at 12:45 Comment(0)
E
2

This is normally the case when the auto.deploy.dest.dir is pointing to the wrong place. Firstly, i came to realise the common mistake is to make this point to liferay_home/deploy which is not correct. This property specifies the destination of exploded files. For tomcat, it would be the webapps directory e.g. /opt/liferay-portal-6.2-ce-ga2/tomcat-7.0.42/webapps

In other words, tomcat, on receiving the exploded files,carries on. In your case, tomcat was never realising any changes.

Elfrieda answered 9/1, 2015 at 12:25 Comment(0)
C
1

Delete the old war from the webapps, and put your new war manually in the Deploy folder.

It looks like you might be deploying by copying it to the webapps folder, instead of the deploy?

Contravene answered 16/10, 2012 at 21:33 Comment(0)
F
1

go to plugins-sdk folder. open build.userName.properties (In my case name of file is build.asif.properties) open it.. add the below line

auto.deploy.dir = D:\\nWorkSpace\\liferay-portal-6.2.0-ce-ga1\\deploy

"D:\nWorkSpace\liferay-portal-6.2.0-ce-ga1\deploy" is the path of my deploy direcotory.

where nWorkSpace is my workspace. My problem is resolve.

Fob answered 15/5, 2015 at 13:8 Comment(0)
S
0

I tried all of the above solutions but my issue was not resolved on a Liferay 6.2 EE sp2 bundle.

I was finally able to resolve portlet deployment issue by cleaning all the portlet xml files except the ROOT.xml from the Tomcat home/conf/Catalina/localhost folder.

This tip above was provided on the following post - how ever the blog post no longer exits and had to find in the archives below with google search in case someone is interested. It saved me hours of effort.

https://www.liferay.com/community/forums/-/message_boards/message/2124111

http://archive-ro.com/page/754918/2012-11-26/http://blog.ropardo.ro/2010/08/09/liferay-deployment-will-start-in-a-few-seconds-and-how-to-realy-start/

Security answered 17/9, 2015 at 17:21 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.