4 Replies Latest reply on May 10, 2007 3:42 PM by Pagera

    ADF Problem with JBoss

    Pagera Newbie

      im using jboss-4.0.5.GA
      i have an Exception when deploy a ADF project

      the Exception is :

      org.apache.jasper.JasperException
      org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:370)
      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.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)

      root cause

      java.lang.NullPointerException
      javax.faces.webapp.UIComponentTag.setupResponseWriter(UIComponentTag.java:615)
      javax.faces.webapp.UIComponentTag.doStartTag(UIComponentTag.java:217)
      org.apache.myfaces.taglib.core.ViewTag.doStartTag(ViewTag.java:71)
      org.apache.jsp.untitled1_jsp._jspx_meth_f_view_0(org.apache.jsp.untitled1_jsp:84)
      org.apache.jsp.untitled1_jsp._jspService(org.apache.jsp.untitled1_jsp:60)
      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:322)
      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.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)

      ............................
      but when i read ADF installer for JBoss thy told me to remove this folders from JBoss :

      deploy/jbossweb-tomcat55.sar/jsf-lib/

      tmp, log, and data directories (located at the same level as the deploy directory)

      .................................

      ............................
      ( note : even if u delete these folders ( tmp, log, and data) JBoss
      recreate it when restarting )
      so that what i did but it throw new Exception :

      that is :
      ..................

      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

      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.res_jsp._jspService(res_jsp.java:83)
      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.res_jsp._jspx_meth_f_view_0(res_jsp.java:95)
      org.apache.jsp.res_jsp._jspService(res_jsp.java:76)
      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)

      ..................................

      so anybody know any soluation for this problem ...
      thankx for helping

        • 1. Re: ADF Problem with JBoss
          Stan Silvert Master

          To remove the jsf implementation from JBoss 4.0.5, you also need to edit jbossweb-tomcat55.sar\conf\web.xml. Comment out this section:

          <init-param>
          <param-name>engineOptionsClass</param-name>
          <param-value>org.jboss.web.tomcat.tc5.jasper.JspServletOptions</param-value>
          </init-param>
          <!-- Specify the jars relative to the jbossweb-tomcat55.sar that should
          be scanned for common tag lib descriptors to include in every war
          deployment.
          -->
          <init-param>
          MyFaces tlds
          <param-name>tagLibJar0</param-name>
          <param-value>jsf-libs/myfaces-impl.jar</param-value>
          </init-param>


          Then you need to package the JSF implementation in your WAR. I don't know why someone would tell you to do this though. ADF projects should run just fine using the built-in MyFaces implementation that comes with JBoss.

          See http://jsf.jboss.com

          Stan

          • 2. Re: ADF Problem with JBoss
            Pagera Newbie

            First : thankx for ur reply

            Second : i did what u told me to ..
            but i got another exception that is :

            .....................................................

            javax.servlet.ServletException: Cannot find FacesContext
            org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:825)
            org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:758)
            org.apache.jsp.userLogin_jsp._jspService(userLogin_jsp.java:97)
            org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
            javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
            org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
            org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
            org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
            javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
            org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:75)


            root cause

            javax.servlet.jsp.JspException: Cannot find FacesContext
            javax.faces.webapp.UIComponentTag.doStartTag(UIComponentTag.java:405)
            com.sun.faces.taglib.jsf_core.ViewTag.doStartTag(ViewTag.java:105)
            org.apache.jsp.userLogin_jsp._jspx_meth_f_view_0(userLogin_jsp.java:112)
            org.apache.jsp.userLogin_jsp._jspService(userLogin_jsp.java:87)
            org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
            javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
            org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
            org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
            org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
            javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
            org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:75)

            ...............................

            and about adding the JSF implementation in my WAR ( im not that beginer to forget this issue ??????????? ).....

            my project is working perfectly in OC4J
            this is the first time im using JBoss ..

            • 4. Re: ADF Problem with JBoss
              Pagera Newbie

              Thankx for ur hlp

              but the problem is { Exception at deploy time }

              the Exception is ( cannt load Servlet.jar ) that attched with my adf project

              this is the Exception..............

              ..................................
              15:11:20,265 INFO [TomcatDeployer] deploy, ctxPath=/adfjboss, warUrl=.../tmp/de
              ploy/tmp63015adfjboss.ear-contents/adfjboss-exp.war/
              15:11:21,093 INFO [WebappClassLoader] validateJarFile(E:\Program Files\jboss-4.
              0.5.GA\server\default\.\tmp\deploy\tmp63015adfjboss.ear-contents\adfjboss-exp.wa
              r\WEB-INF\lib\servlet.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2
              . Offending class: javax/servlet/Servlet.class
              15:11:21,359 ERROR [[/adfjboss]] StandardWrapper.Throwable
              java.lang.NullPointerException
              at javax.faces.webapp.FacesServlet.init(FacesServlet.java:165)
              at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.
              java:1105)
              at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:93
              2)
              at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContex
              t.java:3951)
              at org.apache.catalina.core.StandardContext.start(StandardContext.java:4
              225)
              at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase
              .java:759)
              at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:73
              9)
              at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)

              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
              java:39)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
              sorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:597)
              at org.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:
              503)
              at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:1
              64)
              at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
              at org.apache.catalina.core.StandardContext.init(StandardContext.java:50
              52)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
              java:39)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
              sorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:597)
              at org.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:
              503)
              at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:1
              64)
              at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
              at org.jboss.web.tomcat.tc5.TomcatDeployer.performDeployInternal(TomcatD
              eployer.java:297)
              at org.jboss.web.tomcat.tc5.TomcatDeployer.performDeploy(TomcatDeployer.
              java:103)
              at org.jboss.web.AbstractWebDeployer.start(AbstractWebDeployer.java:371)

              at org.jboss.web.WebModule.startModule(WebModule.java:83)
              at org.jboss.web.WebModule.startService(WebModule.java:61)
              at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanS
              upport.java:289)
              at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMB
              eanSupport.java:245)
              at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
              sorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:597)
              at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
              er.java:155)
              at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
              at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
              at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
              java:264)
              ...............................

              after that i removed the Servlet.jar from my project so that gave me another Exception .................

              ............................................................

              e:/E:/Program Files/jboss-4.0.5.GA/server/default/deploy/adfjboss.ear
              15:13:34,656 INFO [EARDeployer] Undeployed J2EE application: file:/E:/Program F
              iles/jboss-4.0.5.GA/server/default/deploy/adfjboss.ear
              15:13:38,406 INFO [EARDeployer] Init J2EE application: file:/E:/Program Files/j
              boss-4.0.5.GA/server/default/deploy/adfjboss.ear
              15:13:43,437 INFO [TomcatDeployer] deploy, ctxPath=/adfjboss, warUrl=.../tmp/de
              ploy/tmp63016adfjboss.ear-contents/adfjboss-exp.war/
              15:13:43,750 ERROR [[/adfjboss]] StandardWrapper.Throwable
              java.lang.NullPointerException
              at javax.faces.webapp.FacesServlet.init(FacesServlet.java:165)
              at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.
              java:1105)
              at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:93
              2)
              at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContex
              t.java:3951)
              at org.apache.catalina.core.StandardContext.start(StandardContext.java:4
              225)
              at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase
              .java:759)
              at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:73
              9)
              at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)

              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
              java:39)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
              sorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:597)
              at org.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:
              503)
              at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:1

              .....................................................

              so thankx for ur help
              but the problem didnt solved....