0 Replies Latest reply on Jun 15, 2009 7:57 PM by Dean Hiller

    Seam classloader or Jboss? iText and BIRT

    Dean Hiller Expert

      I have a war file with BIRT which uses OSGi.  When I deploy to tomcat, everything works fine.  When I deploy the same war file to jboss(just a small change to components.xml to do this), then everything works fine EXCEPT when I generate a pdf file.  When I do that, I get a ClassNotFoundException but the jars are there for OSGi to load.  Seam or JBoss appears to be doing something to prevent this??? though I am not sure how that would be possible.


      It probably doesn't matter, but the only change to deploy to JBoss that I have is the attribute


       persistence-unit-jndi-name="java:/xcoreNonJtaEntityManagerFactory"



      This is how the PU is looked up in jboss.  other than, that, the components.xml and eveyr other file is EXACTLY the same but it works in tomcat but not in jboss....


      Here is the exception....


      java.lang.RuntimeException: Error happened while running the report
              at net.voicelog.onlineReporting.birt.DocumentStoreServlet$1.process(DocumentStoreServlet.java:59)
              at org.jboss.seam.servlet.ContextualHttpServletRequest.run(ContextualHttpServletRequest.java:53)
              at net.voicelog.onlineReporting.birt.DocumentStoreServlet.doGet(DocumentStoreServlet.java:52)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
              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.web.IdentityFilter.doFilter(IdentityFilter.java:40)
              at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
              at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:90)
              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:45)
              at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
              at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:177)
              at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:267)
              at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:380)
              at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:507)
              at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:56)
              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:235)
              at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
              at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
              at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
              at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:1
              at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70
              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:158)
              at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
              at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
              at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
              at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:601)
              at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
              at java.lang.Thread.run(Thread.java:619)
      Caused by: org.eclipse.birt.report.engine.api.EngineException: Error happened while running the report
              at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.doRun(RunAndRenderTask.java:180)
              at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.run(RunAndRenderTask.java:72)
              at net.voicelog.onlineReporting.birt.DocumentStoreServlet.executeReport(DocumentStoreServlet.java:162)
              at net.voicelog.onlineReporting.birt.DocumentStoreServlet$1.process(DocumentStoreServlet.java:56)
              ... 44 more
      Caused by: java.lang.NoClassDefFoundError: com/lowagie/text/DocumentException
              at org.eclipse.birt.report.engine.emitter.pdf.PDFRender.createPageDevice(PDFRender.java:61)
              at org.eclipse.birt.report.engine.layout.emitter.PageDeviceRender.start(PageDeviceRender.java:135)
              at org.eclipse.birt.report.engine.layout.emitter.PageEmitter.start(PageEmitter.java:56)
              at org.eclipse.birt.report.engine.layout.pdf.emitter.PDFLayoutEmitter.start(PDFLayoutEmitter.java:93)
              at org.eclipse.birt.report.engine.layout.pdf.emitter.WrappedPDFLayoutEmitter.start(WrappedPDFLayoutEmitter.java:64)
              at org.eclipse.birt.report.engine.layout.pdf.emitter.PDFLayoutEmitterProxy.start(PDFLayoutEmitterProxy.java:212)
              at org.eclipse.birt.report.engine.emitter.CompositeContentEmitter.start(CompositeContentEmitter.java:220)
              at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.doRun(RunAndRenderTask.java:150)
              ... 47 more
      Caused by: java.lang.ClassNotFoundException: com.lowagie.text.DocumentException
              at org.eclipse.osgi.framework.internal.core.BundleLoader.findClassInternal(BundleLoader.java:483)
              at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:399)
              at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:387)
              at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:87)
              at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
              at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
              ... 55 more
      



      I have no idea why this(BIRT) would not work in Seam/JBoss.  Anyone else have any idea? or maybe ideas on how to debug?  I have stepped through seam code before though this one is a bit challenging.


      thanks,
      Dean