1 Reply Latest reply on Jan 25, 2008 5:18 AM by Nicola Ben

    EAR and exception rendering a toolbar

    Nicola Ben Novice

      Hi,
      I am using SEAM 2.0.0_GA and richfaces 3.1.3 (also tried with 3.1.2) and jboss 4.2.2-GA

      A session bean should cointain info for rendering user's menu:

      @Scope(ScopeType.SESSION)
      @Name("loginInfo")
      public class LoginInfo implements Serializable {
       ....
       public UIToolBar getToolBar() {
       if (isLoggedIn()) {
       toolBar = new HtmlToolBar();
       initToolbar(toolBar);
       }
       return toolBar;
       }
      }


      When I call the page menu containing:

      <h:form>
       <rich:toolBar binding="#{loginInfo.toolBar}" />
      </h:form>
      


      I get the following exception:

      21:54:31,497 ERROR [STDERR] 24-gen-2008 21.54.31 com.sun.facelets.FaceletViewHandler handleRenderException
      GRAVE: Error Rendering View[/menu2.xhtml]
      java.lang.IllegalArgumentException: Component j_id2:j_id3 not instance of org.richfaces.component.UIToolBar
      at org.ajax4jsf.renderkit.RendererBase.encodeBegin(RendererBase.java:94)
      at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:788)
      at javax.faces.component.UIComponent.encodeAll(UIComponent.java:884)
      at javax.faces.render.Renderer.encodeChildren(Renderer.java:137)
      at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:812)
      at javax.faces.component.UIComponent.encodeAll(UIComponent.java:886)
      at javax.faces.component.UIComponent.encodeAll(UIComponent.java:892)
      at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:592)
      at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
      at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:216)
      at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
      at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
      at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
      at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:68)
      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)
      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:44)
      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
      at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
      at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:60)
      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
      at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
      at java.lang.Thread.run(Thread.java:595)



      I thought of a classloader problem mentioned in:
      http://www.jboss.com/index.html?module=bb&op=viewtopic&t=113241
      (duplication of richfaces, in ear and war)

      So I tried to remove them from my WAR.

      But in that case (richfaces only in my ear, and declared in application.xml)
      I get the following during the deploy:


      22:27:15,583 ERROR [STDERR] javax.faces.FacesException: org.ajax4jsf.renderkit.ChameleonRenderKitFactory
      22:27:15,584 ERROR [STDERR] at javax.faces.FactoryFinder.getImplGivenPreviousImpl(FactoryFinder.java:556)
      22:27:15,584 ERROR [STDERR] at javax.faces.FactoryFinder.getImplementationInstance(FactoryFinder.java:448)
      22:27:15,585 ERROR [STDERR] at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:249)
      22:27:15,585 ERROR [STDERR] at com.sun.faces.config.ConfigureListener.configure(ConfigureListener.java:1036)
      22:27:15,585 ERROR [STDERR] at com.sun.faces.config.ConfigureListener.configure(ConfigureListener.java:493)
      22:27:15,588 ERROR [STDERR] at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:381)
      22:27:15,588 ERROR [STDERR] at org.jboss.web.jsf.integration.config.JBossJSFConfigureListener.contextInitialized(JBossJSFConfigureListener.java:69)
      22:27:15,589 ERROR [STDERR] at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3856)
      22:27:15,589 ERROR [STDERR] at org.apache.catalina.core.StandardContext.start(StandardContext.java:4361)
      22:27:15,589 ERROR [STDERR] at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:790)
      22:27:15,589 ERROR [STDERR] at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:770)
      22:27:15,589 ERROR [STDERR] at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:553)
      22:27:15,590 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      22:27:15,590 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      22:27:15,590 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      22:27:15,590 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
      22:27:15,590 ERROR [STDERR] at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:296)
      22:27:15,590 ERROR [STDERR] at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
      22:27:15,591 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      22:27:15,591 ERROR [STDERR] at org.apache.catalina.core.StandardContext.init(StandardContext.java:5312)
      22:27:15,591 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      22:27:15,591 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      22:27:15,591 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      22:27:15,591 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
      22:27:15,592 ERROR [STDERR] at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:296)
      22:27:15,592 ERROR [STDERR] at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
      22:27:15,592 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      22:27:15,592 ERROR [STDERR] at org.jboss.web.tomcat.service.TomcatDeployer.performDeployInternal(TomcatDeployer.java:301)
      22:27:15,592 ERROR [STDERR] at org.jboss.web.tomcat.service.TomcatDeployer.performDeploy(TomcatDeployer.java:104)
      22:27:15,592 ERROR [STDERR] at org.jboss.web.AbstractWebDeployer.start(AbstractWebDeployer.java:375)
      22:27:15,593 ERROR [STDERR] at org.jboss.web.WebModule.startModule(WebModule.java:83)
      22:27:15,593 ERROR [STDERR] at org.jboss.web.WebModule.startService(WebModule.java:61)
      22:27:15,593 ERROR [STDERR] at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
      22:27:15,593 ERROR [STDERR] at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
      22:27:15,593 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor123.invoke(Unknown Source)
      22:27:15,593 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      22:27:15,593 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
      22:27:15,594 ERROR [STDERR] at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
      22:27:15,594 ERROR [STDERR] at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
      22:27:15,594 ERROR [STDERR] at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
      22:27:15,594 ERROR [STDERR] at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
      22:27:15,594 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      22:27:15,594 ERROR [STDERR] at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
      22:27:15,594 ERROR [STDERR] at $Proxy0.start(Unknown Source)
      22:27:15,595 ERROR [STDERR] at org.jboss.system.ServiceController.start(ServiceController.java:417)
      22:27:15,596 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
      22:27:15,596 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      22:27:15,596 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
      22:27:15,596 ERROR [STDERR] at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
      22:27:15,596 ERROR [STDERR] at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
      22:27:15,596 ERROR [STDERR] at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
      22:27:15,596 ERROR [STDERR] at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
      22:27:15,597 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      22:27:15,597 ERROR [STDERR] at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
      22:27:15,597 ERROR [STDERR] at $Proxy44.start(Unknown Source)
      22:27:15,597 ERROR [STDERR] at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:466)
      22:27:15,597 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      22:27:15,597 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      22:27:15,598 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      22:27:15,598 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
      22:27:15,598 ERROR [STDERR] at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
      22:27:15,598 ERROR [STDERR] at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
      22:27:15,598 ERROR [STDERR] at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
      22:27:15,598 ERROR [STDERR] at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      22:27:15,598 ERROR [STDERR] at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
      22:27:15,599 ERROR [STDERR] at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:97)
      22:27:15,599 ERROR [STDERR] at org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(InterceptorServiceMBeanSupport.java:238)
      22:27:15,599 ERROR [STDERR] at org.jboss.wsf.container.jboss42.DeployerInterceptor.start(DeployerInterceptor.java:87)
      22:27:15,599 ERROR [STDERR] at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.start(SubDeployerInterceptorSupport.java:188)
      22:27:15,599 ERROR [STDERR] at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:95)
      22:27:15,599 ERROR [STDERR] at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      22:27:15,599 ERROR [STDERR] at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
      22:27:15,600 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      22:27:15,600 ERROR [STDERR] at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
      22:27:15,600 ERROR [STDERR] at $Proxy45.start(Unknown Source)
      22:27:15,600 ERROR [STDERR] at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
      22:27:15,600 ERROR [STDERR] at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1015)
      22:27:15,600 ERROR [STDERR] at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
      22:27:15,600 ERROR [STDERR] at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
      22:27:15,601 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor20.invoke(Unknown Source)
      22:27:15,601 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      22:27:15,601 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
      22:27:15,602 ERROR [STDERR] at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
      22:27:15,602 ERROR [STDERR] at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
      22:27:15,602 ERROR [STDERR] at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
      22:27:15,602 ERROR [STDERR] at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      22:27:15,602 ERROR [STDERR] at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
      22:27:15,602 ERROR [STDERR] at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      22:27:15,603 ERROR [STDERR] at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
      22:27:15,603 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      22:27:15,603 ERROR [STDERR] at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
      22:27:15,603 ERROR [STDERR] at $Proxy9.deploy(Unknown Source)
      22:27:15,603 ERROR [STDERR] at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
      22:27:15,603 ERROR [STDERR] at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634)
      22:27:15,603 ERROR [STDERR] at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
      22:27:15,604 ERROR [STDERR] at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:274)
      22:27:15,604 ERROR [STDERR] at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:225)
      22:27:15,605 ERROR [STDERR] Caused by: java.lang.reflect.InvocationTargetException
      22:27:15,605 ERROR [STDERR] at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      22:27:15,605 ERROR [STDERR] at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
      22:27:15,605 ERROR [STDERR] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
      22:27:15,605 ERROR [STDERR] at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
      22:27:15,605 ERROR [STDERR] at javax.faces.FactoryFinder.getImplGivenPreviousImpl(FactoryFinder.java:549)
      22:27:15,605 ERROR [STDERR] ... 96 more
      22:27:15,606 ERROR [STDERR] Caused by: java.lang.NoClassDefFoundError: org/apache/commons/digester/Digester
      22:27:15,606 ERROR [STDERR] at org.ajax4jsf.resource.ResourceBuilderImpl.registerConfig(ResourceBuilderImpl.java:159)
      22:27:15,607 ERROR [STDERR] at org.ajax4jsf.resource.ResourceBuilderImpl.registerResources(ResourceBuilderImpl.java:143)
      22:27:15,608 ERROR [STDERR] at org.ajax4jsf.resource.ResourceBuilderImpl.init(ResourceBuilderImpl.java:214)
      22:27:15,608 ERROR [STDERR] at org.ajax4jsf.renderkit.ChameleonRenderKitFactory.<init>(ChameleonRenderKitFactory.java:62)
      22:27:15,608 ERROR [STDERR] ... 101


      Could you please tell me what's wrong?

      Thank you,
      Nic