[jboss-user] [JBoss and NetBeans] - Myfaces brobem at portlet work

jackyluck do-not-reply at jboss.com
Thu Dec 13 20:34:14 EST 2007


I try to adopt Myfaces work on jboss portlet ,but it aways have error on the wep page when i open the portlet,the error is :

Cause: java.lang.NullPointerException
StackTrace:
java.lang.NullPointerException
at org.apache.myfaces.application.DefaultViewHandlerSupport.calculateServletMapping(DefaultViewHandlerSupport.java:123)
at org.apache.myfaces.application.DefaultViewHandlerSupport.calculateViewId(DefaultViewHandlerSupport.java:44)
at org.apache.myfaces.application.jsp.JspViewHandlerImpl.createView(JspViewHandlerImpl.java:140)
at org.apache.myfaces.portlet.MyFacesGenericPortlet.nonFacesRequest(MyFacesGenericPortlet.java:320)
at org.apache.myfaces.portlet.MyFacesGenericPortlet.nonFacesRequest(MyFacesGenericPortlet.java:298)
at org.apache.myfaces.portlet.MyFacesGenericPortlet.facesRender(MyFacesGenericPortlet.java:380)
at org.apache.myfaces.portlet.MyFacesGenericPortlet.doView(MyFacesGenericPortlet.java:266)
at javax.portlet.GenericPortlet.doDispatch(GenericPortlet.java:133)
at javax.portlet.GenericPortlet.render(GenericPortlet.java:306)
at org.jboss.portal.portlet.impl.jsr168.PortletContainerImpl.invokeRender(PortletContainerImpl.java:483)
at org.jboss.portal.portlet.impl.jsr168.PortletContainerImpl.dispatch(PortletContainerImpl.java:405)
at org.jboss.portal.portlet.container.PortletContainerInvoker$1.invoke(PortletContainerInvoker.java:86)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:131)
at org.jboss.portal.core.aspects.portlet.TransactionInterceptor.org$jboss$portal$core$aspects$portlet$TransactionInterceptor$invokeNotSupported$aop(TransactionInterceptor.java:86)
............

below is my config:
1.I have add
commons-beanutils-1.7.0.jar
commons-codec-1.3.jar
commons-collections-3.2.jar
commons-digester-1.8.jar
commons-discovery-0.4.jar
commons-logging-1.1.jar
myfaces-api-1.2.0.jar
myfaces-impl-1.2.0.jar

2.my portlet.xml :
......
<portlet-class>org.apache.myfaces.portlet.MyFacesGenericPortlet</portlet-class>
<init-param>
default-view
/welcomeJSF.jsp
</init-param>

3.my web.xml is :
<context-param>
<param-name>org.jboss.jbossfaces.WAR_BUNDLES_JSF_IMPL</param-name>
<param-value>true</param-value>
</context-param>

<context-param>
<param-name>com.sun.faces.verifyObjects</param-name>
<param-value>false</param-value>
</context-param>

<context-param>
<param-name>com.sun.faces.validateXml</param-name>
<param-value>true</param-value>
</context-param>

<context-param>
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>client</param-value>
</context-param>



<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>


<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>/faces/*</url-pattern>
</servlet-mapping>

<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.jsf</url-pattern>
</servlet-mapping>


Now I dont't know how to do can let myfaces work on portlet

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4112769#4112769

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4112769



More information about the jboss-user mailing list