2 Replies Latest reply on May 10, 2007 6:56 PM by Moritz Herrmann

    Problem with configuration JBOSS 4.0.4, RichFaces and Exadel

    Moritz Herrmann Newbie

      I hope someone can help me.
      For a project at university I wanted to use Richfaces. That worked very fine with Tomcat. But then we changed to JBOSS 4.0.4 and it isn't working any more.

      It would be nice if someone could give some hints of configurating the server.

      Many thanks in advance

      System I use:
      JBOSS 4.0.4
      Exadel Studio Pro
      RichFaces

      The error I get:

      ...
      Stacktrace:
       org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:504)
       org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:375)
       org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
       org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
       javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
       com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:322)
       com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:130)
       org.ajax4jsf.framework.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
       org.ajax4jsf.framework.ajax.AjaxViewHandler.renderView(AjaxViewHandler.java:229)
       com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
       com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
       com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
       javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
       org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:96)
       org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:220)
       org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:703)
       org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:670)
       org.apache.jsp.index_jsp._jspService(index_jsp.java:48)
       org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
       javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
       org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
       org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
       org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
       javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
       org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
      
      root cause
      
      javax.servlet.ServletException: No faces context?!
       org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:858)
       org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:791)
       org.apache.jsp.seiten.menue_jsp._jspService(menue_jsp.java:116)
       org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
       javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
       org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
       org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
       org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
       javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
       com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:322)
       com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:130)
       org.ajax4jsf.framework.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
       org.ajax4jsf.framework.ajax.AjaxViewHandler.renderView(AjaxViewHandler.java:229)
       com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
       com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
       com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
       javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
       org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:96)
       org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:220)
       org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:703)
       org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:670)
       org.apache.jsp.index_jsp._jspService(index_jsp.java:48)
       org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
       javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
       org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
       org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
       org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
       javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
       org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
      
      root cause
      
      javax.servlet.jsp.JspException: No faces context?!
       org.apache.myfaces.taglib.core.LoadBundleTag.doStartTag(LoadBundleTag.java:74)
      ...


        • 1. Re: Problem with configuration JBOSS 4.0.4, RichFaces and Ex
          Moritz Herrmann Newbie

          Sorry. I forgot the important WEB.xml:

          <?xml version="1.0"?>
          <web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
           <display-name>System</display-name>
           <context-param>
           <param-name>javax.faces.CONFIG_FILES</param-name>
           <param-value>/WEB-INF/faces-config.xml</param-value>
           </context-param>
           <context-param>
           <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
           <param-value>server</param-value>
           </context-param>
           <filter>
           <display-name>Ajax4jsf Filter</display-name>
           <filter-name>ajax4jsf</filter-name>
           <filter-class>org.ajax4jsf.Filter</filter-class>
           </filter>
           <filter-mapping>
           <filter-name>ajax4jsf</filter-name>
           <servlet-name>Faces Servlet</servlet-name>
           <dispatcher>REQUEST</dispatcher>
           <dispatcher>FORWARD</dispatcher>
           <dispatcher>INCLUDE</dispatcher>
           </filter-mapping>
           <listener>
           <listener-class>com.sun.faces.config.ConfigureListener</listener-class>
           </listener>
           <!-- Faces Servlet -->
           <servlet>
           <servlet-name>Faces Servlet</servlet-name>
           <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
           <load-on-startup>1</load-on-startup>
           </servlet>
           <!-- Faces Servlet Mapping -->
           <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>
           <login-config>
           <auth-method>BASIC</auth-method>
           </login-config>
          </web-app>


          • 2. Re: Problem with configuration JBOSS 4.0.4, RichFaces and Ex
            Moritz Herrmann Newbie

            I solved the problem with a workaround from the Oracle site:

            ...

            1) re-installed a clean copy of JBoss 4.0.4RC1 using the jar installer
            (Note: if you just use the unzip and copy method, the ejb 3 won't work by default)

            2) deleted the <jboss_home>/server/default/deploy/jbossweb-tomcat55.sar/jsf-libs folder.

            3) comment out this portion in <jboss_home>/server/default/deploy/jbossweb-tomcat55.sar/cong/web.xml

            <init-param>
            <description>MyFaces tlds</description>
            <param-name>tagLibJar0</param-name>
            <param-value>jsf-libs/myfaces-impl.jar</param-value>
            </init-param>


            4) deleted the tmp, log and data folders under <jboss_home>/server/default
            directory (these were there, because i did a test start and stop)

            5) Started JBoss

            6) Deployed JSF application.
            ...

            So the problem have been the included jar files in the JBOSS installation.