2 Replies Latest reply on May 17, 2007 10:19 AM by Charles Crouch

    tree-demo problem

    Charles Crouch Expert

      I took http://maven.exadel.com/org/richfaces/tree-demo/3.0.1-SNAPSHOT/tree-demo-3.0.1-20070511.001257-47.war
      and dropped it in a stock JBoss 4.0.5.GA and it deploys fine but when going to http://localhost:8080/tree-demo-3.0.1-20070511.001257-47/ I get the following. What did I miss?

      Thanks
      Charles

      17:08:01,807 INFO [Server] JBoss (MX MicroKernel) [4.0.5.GA (build: CVSTag=Branch_4_0 date=200610162339)] Started in 36s:112ms
      17:13:48,656 ERROR [UIComponentTag] Faces context not found. getResponseWriter will fail. Check if the FacesServlet has been initialized at all in your web.xml.
      17:13:48,666 ERROR [[jsp]] Servlet.service() for servlet jsp threw exception
      java.lang.NullPointerException
       at javax.faces.webapp.UIComponentTag.setupResponseWriter(UIComponentTag.java:929)
       at javax.faces.webapp.UIComponentTag.doStartTag(UIComponentTag.java:310)
       at org.apache.myfaces.taglib.core.ViewTag.doStartTag(ViewTag.java:70)
       at org.apache.jsp.pages.index_jsp._jspx_meth_f_view_0(index_jsp.java:173)
       at org.apache.jsp.pages.index_jsp._jspService(index_jsp.java:148)
       at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
       at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:334)
       at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
       at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
       at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
       at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
       at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
       at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:346)
       at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:152)
       at org.ajax4jsf.framework.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
       at org.ajax4jsf.framework.ajax.AjaxViewHandler.renderView(AjaxViewHandler.java:233)
       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 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:127)
       at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:277)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
       at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
       at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
       at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
       at org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:688)
       at org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:658)
       at org.apache.jsp.index_jsp._jspService(index_jsp.java:48)
       at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
       at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:334)
       at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
       at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
       at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
       at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
       at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
       at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
       at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
       at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
       at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
       at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
       at java.lang.Thread.run(Thread.java:595)




        • 1. Re: tree-demo problem
          Charles Crouch Expert

          Ok, looking at this again I needed to add a listener in the web.xml to setup the MyFaces instance which comes with JBAS 4.0.5:

           <listener>
          <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
           </listener>


          But now when the app server starts up I get the following. Google is not turning up anything obvious. What am I doing wrong?

          Thanks
          Charles

          09:26:19,018 INFO [TomcatDeployer] deploy, ctxPath=/tree-demo-3.0.1-20070511.001257-47, warUrl=.../deploy/tree-demo-3.0.1-20070511.001257-47.war/
          09:26:19,669 WARN [Digester] [ComponentRule]{faces-config/component} Merge(javax.faces.ViewRoot)
          09:26:19,729 WARN [Digester] [ManagedBeanRule]{faces-config/managed-bean} Merge(bean)
          09:26:19,729 WARN [Digester] [ManagedBeanRule]{faces-config/managed-bean} Merge(skinBean)
          09:26:21,241 INFO [FacesConfigurator] Reading standard config org/apache/myfaces/resource/standard-faces-config.xml
          09:26:21,331 INFO [FacesConfigurator] Reading config jar:file:/C:/usr/apps/jboss/jboss-4.0.5.GA.1/server/default/./deploy/tree-demo-3.0.1-20070511.001257-47.war/WEB-INF/lib/ajax4j
          sf-1.1.1-SNAPSHOT.jar!/META-INF/faces-config.xml
          09:26:21,491 INFO [FacesConfigurator] Reading config jar:file:/C:/usr/apps/jboss/jboss-4.0.5.GA.1/server/default/./deploy/tree-demo-3.0.1-20070511.001257-47.war/WEB-INF/lib/drag-d
          rop-3.0.1-SNAPSHOT.jar!/META-INF/faces-config.xml
          09:26:21,521 INFO [FacesConfigurator] Reading config jar:file:/C:/usr/apps/jboss/jboss-4.0.5.GA.1/server/default/./deploy/tree-demo-3.0.1-20070511.001257-47.war/WEB-INF/lib/jsf-fa
          celets-1.1.12.jar!/META-INF/faces-config.xml
          09:26:21,541 INFO [FacesConfigurator] Reading config jar:file:/C:/usr/apps/jboss/jboss-4.0.5.GA.1/server/default/./deploy/tree-demo-3.0.1-20070511.001257-47.war/WEB-INF/lib/tree-3
          .0.1-SNAPSHOT.jar!/META-INF/faces-config.xml
          09:26:21,551 WARN [FacesConfigurator] /WEB-INF/faces-config.xml has been specified in the javax.faces.CONFIG_FILES context parameter of the deployment descriptor. This should be r
          emoved, as it will be loaded twice. See JSF spec 1.1, 10.3.2
          09:26:21,551 INFO [FacesConfigurator] Reading config /WEB-INF/faces-config.xml
          09:26:21,561 INFO [FacesConfigurator] Reading config /WEB-INF/faces-config.xml
          09:26:21,681 ERROR [StartupServletContextListener] Error initializing ServletContext
          java.lang.IllegalArgumentException: Class org.ajax4jsf.framework.ajax.AjaxStateManager is no javax.faces.application.StateManager
           at org.apache.myfaces.config.FacesConfigurator.getApplicationObject(FacesConfigurator.java:536)
           at org.apache.myfaces.config.FacesConfigurator.configureApplication(FacesConfigurator.java:462)
           at org.apache.myfaces.config.FacesConfigurator.configure(FacesConfigurator.java:141)
           at org.apache.myfaces.webapp.StartupServletContextListener.initFaces(StartupServletContextListener.java:69)
           at org.apache.myfaces.webapp.StartupServletContextListener.contextInitialized(StartupServletContextListener.java:52)
           at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3763)
           at org.apache.catalina.core.StandardContext.start(StandardContext.java:4211)
           at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
           at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
           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(DelegatingMethodAccessorImpl.java:25)
           at java.lang.reflect.Method.invoke(Method.java:585)
           at org.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:503)
           at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
           at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
           at org.apache.catalina.core.StandardContext.init(StandardContext.java:5052)
           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
           at java.lang.reflect.Method.invoke(Method.java:585)
           at org.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:503)
           at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
           at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
           at org.jboss.web.tomcat.tc5.TomcatDeployer.performDeployInternal(TomcatDeployer.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(ServiceMBeanSupport.java:289)
           at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
           at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
           at java.lang.reflect.Method.invoke(Method.java:585)
           at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.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)
           at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
           at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
           at $Proxy0.start(Unknown Source)
           at org.jboss.system.ServiceController.start(ServiceController.java:417)
           at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
           at java.lang.reflect.Method.invoke(Method.java:585)
           at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.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)
           at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
           at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
           at $Proxy38.start(Unknown Source)
           at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:466)
           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
           at java.lang.reflect.Method.invoke(Method.java:585)
           at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
           at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
           at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
           at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
           at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
           at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:97)
           at org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(InterceptorServiceMBeanSupport.java:238)
           at org.jboss.ws.integration.jboss.DeployerInterceptor.start(DeployerInterceptor.java:92)
           at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.start(SubDeployerInterceptorSupport.java:188)
           at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:95)
           at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
           at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
           at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
           at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
           at $Proxy39.start(Unknown Source)
           at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
           at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
           at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
           at sun.reflect.GeneratedMethodAccessor54.invoke(Unknown Source)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
           at java.lang.reflect.Method.invoke(Method.java:585)
           at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
           at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
           at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
           at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
           at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
           at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
           at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
           at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
           at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
           at $Proxy8.deploy(Unknown Source)
           at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
           at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634)
           at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
           at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:336)
           at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
           at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
           at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
           at java.lang.reflect.Method.invoke(Method.java:585)
           at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.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)
           at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
           at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
           at $Proxy0.start(Unknown Source)
           at org.jboss.system.ServiceController.start(ServiceController.java:417)
           at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
           at java.lang.reflect.Method.invoke(Method.java:585)
           at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.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)
           at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
           at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
           at $Proxy4.start(Unknown Source)
           at org.jboss.deployment.SARDeployer.start(SARDeployer.java:302)
           at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
           at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
           at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
           at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:766)
           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
           at java.lang.reflect.Method.invoke(Method.java:585)
           at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
           at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
           at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
           at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
           at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
           at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
           at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
           at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
           at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
           at $Proxy5.deploy(Unknown Source)
           at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:482)
           at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362)
           at org.jboss.Main.boot(Main.java:200)
           at org.jboss.Main$1.run(Main.java:490)
           at java.lang.Thread.run(Thread.java:595)



          • 2. Re: tree-demo problem
            Charles Crouch Expert

            I think this must have been a conflict with the JSF jars the tree demo ships with and those bundled with JBAS 4.0.5. I took the nuclear option and replaced the jsf jars in tree demo with the 1.2._04 RI, ported pages/index.jsp to facelets, updated the web.xml and face-config.xml appropriately, and then added the following jboss-web.xml:

            <jboss-web>
             <class-loading>
             <loader-repository>
             org.jboss.test:loader=tree
             <loader-repository-config>java2ParentDelegation=false</loader-repository-config>
             </loader-repository>
             </class-loading>
            </jboss-web>


            Overkill? Most certainly, but I got the tree demo loading at least :-).