6 Replies Latest reply on Feb 6, 2009 9:51 AM by Brian Harris

    RichFaces on WAS 6.0 with no luck...

    Brian Harris Newbie

      Hi all, I'm new to RichFaces and would really like to use it in an upcoming project but I am having a heck of a time getting things together.

      I have used the suggestions at http://www.jroller.com/jbarth/entry/jsf_facelets_richfaces_on_websphere but still no luck.

      Using the following...
      RAD 7
      WAS 6.0
      in my lib from the website above...
      commons-beanutils-1.7.0
      commons-collections-3.1
      commons-digester-1.6
      el-api
      el-ri
      icu4j_3_4_1
      jsf-api
      jsf-facelets
      jsf-impl
      richfaces-api-3.14GA
      richfaces-impl-3.14GA
      richfaces-ui-3.14GA

      I am getting a null pointer exception - Ill try to post as much info as I can. Thanks in advance for any help!

      <?xml version="1.0"?>
      <!DOCTYPE faces-config PUBLIC
       "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.0//EN"
       "http://java.sun.com/dtd/web-facesconfig_1_0.dtd">
      
      <!-- =========== FULL CONFIGURATION FILE ================================== -->
      
      <faces-config>
       <application>
       <view-handler>com.sun.facelets.FaceletViewHandler</view-handler>
       </application>
      </faces-config>
      


      <?xml version="1.0" encoding="UTF-8"?>
      <web-app>
       <context-param>
       <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
       <param-value>.xhtml</param-value>
       </context-param>
       <context-param>
       <param-name>facelets.DEVELOPMENT</param-name>
       <param-value>true</param-value>
       </context-param>
       <context-param>
       <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
       <param-value>server</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>
       <context-param>
       <param-name>org.richfaces.SKIN</param-name>
       <param-value>blueSky</param-value>
       </context-param>
       <filter>
       <display-name>RichFaces Filter</display-name>
       <filter-name>richfaces</filter-name>
       <filter-class>org.ajax4jsf.Filter</filter-class>
       </filter>
       <filter-mapping>
       <filter-name>richfaces</filter-name>
       <servlet-name>Faces Servlet</servlet-name>
       <dispatcher>REQUEST</dispatcher>
       <dispatcher>FORWARD</dispatcher>
       <dispatcher>INCLUDE</dispatcher>
       </filter-mapping>
      </web-app>
      


      And the error...
      java.lang.NullPointerException
       at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:703)
       at javax.faces.component.UIViewRoot.encodeBegin(UIViewRoot.java:344)
       at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:242)
       at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:594)
       at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
       at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:216)
       at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:107)
       at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:245)
       at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:137)
       at javax.faces.webapp.FacesServlet.service(FacesServlet.java:214)
       at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1572)
       at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1521)
       at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:136)
       at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
       at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
       at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:142)
       at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:121)
       at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:82)
       at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:759)
       at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3146)
       at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:250)
       at com.ibm.ws.webcontainer.VirtualHost.handleRequest(VirtualHost.java:212)
       at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:1958)
       at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:112)
       at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:472)
       at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:411)
       at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:288)
       at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminaters(NewConnectionInitialReadCallback.java:207)
       at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:109)
       at com.ibm.ws.tcp.channel.impl.WorkQueueManager.requestComplete(WorkQueueManager.java:566)
       at com.ibm.ws.tcp.channel.impl.WorkQueueManager.attemptIO(WorkQueueManager.java:619)
       at com.ibm.ws.tcp.channel.impl.WorkQueueManager.workerRun(WorkQueueManager.java:952)
       at com.ibm.ws.tcp.channel.impl.WorkQueueManager$Worker.run(WorkQueueManager.java:1039)
       at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java(Compiled Code))
      


      And finally, my very simple test page, test.xhtml...

      <?xml version='1.0' encoding='UTF-8' ?>
      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
       "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      <html xmlns="http://www.w3.org/1999/xhtml"
       xmlns:ui="http://java.sun.com/jsf/facelets"
       xmlns:h="http://java.sun.com/jsf/html"
       xmlns:f="http://java.sun.com/jsf/core">
       <body>
       <h:outputText value="test"></h:outputText>
       </body>
      </html>


      Thanks again!