liferay-faces-bridge-api-4的NullPointerException

时间:2014-11-04 09:30:39

标签: liferay liferay-6 portal

我在尝试使用Liferay bridge 4时遇到的错误:

21:18:00,794 ERROR [PortletContainerLiferayImpl:171] null
 2java.lang.NullPointerException
 3        at com.liferay.faces.bridge.container.liferay.PortletContainerLiferayImpl.getRequestURL(PortletContainerLiferayImpl.java:392)
 4        at com.liferay.faces.bridge.container.liferay.PortletContainerLiferayImpl.<init>(PortletContainerLiferayImpl.java:168)
 5        at com.liferay.faces.bridge.container.PortletContainerFactoryImpl.getPortletContainer(PortletContainerFactoryImpl.java:43)
 6        at com.liferay.faces.bridge.BridgePhaseBaseImpl.init(BridgePhaseBaseImpl.java:172)
 7        at com.liferay.faces.bridge.BridgePhaseRenderImpl.execute(BridgePhaseRenderImpl.java:118)
 8        at com.liferay.faces.bridge.BridgePhaseRenderImpl.execute(BridgePhaseRenderImpl.java:84)
 9        at com.liferay.faces.bridge.BridgeImpl.doFacesRequest(BridgeImpl.java:117)
10        at javax.portlet.faces.GenericFacesPortlet.doView(GenericFacesPortlet.java:255)
11        at javax.portlet.GenericPortlet.doDispatch(GenericPortlet.java:328)
12        at javax.portlet.faces.GenericFacesPortlet.doDispatch(GenericFacesPortlet.java:204)

1 个答案:

答案 0 :(得分:2)

我建议您按照Generating a Liferay Faces Portlet using mvn archetype generate wiki文章中的步骤开始一个干净的项目。请注意,在pom.xml中,您需要将com.sun.faces 2.1.21更改为2.2.6,将com.liferay.faces 3.2.4-ga5更改为4.2.0-m2。您还需要添加Liferay预览库:

<repository>
    <id>liferay-previews</id>
    <url>
      https://repository.liferay.com/nexus/content/repositories/liferay-previews
    </url>
</repository>

有关详细信息,请参阅标题为Announcement: Liferay Faces 4.2.0-m2 Released

的博客