4 Replies Latest reply on Apr 13, 2007 5:26 AM by Ilya Shaikovsky

    jsfHello Sample can't work on JBoss4.0.5

    shawn young Newbie

      I create the jsf project "jsfHello" step by step following the "Exadel Studio Pro Getting Started Guide for Creating a JSF Application" pdf. And deploy on Tomcat 5.5, it works well. But when i try to deploy it to JBoss4.0.5, it doesn't work.

      Does Jboss need some special config? or something other wrong?
      Thank you very much!



      the web.xml is like:

      <?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>jsfHello</display-name>
      <context-param>
      <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
      <param-value>server</param-value>
      </context-param>

      <listener-class>com.sun.faces.config.ConfigureListener</listener-class>

      <!-- Faces Servlet -->

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

      <!-- Faces 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>


      and the error info :

      HTTP Status 500 -

      --------------------------------------------------------------------------------

      type Exception report

      message

      description The server encountered an internal error () that prevented it from fulfilling this request.

      exception

      org.apache.jasper.JasperException
      org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:512)
      org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)
      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

      org.apache.jasper.JasperException
      org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:512)
      org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:395)
      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)
      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.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:688)
      org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:658)
      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:334)
      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

      java.lang.NullPointerException
      javax.faces.webapp.UIComponentTag.setupResponseWriter(UIComponentTag.java:929)
      javax.faces.webapp.UIComponentTag.doStartTag(UIComponentTag.java:310)
      org.apache.myfaces.taglib.core.ViewTag.doStartTag(ViewTag.java:70)
      org.apache.jsp.pages.inputname_jsp._jspx_meth_f_view_0(inputname_jsp.java:95)
      org.apache.jsp.pages.inputname_jsp._jspService(inputname_jsp.java:70)
      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:334)
      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)
      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.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:688)
      org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:658)
      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:334)
      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)


      note The full stack trace of the root cause is available in the Apache Tomcat/5.5.20 logs.


      --------------------------------------------------------------------------------

      Apache Tomcat/5.5.20

        • 1. Re: jsfHello Sample can't work on JBoss4.0.5
          Adrian Mitev Master

          JBoss AS comes with bundled myfaces jars. You have to delete them (server/default/deploy/jbossweb-tomcat55.sar/jsf-libs)

          • 2. Re: jsfHello Sample can't work on JBoss4.0.5
            shawn young Newbie

            Thank you! amitev.

            i delete all files in "server/default/deploy/jbossweb-tomcat55.sar/jsf-libs"

            and it comes another wrong:


            HTTP Status 500 -

            --------------------------------------------------------------------------------

            type Exception report

            message

            description The server encountered an internal error () that prevented it from fulfilling this request.

            exception

            org.apache.jasper.JasperException: org.apache.myfaces.taglib.core.ViewTag
            org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:512)
            org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)
            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

            org.apache.jasper.JasperException: org.apache.myfaces.taglib.core.ViewTag
            org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:512)
            org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)
            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)
            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.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:688)
            org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:658)
            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:334)
            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: org.apache.myfaces.taglib.core.ViewTag
            org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:843)
            org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:776)
            org.apache.jsp.pages.inputname_jsp._jspService(inputname_jsp.java:80)
            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:334)
            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)
            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.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:688)
            org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:658)
            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:334)
            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

            java.lang.NoClassDefFoundError: org.apache.myfaces.taglib.core.ViewTag
            org.apache.jsp.pages.inputname_jsp._jspx_meth_f_view_0(inputname_jsp.java:92)
            org.apache.jsp.pages.inputname_jsp._jspService(inputname_jsp.java:70)
            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:334)
            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)
            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.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:688)
            org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:658)
            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:334)
            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)


            note The full stack trace of the root cause is available in the Apache Tomcat/5.5.20 logs.


            --------------------------------------------------------------------------------

            Apache Tomcat/5.5.20

            • 4. Re: jsfHello Sample can't work on JBoss4.0.5
              Ilya Shaikovsky Master

              clear server/default/deploy/jbossweb-tomcat55.sar/jsf-libs from the all JSF libarries that comes with JBoss under default. For me works fine.