Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 831
Jatin Avatar asked Oct 16 '12 06:10

Jatin


People also ask

What is portlet mode?

Portlet modes is a state in which portlet can generate its content. Portlet can run in different portlet modes which is one of the key difference between portlet and servlet. Portlet mode represents a task being executed by portlet. The content of the portlet will be different for each portlet mode.

Where is portlet XML?

Every portlet WAR must have one portlet. xml file in the WEB-INF directory of the web application.

What is portlet preferences in Liferay?

Portlet preferences can be added to any MVC Portlet to give users a UI to access and set their preferences. Note, portlet preferences are properties that are stored separately from an application's configuration.


2 Answers

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.

like image 76
Martin Gamulin Avatar answered Oct 09 '22 09:10

Martin Gamulin


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

<display>
    <category name="yourCategoryUnderAddMenu">
        <portlet id="yourPortletId"></portlet>
    </category>
</display>
like image 24
Vikas V Avatar answered Oct 09 '22 09:10

Vikas V