Jatin
Jatin

Reputation: 31754

Portlet not getting deployed

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

Upvotes: 6

Views: 9910

Answers (7)

VC1
VC1

Reputation: 1686

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/

Upvotes: 0

asifaftab87
asifaftab87

Reputation: 1443

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.

Upvotes: 1

mugume david
mugume david

Reputation: 635

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.

Upvotes: 2

lpratlong
lpratlong

Reputation: 1461

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!

Upvotes: 2

Martin Gamulin
Martin Gamulin

Reputation: 3865

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.

Upvotes: 4

Vikas V
Vikas V

Reputation: 3196

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

<display>
    <category name="yourCategoryUnderAddMenu">
        <portlet id="yourPortletId"></portlet>
    </category>
</display>

Upvotes: 2

A.C
A.C

Reputation: 197

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?

Upvotes: 1

Related Questions