title: Configuring RichFaces 4 + JBoss 7+Eclipse
body: <p>I created a very simple RichFaces Page</p>
  
  <pre><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
  &lt;ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:a4j="http://richfaces.org/a4j"
      xmlns:rich="http://richfaces.org/rich"&gt;
      &lt;h:outputStylesheet&gt;
          .cols {
          vertical-align: top;
          }
      &lt;/h:outputStylesheet&gt;
      &lt;h:form id="form"&gt;
          &lt;h:panelGrid columns="2" columnClasses="cols,cols" width="400"&gt;
              &lt;rich:panelMenu style="width:200px" itemMode="ajax" groupMode="ajax" groupExpandedLeftIcon="triangleUp"
                  groupCollapsedLeftIcon="triangleDown" topGroupExpandedRightIcon="chevronUp"
                  topGroupCollapsedRightIcon="chevronDown" itemLeftIcon="disc" itemChangeListener="#{panelMenuBean.updateCurrent}"&gt;
                  &lt;rich:panelMenuGroup label="Group 1"&gt;
                      &lt;rich:panelMenuItem label="Item 1.1" name="Item_1_1" /&gt;
                      &lt;rich:panelMenuItem label="Item 1.2" name="Item_1_2" /&gt;
                      &lt;rich:panelMenuItem label="Item 1.3" name="Item_1_3" /&gt;
                  &lt;/rich:panelMenuGroup&gt;
                  &lt;rich:panelMenuGroup label="Group 2"&gt;
                      &lt;rich:panelMenuItem label="Item 2.1" name="Item_2_1" /&gt;
                      &lt;rich:panelMenuItem label="Item 2.2" name="Item_2_2" /&gt;
                      &lt;rich:panelMenuItem label="Item 2.3" name="Item_2_3" /&gt;
                      &lt;rich:panelMenuGroup label="Group 2.4"&gt;
                          &lt;rich:panelMenuItem label="Item 2.4.1" name="Item_2_4_1" /&gt;
                          &lt;rich:panelMenuItem label="Item 2.4.2" name="Item_2_4_2" /&gt;
                          &lt;rich:panelMenuItem label="Item 2.4.3" name="Item_2_4_3" /&gt;
                      &lt;/rich:panelMenuGroup&gt;
                      &lt;rich:panelMenuItem label="Item 2.5" name="Item_2_5" /&gt;
                  &lt;/rich:panelMenuGroup&gt;
                  &lt;rich:panelMenuGroup label="Group 3"&gt;
                      &lt;rich:panelMenuItem label="Item 3.1" name="Item_3_1" /&gt;
                      &lt;rich:panelMenuItem label="Item 3.2" name="Item_3_2" /&gt;
                      &lt;rich:panelMenuItem label="Item 3.3" name="Item_3_3" /&gt;
                  &lt;/rich:panelMenuGroup&gt;
              &lt;/rich:panelMenu&gt;
          &lt;/h:panelGrid&gt;
      &lt;/h:form&gt;
  &lt;/ui:composition&gt;
  </code></pre>
  
  <p>My faces-config.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;faces-config
      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-facesconfig_2_0.xsd"
      version="2.0"&gt;
  
  &lt;/faces-config&gt;
  </code></pre>
  
  <p>My web.xml reads as</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="ISO-8859-1"?&gt;
  &lt;web-app version="3.0"
  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_3_0.xsd"&gt;
    &lt;display-name&gt;
      trinity
  &lt;/display-name&gt;
    &lt;description&gt;
      C'mon, you know what goes into a description, don't you?
  &lt;/description&gt;
  
    &lt;!-- Plugging the "Blue Sky" skin into the project --&gt;
  &lt;context-param&gt;
  &lt;param-name&gt;org.richfaces.SKIN&lt;/param-name&gt;
  &lt;param-value&gt;blueSky&lt;/param-value&gt;
  &lt;/context-param&gt;
  &lt;!-- Making the RichFaces skin spread to standard HTML controls --&gt;
  &lt;context-param&gt;
  &lt;param-name&gt;org.richfaces.CONTROL_SKINNING&lt;/param-name&gt;
  &lt;param-value&gt;enable&lt;/param-value&gt;
  &lt;/context-param&gt;
  &lt;servlet&gt;
  &lt;servlet-name&gt;Faces Servlet&lt;/servlet-name&gt;
  &lt;servlet-class&gt;javax.faces.webapp.FacesServlet&lt;/servlet-class&gt;
  &lt;load-on-startup&gt;1&lt;/load-on-startup&gt;
  &lt;/servlet&gt;
  &lt;!-- Faces Servlet Mapping --&gt;
  &lt;servlet-mapping&gt;
  &lt;servlet-name&gt;Faces Servlet&lt;/servlet-name&gt;
  &lt;url-pattern&gt;*.jsf&lt;/url-pattern&gt;
  &lt;/servlet-mapping&gt;
  &lt;servlet-mapping&gt;
      &lt;servlet-name&gt;Faces Servlet&lt;/servlet-name&gt;
      &lt;url-pattern&gt;/jsf/*&lt;/url-pattern&gt;
  &lt;/servlet-mapping&gt;
  &lt;login-config&gt;
      &lt;auth-method&gt;BASIC&lt;/auth-method&gt;
  &lt;/login-config&gt;
  &lt;/web-app&gt;
  </code></pre>
  
  <p>But when I try to access the page, I get an error saying</p>
  
  <pre><code>java.lang.NullPointerException
      com.sun.faces.context.flash.ELFlash.doLastPhaseActions(ELFlash.java:607)
      com.sun.faces.context.ExternalContextImpl.responseFlushBuffer(ExternalContextImpl.java:857)
      com.sun.faces.application.view.JspViewHandlingStrategy.buildView(JspViewHandlingStrategy.java:155)
      com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:100)
      com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
      com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
      javax.faces.webapp.FacesServlet.service(FacesServlet.java:594)
  </code></pre>
  
  <p>I have all the required libraries in place. I am new to JSF 2 and RichFaces. Any ideas where I am going wrong? 
  Thanks for any help in advance.</p>