The problem is that I created a Liferay portlet to invoke one
service(name is LocaleContentLocalServiceUtil) created by Liferay Service Builder before,
the service works in Liferay, but when I invoke the service
from portlet, I got NullerpointerException.
And I actived debug mode and found the return value of PortalBeanLocatorUtil.locate(LocaleContentLocalService.class.getName()) in LocaleContentLocalServiceUtil is null.
Does anyone know how to resolve this problem, or can give me some directions, pls help me.
add following property in liferay-plugin-package.properties of your portlet. Make sure service jar is your classpath of deployed portlet webapps.
required-deployment-contexts=your-service-portlet
if this property is not there, try to copy your service-api.jar into tomcat/lib/ext and delete from service and all other portlet.
Related
I am trying to deploy a simple standalone war file in liferay tomcat version. It is neither a portlet nor theme. How can I configure the war file to be deployed as a standalone war in liferay tomcat.
I am getting following error
16:45:51,175 ERROR [localhost-startStop-1][HotDeployImpl:211]
com.liferay.portal.kernel.deploy.hot.HotDeployException: Error
registering portlets for travelinsurancetravelinsurance
So, I simply want to skip this registration as a portlet and access in by the url. Is this possible?
What did you try so far? Just deployed to tomcat webapps directory? That should work. Make sure your plugin does not have any Liferay-recognized deployment descriptor, then everything should work and any complaints by Liferay can be ignored. Don't go through Liferay's deploy directory if you're not deploying a Liferay component.
I have created some theme in Liferay. Then I exported it as a *.war file. My next step was to install it on liferay server and then run. But this theme doesn't work, it is unavailable. Do you know why?
Aditional information ... same I did with some portlets and it works. Thank you.
I have created a hook to override dockbar portlet..when I copied the view.jsp from root/html/portlet/dockbar in custom_jsps under META-INF compiler showing errors even after deploying the hook.
And when I restarted liferay portal dockbar notifications are unavailable. I am getting confused as I didn't find a clear example anywhere.
According to your comments you're referring to errors that the eclipse editor shows when you add the view.jsp in question to your hook project. Unfortunately, this is expected: The JSP contains include instructions, e.g. to ../init.jsp - and that file is not available in your hook, although it will be available once you deploy it to your appserver. For this reason, Liferay IDE (the Liferay-aware plugins for eclipse) offers to disable JSP validation in your jsp-hook. Yes, it's uncomfortable, but it's what you'll have to deal with currently. AFAIK the changes to the jsp editor would be huge to cater for this situation.
As of errors in the portal once you deploy an unchanged view.jsp: Please give the exact error messages that you see - either in your browser or in the log file.
You might want to check the appserver's directory and compare the deployed dockbar/view.jsp with the original file at dockbar/view.portal.jsp - the later file will be available once you deploy your jsp hook
I have created a sample Liferay portlet and it has successfully deployed. But, the eclipse console didn't say "1 portlet is ready for use". And, I couldn't find this portlet in the Add >> More.. option on a Liferay page.
As Mark mentioned, it is undeterministic and it sometimes happen. I usually follow the following steps and after this it works normally.
Steps:
remove all the references of the portlet from webapps.
stop the server
deploy the portlet's WAR
restart the server
check the logs if the portlet is deployed.
If possible try to build the WAR again and deploy the new WAR, and follow the previous steps.
Also if this doesn't work try to clear the temp and work directory and again try the previous steps.
Hope this helps.
I have been fighting with this problem for a day. For me it was two things: wrong property of
liferay.home
inside
portal-setup-wizard.properties
Only after correction I was able too see in tomcat logs that my liferay-plugins had higher version than liferay itself. I redownload plugins with correct version and new plugin deployed correctly.
If you've done all the cleaning etc. and it still does not work, there may be another reason for not showing. If you have - for some reson - deactivated the portlet in Liferay, it will remember the setting even though you have undeployed it several times.
So, you must go to Control Panel > App Manager > All Apps > Your portlet name and activate it again!
That is undeterministc but usual error. Try to undeploy the portlet - delete portlet directory under tomcat/webapps and try to deploy again.
Im new with liferay have a problem with portlet deployment using the plugins sdk,
Platform:
liferay-portal-tomcat-5.5-5.1.2,
liferay-plugins-sdk-5.2.2,
windows vista.
Problem:
I have successfully created a sample portlet with ant and deployed it into the hot-deploy folder. It is automatically picked up by the server but the console messages say that the portlet has been copied successfully and never registers it.. and i cant find it in the add application drop-down menu.. pls your help will be very appreciated.
I don't know if anything important changed in these versions, but you say you're using Liferay 5.1.2 with the plugin environment 5.2.2 - try with matching versions - at least on the second digit.
also, make sure that all required files are available - among them are WEB-INF/web.xml, WEB-INF/portlet.xml.
Create a new sample portlet with "create.bat" in the plugin SDK's portlet folder and deploy this - it should succeed. Then make sure that all config files from the new one are present in your current one.
How did you create your current portlet? What did you do/change?