掲示板
Error registering portlets
Hi,
liferay-portlet-6.1.2-ce-GA
liferay-plugins-sdk-6.1.1
I am facing an issue and doesn't know how to solve it. Basicaly, i have developped a simple portlet and when i deploy it i have this exception:
23:21:28,239 ERROR [localhost-startStop-2][HotDeployImpl:198] com.liferay.portal.kernel.deploy.hot.HotDeployException: Error registering portlets for primefaces-basic-portlet
com.liferay.portal.kernel.deploy.hot.HotDeployException: Error registering portlets for primefaces-basic-portlet
at com.liferay.portal.kernel.deploy.hot.BaseHotDeployListener.throwHotDeployException(BaseHotDeployListener.java:46)
at com.liferay.portal.deploy.hot.PortletHotDeployListener.invokeDeploy(PortletHotDeployListener.java:123)
at com.liferay.portal.deploy.hot.HotDeployImpl.doFireDeployEvent(HotDeployImpl.java:195)
at com.liferay.portal.deploy.hot.HotDeployImpl.fireDeployEvent(HotDeployImpl.java:97)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.liferay.portal.security.lang.DoPrivilegedHandler.doInvoke(DoPrivilegedHandler.java:88)
at com.liferay.portal.security.lang.DoPrivilegedHandler.invoke(DoPrivilegedHandler.java:56)
at $Proxy29.fireDeployEvent(Unknown Source)
at com.liferay.portal.kernel.deploy.hot.HotDeployUtil.fireDeployEvent(HotDeployUtil.java:27)
at com.liferay.portal.kernel.servlet.PluginContextListener.fireDeployEvent(PluginContextListener.java:164)
at com.liferay.portal.kernel.servlet.PluginContextListener.doPortalInit(PluginContextListener.java:154)
at com.liferay.portal.kernel.util.BasePortalLifecycle.portalInit(BasePortalLifecycle.java:44)
at com.liferay.portal.kernel.util.PortalLifecycleUtil.register(PortalLifecycleUtil.java:64)
at com.liferay.portal.kernel.util.PortalLifecycleUtil.register(PortalLifecycleUtil.java:56)
at com.liferay.portal.kernel.util.BasePortalLifecycle.registerPortalLifecycle(BasePortalLifecycle.java:54)
at com.liferay.portal.kernel.servlet.PluginContextListener.contextInitialized(PluginContextListener.java:116)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4887)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5381)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:657)
at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1636)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException
at org.portletfaces.bridge.GenericFacesPortlet.init(GenericFacesPortlet.java:126)
at com.liferay.portlet.InvokerPortletImpl.init(InvokerPortletImpl.java:272)
at com.liferay.portlet.PortletInstanceFactoryImpl.init(PortletInstanceFactoryImpl.java:228)
at com.liferay.portlet.PortletInstanceFactoryImpl.create(PortletInstanceFactoryImpl.java:145)
at sun.reflect.GeneratedMethodAccessor103.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.liferay.portal.security.lang.DoPrivilegedHandler.doInvoke(DoPrivilegedHandler.java:88)
at com.liferay.portal.security.lang.DoPrivilegedHandler.invoke(DoPrivilegedHandler.java:56)
at $Proxy412.create(Unknown Source)
at com.liferay.portlet.PortletInstanceFactoryUtil.create(PortletInstanceFactoryUtil.java:41)
at com.liferay.portal.deploy.hot.PortletHotDeployListener.initPortletApp(PortletHotDeployListener.java:593)
at com.liferay.portal.deploy.hot.PortletHotDeployListener.doInvokeDeploy(PortletHotDeployListener.java:328)
at com.liferay.portal.deploy.hot.PortletHotDeployListener.invokeDeploy(PortletHotDeployListener.java:120)
... 31 more
portlet.xml
<portlet-app xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd" version="2.0">
<portlet>
<portlet-name>primefaces-basic</portlet-name>
<display-name>Primefaces Basic</display-name>
<portlet-class>org.portletfaces.bridge.GenericFacesPortlet</portlet-class>
<init-param>
<name>javax.portlet.faces.defaultViewId.view</name>
<value>/views/view.xhtml</value>
</init-param>
<expiration-cache>0</expiration-cache>
<supports>
<mime-type>text/html</mime-type>
</supports>
<portlet-info>
<title>Primefaces Basic</title>
<short-title>Primefaces Basic</short-title>
<keywords>Primefaces Basic</keywords>
</portlet-info>
<security-role-ref>
<role-name>administrator</role-name>
</security-role-ref>
<security-role-ref>
<role-name>guest</role-name>
</security-role-ref>
<security-role-ref>
<role-name>power-user</role-name>
</security-role-ref>
<security-role-ref>
<role-name>user</role-name>
</security-role-ref>
</portlet>
</portlet-app>
web.xml
<web-app
version="2.5"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
>
<context-param>
<param-name>javax.faces.PROJECT_STAGE</param-name>
<param-value>Development</param-value>
</context-param>
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>/faces/*</url-pattern>
</servlet-mapping>
</web-app>
what's wron with my portlet?
liferay-portlet-6.1.2-ce-GA
liferay-plugins-sdk-6.1.1
I am facing an issue and doesn't know how to solve it. Basicaly, i have developped a simple portlet and when i deploy it i have this exception:
23:21:28,239 ERROR [localhost-startStop-2][HotDeployImpl:198] com.liferay.portal.kernel.deploy.hot.HotDeployException: Error registering portlets for primefaces-basic-portlet
com.liferay.portal.kernel.deploy.hot.HotDeployException: Error registering portlets for primefaces-basic-portlet
at com.liferay.portal.kernel.deploy.hot.BaseHotDeployListener.throwHotDeployException(BaseHotDeployListener.java:46)
at com.liferay.portal.deploy.hot.PortletHotDeployListener.invokeDeploy(PortletHotDeployListener.java:123)
at com.liferay.portal.deploy.hot.HotDeployImpl.doFireDeployEvent(HotDeployImpl.java:195)
at com.liferay.portal.deploy.hot.HotDeployImpl.fireDeployEvent(HotDeployImpl.java:97)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.liferay.portal.security.lang.DoPrivilegedHandler.doInvoke(DoPrivilegedHandler.java:88)
at com.liferay.portal.security.lang.DoPrivilegedHandler.invoke(DoPrivilegedHandler.java:56)
at $Proxy29.fireDeployEvent(Unknown Source)
at com.liferay.portal.kernel.deploy.hot.HotDeployUtil.fireDeployEvent(HotDeployUtil.java:27)
at com.liferay.portal.kernel.servlet.PluginContextListener.fireDeployEvent(PluginContextListener.java:164)
at com.liferay.portal.kernel.servlet.PluginContextListener.doPortalInit(PluginContextListener.java:154)
at com.liferay.portal.kernel.util.BasePortalLifecycle.portalInit(BasePortalLifecycle.java:44)
at com.liferay.portal.kernel.util.PortalLifecycleUtil.register(PortalLifecycleUtil.java:64)
at com.liferay.portal.kernel.util.PortalLifecycleUtil.register(PortalLifecycleUtil.java:56)
at com.liferay.portal.kernel.util.BasePortalLifecycle.registerPortalLifecycle(BasePortalLifecycle.java:54)
at com.liferay.portal.kernel.servlet.PluginContextListener.contextInitialized(PluginContextListener.java:116)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4887)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5381)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:657)
at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1636)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException
at org.portletfaces.bridge.GenericFacesPortlet.init(GenericFacesPortlet.java:126)
at com.liferay.portlet.InvokerPortletImpl.init(InvokerPortletImpl.java:272)
at com.liferay.portlet.PortletInstanceFactoryImpl.init(PortletInstanceFactoryImpl.java:228)
at com.liferay.portlet.PortletInstanceFactoryImpl.create(PortletInstanceFactoryImpl.java:145)
at sun.reflect.GeneratedMethodAccessor103.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.liferay.portal.security.lang.DoPrivilegedHandler.doInvoke(DoPrivilegedHandler.java:88)
at com.liferay.portal.security.lang.DoPrivilegedHandler.invoke(DoPrivilegedHandler.java:56)
at $Proxy412.create(Unknown Source)
at com.liferay.portlet.PortletInstanceFactoryUtil.create(PortletInstanceFactoryUtil.java:41)
at com.liferay.portal.deploy.hot.PortletHotDeployListener.initPortletApp(PortletHotDeployListener.java:593)
at com.liferay.portal.deploy.hot.PortletHotDeployListener.doInvokeDeploy(PortletHotDeployListener.java:328)
at com.liferay.portal.deploy.hot.PortletHotDeployListener.invokeDeploy(PortletHotDeployListener.java:120)
... 31 more
portlet.xml
<portlet-app xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd" version="2.0">
<portlet>
<portlet-name>primefaces-basic</portlet-name>
<display-name>Primefaces Basic</display-name>
<portlet-class>org.portletfaces.bridge.GenericFacesPortlet</portlet-class>
<init-param>
<name>javax.portlet.faces.defaultViewId.view</name>
<value>/views/view.xhtml</value>
</init-param>
<expiration-cache>0</expiration-cache>
<supports>
<mime-type>text/html</mime-type>
</supports>
<portlet-info>
<title>Primefaces Basic</title>
<short-title>Primefaces Basic</short-title>
<keywords>Primefaces Basic</keywords>
</portlet-info>
<security-role-ref>
<role-name>administrator</role-name>
</security-role-ref>
<security-role-ref>
<role-name>guest</role-name>
</security-role-ref>
<security-role-ref>
<role-name>power-user</role-name>
</security-role-ref>
<security-role-ref>
<role-name>user</role-name>
</security-role-ref>
</portlet>
</portlet-app>
web.xml
<web-app
version="2.5"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
>
<context-param>
<param-name>javax.faces.PROJECT_STAGE</param-name>
<param-value>Development</param-value>
</context-param>
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>/faces/*</url-pattern>
</servlet-mapping>
</web-app>
what's wron with my portlet?
10年前 に subhash lamba によって更新されました。
RE: Error registering portlets
Regular Member 投稿: 136 参加年月日: 13/07/07 最新の投稿
I also create portlet for primeface nd it's working for me. i am using ref of this list
https://www.liferay.com/community/wiki/-/wiki/Main/Primefaces+portlet+tutorial
may usefull for you.
https://www.liferay.com/community/wiki/-/wiki/Main/Primefaces+portlet+tutorial
may usefull for you.
10年前 に Jean Marie によって更新されました。
RE: Error registering portlets
New Member 投稿: 5 参加年月日: 13/09/15 最新の投稿
In that tutorial, they chose "liferay MVC" as the portlet framework. In my case i chose JSF2.0. But what can be the root cause of this exception. What is it looking for i couldn't see.
Caused by: java.lang.NullPointerException
at org.portletfaces.bridge.GenericFacesPortlet.init(GenericFacesPortlet.java:126)
at com.liferay.portlet.InvokerPortletImpl.init(InvokerPortletImpl.java:272)
at com.liferay.portlet.PortletInstanceFactoryImpl.init(PortletInstanceFactoryImpl.java:228)
at com.liferay.portlet.PortletInstanceFactoryImpl.create(PortletInstanceFactoryImpl.java:145)
at sun.reflect.GeneratedMethodAccessor103.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.liferay.portal.security.lang.DoPrivilegedHandler.doInvoke(DoPrivilegedHandler.java:88)
at com.liferay.portal.security.lang.DoPrivilegedHandler.invoke(DoPrivilegedHandler.java:56)
at $Proxy413.create(Unknown Source)
at com.liferay.portlet.PortletInstanceFactoryUtil.create(PortletInstanceFactoryUtil.java:41)
at com.liferay.portal.deploy.hot.PortletHotDeployListener.initPortletApp(PortletHotDeployListener.java:593)
at com.liferay.portal.deploy.hot.PortletHotDeployListener.doInvokeDeploy(PortletHotDeployListener.java:328)
at com.liferay.portal.deploy.hot.PortletHotDeployListener.invokeDeploy(PortletHotDeployListener.java:120)
... 33 more
Caused by: java.lang.NullPointerException
at org.portletfaces.bridge.GenericFacesPortlet.init(GenericFacesPortlet.java:126)
at com.liferay.portlet.InvokerPortletImpl.init(InvokerPortletImpl.java:272)
at com.liferay.portlet.PortletInstanceFactoryImpl.init(PortletInstanceFactoryImpl.java:228)
at com.liferay.portlet.PortletInstanceFactoryImpl.create(PortletInstanceFactoryImpl.java:145)
at sun.reflect.GeneratedMethodAccessor103.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.liferay.portal.security.lang.DoPrivilegedHandler.doInvoke(DoPrivilegedHandler.java:88)
at com.liferay.portal.security.lang.DoPrivilegedHandler.invoke(DoPrivilegedHandler.java:56)
at $Proxy413.create(Unknown Source)
at com.liferay.portlet.PortletInstanceFactoryUtil.create(PortletInstanceFactoryUtil.java:41)
at com.liferay.portal.deploy.hot.PortletHotDeployListener.initPortletApp(PortletHotDeployListener.java:593)
at com.liferay.portal.deploy.hot.PortletHotDeployListener.doInvokeDeploy(PortletHotDeployListener.java:328)
at com.liferay.portal.deploy.hot.PortletHotDeployListener.invokeDeploy(PortletHotDeployListener.java:120)
... 33 more
10年前 に Neil Griffin によって更新されました。
RE: Error registering portlets
Liferay Legend 投稿: 2655 参加年月日: 05/07/27 最新の投稿
This part of the stacktrace indicates that you are using PortletFaces Bridge:
When you get a chance, please upgrade to Liferay Faces Bridge and let us know if you still see the problem.
Caused by: java.lang.NullPointerException
at org.portletfaces.bridge.GenericFacesPortlet.init(GenericFacesPortlet.java:126)
When you get a chance, please upgrade to Liferay Faces Bridge and let us know if you still see the problem.
10年前 に Jean Marie によって更新されました。
RE: Error registering portlets
New Member 投稿: 5 参加年月日: 13/09/15 最新の投稿
Hi Neil,
I don't have the same exceptionbuti have this now
Caused by: java.lang.NullPointerException
at javax.portlet.faces.GenericFacesPortlet.init(GenericFacesPortlet.java:92)
at com.liferay.portlet.InvokerPortletImpl.init(InvokerPortletImpl.java:272)
at com.liferay.portlet.PortletInstanceFactoryImpl.init(PortletInstanceFactoryImpl.java:228)
at com.liferay.portlet.PortletInstanceFactoryImpl.create(PortletInstanceFactoryImpl.java:145)
I remove the portlet faces bridge replace it by the Liferay Faces Bridge. What can be the matter now?
I don't have the same exceptionbuti have this now
Caused by: java.lang.NullPointerException
at javax.portlet.faces.GenericFacesPortlet.init(GenericFacesPortlet.java:92)
at com.liferay.portlet.InvokerPortletImpl.init(InvokerPortletImpl.java:272)
at com.liferay.portlet.PortletInstanceFactoryImpl.init(PortletInstanceFactoryImpl.java:228)
at com.liferay.portlet.PortletInstanceFactoryImpl.create(PortletInstanceFactoryImpl.java:145)
I remove the portlet faces bridge replace it by the Liferay Faces Bridge. What can be the matter now?
10年前 に Jean Marie によって更新されました。
RE: Error registering portlets
New Member 投稿: 5 参加年月日: 13/09/15 最新の投稿
Hi Neil,
I look into the source code of javax.portlet.faces.GenericFacesPortlet and some ideas cme out. The exception occurs on line 92 where you can look at this instuction:
// Initialize the bridge implementation instance.
getBridge().init(portletConfig);
It seems there is no way to find this bridge because, here the code is looking for this class: javax.portlet.faces.BridgeImplClass
I did not see this class somewhere even in the liferay-faces-bridge-api-3.1.3-ga4 library i download. Can you tell me more?
I look into the source code of javax.portlet.faces.GenericFacesPortlet and some ideas cme out. The exception occurs on line 92 where you can look at this instuction:
// Initialize the bridge implementation instance.
getBridge().init(portletConfig);
It seems there is no way to find this bridge because, here the code is looking for this class: javax.portlet.faces.BridgeImplClass
I did not see this class somewhere even in the liferay-faces-bridge-api-3.1.3-ga4 library i download. Can you tell me more?
10年前 に Vernon Singleton によって更新されました。
RE: Error registering portlets
Expert 投稿: 315 参加年月日: 13/01/14 最新の投稿
Hello Jean,
You will need to make sure that you are using the Liferay Faces Bridge api jar, as well as the impl jar, and the util jar. Here are links to the latest released versions of those:
https://www.liferay.com/community/liferay-projects/liferay-faces/download
You should probably just replace what you have using all of the jars that are downloadable there
1) api
2) impl
3) util
4) alloy
5) portal
Hope that helps,
Vernon Singleton
You will need to make sure that you are using the Liferay Faces Bridge api jar, as well as the impl jar, and the util jar. Here are links to the latest released versions of those:
https://www.liferay.com/community/liferay-projects/liferay-faces/download
You should probably just replace what you have using all of the jars that are downloadable there
1) api
2) impl
3) util
4) alloy
5) portal
Hope that helps,
Vernon Singleton
10年前 に Jean Marie によって更新されました。
RE: Error registering portlets
New Member 投稿: 5 参加年月日: 13/09/15 最新の投稿
Thanks vermon, it's ok now. So as a lesson learned one should take all those jars in the class path.