0 Replies Latest reply on Jan 10, 2008 2:59 PM by Lucas Machado

    dropDownMenu JBoss ResourceNotFoundException probably classl

    Lucas Machado Newbie

      My app has the following scenario:
      Two web apps deployed in the same ear in a JBoss 4.2.1
      These two apps shares many libs including richfaces libs

      It is important to me to deploy it as:
      myapp.ear
      -web-module1.war
      -web-module2.war
      -lib

      I want to put all libs on the myapp.ear/lib directory.

      In both apps I have a dropDownMenu just like in example documentation

      I start a new JBoss instance and access the web-module1 context at first. The menu works fine on this context, but when I access the second context web-module2 the Menu doesn't show the arrow(sub menu reference) and prints an exception on the container

      If I start JBoss again and access the web-module2 in first place the behavior becames opposite and the dropDownMenu on the web-module2 works and the other raises exception on container log.

      The dropDownMenu code is the same as the example documentation

      <h:form id="menu">
       <rich:toolBar id="menuToolBar" itemSeparator="none">
       <rich:dropDownMenu value="File">
       <rich:menuItem submitMode="ajax" value="New" action="#{menuCtrl.sair}">
       </rich:menuItem>
       <rich:menuItem submitMode="ajax" value="Open" action="#{menuCtrl.sair}"/>
       <rich:menuGroup value="Save As...">
       <rich:menuItem submitMode="ajax" value="Text File" action="#{menuCtrl.sair}"/>
       <rich:menuItem submitMode="ajax" value="PDF File" action="#{menuCtrl.sair}"/>
       </rich:menuGroup>
       <rich:menuItem submitMode="ajax" value="Close" action="#{menuCtrl.sair}"/>
       <rich:menuSeparator id="menuSeparator11"/>
       <rich:menuItem submitMode="ajax" value="Exit" action="#{menuCtrl.sair}"/>
       </rich:dropDownMenu>
      
       </rich:toolBar>
      </h:form>
      


      The exception raised in container is

      org.ajax4jsf.resource.ResourceNotFoundException: Resource not registered : org.richfaces.renderkit.html.images.MenuNodeImage
       at org.ajax4jsf.resource.ResourceBuilderImpl.getResource(ResourceBuilderImpl.java:393)
       at org.ajax4jsf.resource.ResourceBuilderImpl.getResourceForKey(ResourceBuilderImpl.java:337)
       at org.ajax4jsf.resource.InternetResourceService.serviceResource(InternetResourceService.java:155)
       at org.ajax4jsf.resource.InternetResourceService.serviceResource(InternetResourceService.java:144)
       at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:265)
       at sun.reflect.GeneratedMethodAccessor125.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:244)
       at java.security.AccessController.doPrivileged(Native Method)
       at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
       at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:276)
       at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:218)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
       at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:56)
       at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:189)
       at java.security.AccessController.doPrivileged(Native Method)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:185)
       at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:147)
       at sun.reflect.GeneratedMethodAccessor123.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:244)
       at java.security.AccessController.doPrivileged(Native Method)
       at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
       at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:276)
       at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:218)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
       at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:56)
       at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:189)
       at java.security.AccessController.doPrivileged(Native Method)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:185)
       at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
       at sun.reflect.GeneratedMethodAccessor122.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:244)
       at java.security.AccessController.doPrivileged(Native Method)
       at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
       at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:276)
       at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:218)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
       at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:56)
       at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:189)
       at java.security.AccessController.doPrivileged(Native Method)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:185)
       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.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
       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:241)
       at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
       at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
       at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
       at java.lang.Thread.run(Thread.java:619)
      



      The only incorrect behavior is the exception on container and the missing arrow on container.

      When I move libs from myapp.ear/lib to myapp.ear/web-moduleX.war/WEB-INF/lib it works fine, but, for other reasons it is a bad deploy choice for me

      It seems that some static variable is messing with classloader.
      Someone can help me? It is a bug? Anyone can solve?