3 Replies Latest reply on Jun 7, 2005 3:31 AM by Randahl Fink Isaksen

    Long class names missed by LoadMgr3 - short names work

    Randahl Fink Isaksen Novice

      I am running MyFaces on Tomcat 5 inside JBoss 4, and I have now encountered a really strange class loading problem. When I deploy a class named
      dk.rockit.puls.web.rendering.browserXhtml.layout.DivisiLayoutInfo
      the class is picked up fine but if I rename it to
      dk.rockit.puls.web.rendering.browserXhtml.layout.DivisioLayoutInfo
      or anything longer than that an exception is thrown.

      Now, I do not believe in magic, so I have tested this quite thoroughly, and it is consistent - whenever the class name exceeds 66 characters in length the LoadMgr3 throws a class not found exception, and if I rename my class to any short name no exception is thrown.

      The error only occurs in my web module. I am using this class loader configuration for the EAR in which the web module's WAR resides:

      <jboss-app>
      <loader-repository>
      dot.com:loader=rockit-web.ear
      <loader-repository-config>
      java2ParentDelegation=false
      </loader-repository-config>
      </loader-repository>
      </jboss-app>

      Below you will find the stack trace I encounter. If anyone has a clue to what could be wrong I would be grateful.

      Randahl




      Caused by: java.lang.ClassNotFoundException: No ClassLoaders found for: dk.rocki
      t.puls.web.rendering.browserXhtml.layout.DivisionLayoutInfo
      at org.jboss.mx.loading.LoadMgr3.beginLoadTask(LoadMgr3.java:292)
      at org.jboss.mx.loading.RepositoryClassLoader.loadClassImpl(RepositoryCl
      assLoader.java:464)
      at org.jboss.mx.loading.RepositoryClassLoader.loadClass(RepositoryClassL
      oader.java:374)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
      at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
      at java.lang.Class.forName0(Native Method)
      at java.lang.Class.forName(Class.java:242)
      at org.apache.myfaces.util.ClassUtils.classForName(ClassUtils.java:175)
      at org.apache.myfaces.util.ClassUtils.simpleClassForName(ClassUtils.java
      :194)
      ... 79 more
      19:04:25,703 ERROR [Engine] ApplicationDispatcher[] Servlet.service() for servle
      t jsp threw exception
      javax.faces.el.EvaluationException: Expression: '#{divisionLayoutInfo.title}'
      at org.apache.myfaces.el.ValueBindingImpl.getValue(ValueBindingImpl.java
      :466)
      at javax.faces.component.UIOutput.getValue(UIOutput.java:75)
      at org.apache.myfaces.renderkit.RendererUtils.getStringValue(RendererUti
      ls.java:296)
      at org.apache.myfaces.renderkit.html.HtmlTextRendererBase.renderOutput(H
      tmlTextRendererBase.java:93)
      at org.apache.myfaces.renderkit.html.HtmlTextRendererBase.encodeEnd(Html
      TextRendererBase.java:81)
      at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:
      341)
      at javax.faces.webapp.UIComponentTag.encodeEnd(UIComponentTag.java:386)
      at javax.faces.webapp.UIComponentTag.doEndTag(UIComponentTag.java:290)
      at org.apache.jsp.puls.rendering.division_002dlayout_jspx._jspx_meth_h_o
      utputText_0(division_002dlayout_jspx.java:149)
      at org.apache.jsp.puls.rendering.division_002dlayout_jspx._jspx_meth_f_v
      iew_0(division_002dlayout_jspx.java:111)
      at org.apache.jsp.puls.rendering.division_002dlayout_jspx._jspService(di
      vision_002dlayout_jspx.java:61)
      at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
      at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper
      .java:324)
      at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:2
      92)
      at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
      icationFilterChain.java:237)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
      ilterChain.java:157)
      at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDisp
      atcher.java:704)
      at org.apache.catalina.core.ApplicationDispatcher.processRequest(Applica
      tionDispatcher.java:474)
      at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationD
      ispatcher.java:409)
      at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDis
      patcher.java:312)
      at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatc
      h(ServletExternalContextImpl.java:405)
      at org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspV
      iewHandlerImpl.java:280)
      at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:
      300)
      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:110)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
      icationFilterChain.java:237)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
      ilterChain.java:157)
      at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDisp
      atcher.java:704)
      at org.apache.catalina.core.ApplicationDispatcher.processRequest(Applica
      tionDispatcher.java:474)
      at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationD
      ispatcher.java:409)
      at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDis
      patcher.java:312)
      at dk.rockit.puls.web.rendering.browserXhtml.BrowserXhtmlRenderer.render
      (BrowserXhtmlRenderer.java:74)
      at dk.rockit.puls.web.rendering.Renderers.render(Renderers.java:39)
      at dk.rockit.puls.web.PulsDispatcher.dispatch(PulsDispatcher.java:100)
      at dk.rockit.puls.web.gatekeeper.Gatekeeper.dispatch(Gatekeeper.java:66)

      at dk.rockit.puls.web.PulsFilter.doFilter(PulsFilter.java:76)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
      icationFilterChain.java:186)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
      ilterChain.java:157)
      at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFi
      lter.java:75)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
      icationFilterChain.java:186)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
      ilterChain.java:157)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
      alve.java:214)
      at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
      eContext.java:104)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
      a:520)
      at org.apache.catalina.core.StandardContextValve.invokeInternal(Standard
      ContextValve.java:198)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
      alve.java:152)
      at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
      eContext.java:104)
      at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrinc
      ipalValve.java:66)
      at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
      eContext.java:102)
      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(Securit
      yAssociationValve.java:150)
      at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
      eContext.java:102)
      at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValv
      e.java:54)
      at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
      eContext.java:102)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
      a:520)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
      ava:137)
      at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
      eContext.java:104)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
      ava:118)
      at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
      eContext.java:102)
      at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:
      535)
      at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
      eContext.java:102)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
      a:520)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
      ve.java:109)
      at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
      eContext.java:104)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
      a:520)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)

      at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:16
      0)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
      :799)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
      ssConnection(Http11Protocol.java:705)
      at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java
      :577)
      at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadP
      ool.java:683)
      at java.lang.Thread.run(Thread.java:595)
      Caused by: javax.faces.FacesException: java.lang.ClassNotFoundException: No Clas
      sLoaders found for: dk.rockit.puls.web.rendering.browserXhtml.layout.DivisionLay
      outInfo
      at org.apache.myfaces.util.ClassUtils.simpleClassForName(ClassUtils.java
      :199)
      at org.apache.myfaces.util.ClassUtils.newInstance(ClassUtils.java:278)
      at org.apache.myfaces.config.ManagedBeanBuilder.buildManagedBean(Managed
      BeanBuilder.java:57)
      at org.apache.myfaces.el.VariableResolverImpl.resolveVariable(VariableRe
      solverImpl.java:328)
      at org.apache.myfaces.el.ValueBindingImpl$ELVariableResolver.resolveVari
      able(ValueBindingImpl.java:637)
      at org.apache.commons.el.NamedValue.evaluate(NamedValue.java:124)
      at org.apache.commons.el.ComplexValue.evaluate(ComplexValue.java:140)
      at org.apache.myfaces.el.ValueBindingImpl.getValue(ValueBindingImpl.java
      :441)