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

Jatin
  • 31,116
  • 15
  • 98
  • 163
  • Am I understand correctly that your portlet is deployed normally and then works but isn't shown in the "Add > More..." menu? – Artem Shafranov Oct 16 '12 at 07:28
  • Yes! it doesn't show inside the Add tab – Jatin Oct 16 '12 at 07:29
  • Infact the folder inside webapps is perfect. – Jatin Oct 16 '12 at 07:29
  • This question "[unable to view deployed liferay portlet in the add >> more option](http://stackoverflow.com/q/11181527/468763)" and the [answer](http://stackoverflow.com/a/11201249/468763) might help you, if you have not already tried the things mentioned in the answers :-) – Prakash K Oct 16 '12 at 13:26
  • Are you able to post your ant script? – Jonny Oct 17 '12 at 07:13

7 Answers7

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.

Martin Gamulin
  • 3,855
  • 21
  • 25
  • 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? – Jatin Oct 18 '12 at 08:08
  • 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 any – Martin Gamulin Oct 18 '12 at 11:57
  • 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. – Martin Gamulin Oct 18 '12 at 14:14
2

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

<display>
    <category name="yourCategoryUnderAddMenu">
        <portlet id="yourPortletId"></portlet>
    </category>
</display>
Vikas V
  • 3,176
  • 2
  • 37
  • 60
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!

lpratlong
  • 1,421
  • 9
  • 17
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.

mugume david
  • 635
  • 9
  • 18
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?

A.C
  • 197
  • 3
  • 17
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.

asifaftab87
  • 1,315
  • 24
  • 28
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/

VC1
  • 1,660
  • 4
  • 25
  • 42