1 Reply Latest reply on Jun 5, 2006 8:45 AM by Mike Cev

    JBoss 4.03 ClassLoader problem!!

    Mike Cev Newbie

      I am using TransformerFactory.class . This class is included in JBOSS_HOME\lib\endorsed\xalan.jar. I also include xalan.jar in my war file. Everything works fine until I hot deploy my war file. After the hot deploy I get ClassCastException. I read the classloading diagram and this is what I understood. JBoss should load the class from my war file firs. If not present then based on the class loading configuration it can ask to load from UCL class loaders. If not present there then it looks in Server Class loader then the NoAnnotationURLClassLoader. But it seems like for this class it is loading from the NoAnnotationClassLoader or I am doing something terribly wrong. Here is my classloader config and the exception I get:


      <class-loading>
      <loader-repository> com.zzz.xxx.myapp:loader=myapp.war
      <loader-repository-config>java2ParentDelegation=false</loader-repository-config>
      </loader-repository>
      </class-loading>




      java.lang.ClassCastException: org.apache.fop.render.pdf.PDFRendererMaker
      at org.apache.fop.render.RendererFactory.discoverRenderers(RendererFactory.java:270)
      at org.apache.fop.render.RendererFactory.(RendererFactory.java:56)
      at org.apache.fop.apps.FopFactory.(FopFactory.java:64)
      at org.apache.fop.apps.FopFactory.newInstance(FopFactory.java:126)
      at com.bfm.app.viewserver.pdfwriter.PDFWriterServlet.(PDFWriterServlet.java:26)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
      at java.lang.Class.newInstance0(Class.java:350)
      at java.lang.Class.newInstance(Class.java:303)
      at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1048)
      at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:750)
      at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:641)
      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.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel(InternalResourceView.java:97)
      at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:250)
      at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:928)
      at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:705)
      at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:625)
      at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:392)
      at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:347)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
      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:81)
      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.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:159)
      at org.jboss.web.tomcat.tc5.session.ClusteredSessionValve.invoke(ClusteredSessionValve.java:81)
      at org.jboss.web.tomcat.tc5.session.JvmRouteValve.invoke(JvmRouteValve.java:73)
      at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
      at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:307)
      at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:385)
      at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:748)
      at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:678)
      at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:871)
      at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
      at java.lang.Thread.run(Thread.java:595)