掲示板

NoSuchMethodException: PortletBeanLocatorUtil.setBeanLocator(BeanLocator)

11年前 に Harri Tuomela によって更新されました。

NoSuchMethodException: PortletBeanLocatorUtil.setBeanLocator(BeanLocator)

Junior Member 投稿: 44 参加年月日: 08/02/03 最新の投稿
I've switched from OpenPortal JSF Portlet Bridge to Liferay Faces Bridge due to LPS-29144. The attached exceptions are thrown on deployment and page view. The underlying JSF library is Sun (nowadays Oracle Mojarra) JSF 1.2_04-b20-p03 and Liferay version is 6.1.1.GA2 CE. What could be wrong?
thumbnail
11年前 に Neil Griffin によって更新されました。

RE: NoSuchMethodException: PortletBeanLocatorUtil.setBeanLocator(BeanLocato

Liferay Legend 投稿: 2655 参加年月日: 05/07/27 最新の投稿
Hi Harri,

Thanks again for migrating to Liferay Faces Bridge. The OpenPortal JSF Portlet Bridge is a nice piece of software, but it doesn't adhere to the JSR 329 standard. Because of this, you might need to make some changes to your WEB-INF/portlet.xml descriptor, or perhaps some other changes.

There are several JSF 1.2 based demo portlets that you can use as a reference.

Here is where you can download binary WAR versions for use with Liferay 6.1.x:
http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.liferay.faces.demos%22%20AND%20v%3A%222.1.0-ga1%22

And here is where you can get the source code:

1) JSF1 Portlet (Facelets)
https://github.com/liferay/liferay-faces/tree/2.1.x/demos/bridge/jsf1-portlet

2) JSF1 JSP Portlet
https://github.com/liferay/liferay-faces/tree/2.1.x/demos/bridge/jsf1-jsp-portlet

3) JSF1 Public Render Parameters Portlet
https://github.com/liferay/liferay-faces/tree/2.1.x/demos/bridge/jsf1-ipc-pub-render-params-portlet

4) JSF1 Events (Customers) Portlet
https://github.com/liferay/liferay-faces/tree/2.1.x/demos/bridge/jsf1-ipc-events-customers-portlet

5) JSF1 Events (Bookings) Portlet
https://github.com/liferay/liferay-faces/tree/2.1.x/demos/bridge/jsf1-ipc-events-bookings-portlet

6) ICEfaces1 Portlet
https://github.com/liferay/liferay-faces/tree/2.1.x/demos/bridge/icefaces1-portlet

I would recommend that you look at #1 or #2 in order to see if your WEB-INF/portlet.xml (and other files, like WEB-INF/web.xml) are correct.

Neil
11年前 に Harri Tuomela によって更新されました。

RE: NoSuchMethodException: PortletBeanLocatorUtil.setBeanLocator(BeanLocato

Junior Member 投稿: 44 参加年月日: 08/02/03 最新の投稿
After minor changes to WEB-INF/*.xml and removing some unnecessary jars I've managed to make the portlet deployable but the attached Exception is thrown when adding the portlet to a page. Any advice?

添付ファイル:

thumbnail
11年前 に Neil Griffin によって更新されました。

RE: NoSuchMethodException: PortletBeanLocatorUtil.setBeanLocator(BeanLocato

Liferay Legend 投稿: 2655 参加年月日: 05/07/27 最新の投稿
Is there a "Caused By" part later on in the stacktrace? I didn't see that in your attachment. Thanks.
11年前 に Harri Tuomela によって更新されました。

RE: NoSuchMethodException: PortletBeanLocatorUtil.setBeanLocator(BeanLocato

Junior Member 投稿: 44 参加年月日: 08/02/03 最新の投稿
Is this stack trace more informative? The exception is thrown by JSF implementation, not the bridge.

添付ファイル:

11年前 に Atul Patel によって更新されました。

RE: NoSuchMethodException: PortletBeanLocatorUtil.setBeanLocator(BeanLocato

New Member 投稿: 18 参加年月日: 12/01/12 最新の投稿
Have you checked your portlet.xml's init parameters to specify the initial view page and the parameter names are the sames as those from a working example Neil mentioned earlier.
thumbnail
11年前 に Neil Griffin によって更新されました。

RE: NoSuchMethodException: PortletBeanLocatorUtil.setBeanLocator(BeanLocato

Liferay Legend 投稿: 2655 参加年月日: 05/07/27 最新の投稿
I think Atul might be right -- it seems as though Mojarra cannot identify the view that you want to render.

I would recommend that you add a WEB-INF/classes/log4j.properties file like this one to your deployment and restart the server. The debug output in the server log might be helpful in determining the problem.