How to configure a portlet in CQ5 by war file - portlet

I am trying to configure to use CQ as a portal. I am referring to the link for Using CQ as a Portal : http://dev.day.com/docs/en/cq/5-3/administering/cq_as_portal.html
I have followed all these steps
Configure the portlet component in CQ WCM
Deploy the portlet.
Configure the portlet.
But after deploying the portlet when i add portlet component to page by dragging the Portlet component from the sidekick ,
it is giving the error message as "Configuration for portlet entity identifier is missing" and when editing it .
It should give the portlet created i.e .war files uploaded in the portlet entity drop down list of portlet component, but not giving any entry in the list .
Please help me with the portlet configuration if i missed some step or if there is some alternate way.
Thanks

You need to upload the .war file into the CQSE admin (i.e. http://localhost:4502/admin) in order to make them appear in the list.
You'll also need to make sure that if you are using Eclipse Maven to make your .war file that it has the right settings in the portlet.xml file - the portlet class is wrong by default although that doesn't stop it appearing in the list.

Related

Hot-deploy Liferay 7 webapp resource (JavaScript/CSS/HTML)

I am developing a Liferay 7 portlet with bundled Tomcat 7.
To deploying a portlet, I copy the war file into deploy folder under Liferay home folder, and then I have to wait a lot of minutes to see my file modified.
Usually I work only on javascript, css and html, I want to see immediately what I changed, then, is there a way to have hot deploy for webapp resource?
Thanks
You should use the Liferay workspaces and modules. If it is a theme, the gulp watch task will help.
Liferay cache all resources by default, because that you have to wait a lot of time to see the changes. You have 3 ways to force Liferay to delete this cache.
Before deploy the module you must delete the module cache folder. This is in the following path (this applies to js and jsp resources):
liferay-ce-portal-7.0-ga3/work/your_module_name
Delete the module cache servlet folder located in:
liferay-ce-portal-7.0-ga3/tomcat-8.0.32/work/Catalina/localhost/ROOT/css/http_/o
/your_module_name
The other option is enter in Liferay Control Panel and click the cache action tasks:

Difficulty to run simple GWT application

I am making gwt application as following step:
Firstly I install gwt plugin in my eclipse(Helios).
Create dynamic project.
Add gwt plugin through
going to property page of the project
Select google-webtoolkit
check "use GWT"
then go to google-web application
the directory name to "web-content".
Create gwt module in my project then create entry point class then html.
Create a button in onModule method of entry point class.
Then I run the application in tomcat server by just right clicking on project and selecting run as web application(run with tomcat server). As result of this I am getting a blank page on browser? There is no excption in server log. I am not able to debug. Where I am going wrong?
Please help me to sort out this problem.
I am not using google web application because I was getting difficulty to create war file. As a result of this I got the above process to develop GWT application.
Thanks
Rahul
why don't you try in reverse:
First install gwt plugin in my eclipse(Helios).
Create GWT project
Add Dynamic web plugin
going to property page of the project
project Facets tab
Select Dynamic Web Module and java
ok to apply changes.
Write your code
and try to run on server. it will work.

Liferay Hooks plugins folder

I am using Liferay 6 version.
I am trying to Learn Liferay, due to its importance.
I am into the Liferay Hooks concept, for this I am following this site:
http://kamalkantrajput.blogspot.com/2009/05/using-hooks-in-liferay-for-customizing.html
In this the author mentions about this below:
Go to plugins/hooks create a folder with any name. eg asset-publisher-hook
Please tell me where can i find the plugins folder?
Because inside the Liferay Tomcat, I found 6 folders with the name plugins and no folder hooks under this .
Please guide me.
You might also want to read the documentation in the Liferay Wiki:
http://www.liferay.com/community/wiki/-/wiki/Main/Portal+Hook+Plugins
In a Nutshell: once you have created the hook plugin (as described by adarshr) you can simply deploy the portlet like any other portlet.
If you want to remove the hook, make sure to undeploy it while Tomcat is running. Otherwise Liferay will not be informed about it and the original JSPs won't be restored.
Un-deploying can be done by simply deleting the portlet's directory in the Tomcat webapps folder.
You need to install the Plugins SDK which can be downloaded from http://www.liferay.com/downloads. Select "Plugins SDK" in the dropdown and click download.
Once you extract it, open a command prompt in the hooks folder. Then you execute the command create asset-publisher-hook "Asset Publisher Hook" and it will create the basic hooks project for you.

Liferay Workflow With Activiti Plugin

I am using Liferay Activiti Workflow Plugin to implement workflow. The Activiti Workflow Plugin is a hook. The plugin is working fine. But I have following issues:
How can I make User object for Liferay workflow enabled?
How can I make Custom Entity which has table definition for it in separate schema from 'lportal' Liferay workflow enabled?
I have read this article.
Here it describes one step where we it says to add in liferay-portlet.xml following entry:
<workflow-handler>com.liferay.workflow.ArticleWorkflowHandler</workflow-handler>
But I am using hook which does not have liferay-portlet.xml file. So how should I proceed, what would be the steps?
Thanks in advance.
it's better structure your project modular and define your custom entity as an asset in the different liferay plugin than Activiti Liferay Hook. to do this:
Create a new portlet project and define your Custom Entity in it,
Then you can modify liferay-portlet.xml and point your portlet to your workflow handler.
also notice if in this way you need to call Activiti Jars. you can move them from lib directory of Liferay Activiti Hook to the global lib directory(in Tomcat it place here: ${TOMCAT_HOME}/lib ).
but if you really need to define your custom entities in the Liferay Activiti Project itself, first add a portlet to it. remember that a Liferay project can consist of several liferay plugin(such as hook portlet...). to do this. it's better to import its source to an IDE like eclipse then create a portlet on it and do what you want

How do I use another custom portlet's service layer in Liferay 6.0.6

I have tried two things:
Specified the first portlet as a Required Deployment Context in the second portlet's liferay-plugin-package.properties.
Added the first portlet's portlet service jar to teh second portlet's web app libraries folder.
Neither worked. I still get the ff. exception when I try a dynamic query on the first portlet's service.
java.lang.ClassNotFoundException: com.foo.bar.model.impl.MyPojoImpl
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1645)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1491)
at com.liferay.portal.dao.orm.hibernate.DynamicQueryFactoryImpl.getImplClass(DynamicQueryFactoryImpl.java:78)
at com.liferay.portal.dao.orm.hibernate.DynamicQueryFactoryImpl.getImplClass(DynamicQueryFactoryImpl.java:59)
at com.liferay.portal.dao.orm.hibernate.DynamicQueryFactoryImpl.forClass(DynamicQueryFactoryImpl.java:33)
at com.liferay.portal.kernel.dao.orm.DynamicQueryFactoryUtil.forClass(DynamicQueryFactoryUtil.java:23)
Try removing the required deployment context from liferay-plugin-package.properties. After you are done creating service, move the your-service.jar in tomcat/lib/ext folder. Make sure none of your portlet has your-service.jar in its lib folder and then try calling the service.
Regards,
Sandeep
See http://issues.liferay.com/browse/LPS-13073. Either upgrade plugin SDK to later than 6.0.5 or follow patching instructions in second comment.