Cannot find org.w3c.tidy.Tidy

Options
sratay
edited February 11, 2022 in Analytics #1
I am integrating BIRT into a web application and getting a class loading exception when deploying to my test environment. I can get the report to successfully generate as a PDF on my local development environment. However, when I deploy and build on my test environment, I get the following class loading exception. I don't see this class either in my WEB-INF/lib directory or in the WEB-INF/platform/plugins directory. Could I be loading the class from my Eclipse install when running locally? Maybe some kind of file permissions issue? Has anyone else run into this issue and come up with a solution?

My local development environment is Windows, and the test environment is Linux. I'm running Tomcat 6 with Java 6. I'm running BIRT 2.2.2.

Thanks, Steve

java.lang.ClassNotFoundException: org.w3c.tidy.Tidy
java.lang.ClassLoader.findClass(ClassLoader.java:358)
java.lang.ClassLoader.loadClass(ClassLoader.java:306)
java.lang.ClassLoader.loadClass(ClassLoader.java:251)
org.eclipse.osgi.framework.internal.core.BundleLoader.findClassInternal(BundleLoader.java:429)
org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:369)
org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:357)
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:83)
java.lang.ClassLoader.loadClass(ClassLoader.java:251)
java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
org.eclipse.birt.report.engine.parser.HTMLTextParser.<init>(HTMLTextParser.java:54)
org.eclipse.birt.report.engine.parser.TextParser.parse(TextParser.java:110)
org.eclipse.birt.report.engine.layout.pdf.util.HTML2Content.processForeignData(HTML2Content.java:104)
org.eclipse.birt.report.engine.layout.pdf.util.HTML2Content.html2Content(HTML2Content.java:85)
org.eclipse.birt.report.engine.layout.pdf.PDFLayoutManagerFactory$ContentVisitor.visitForeign(PDFLayoutManagerFactory.java:169)
org.eclipse.birt.report.engine.content.impl.ForeignContent.accept(ForeignContent.java:59)
org.eclipse.birt.report.engine.layout.pdf.PDFLayoutManagerFactory.createLayoutManager(PDFLayoutManagerFactory.java:71)
org.eclipse.birt.report.engine.layout.pdf.PDFBlockStackingLM.layoutChildNode(PDFBlockStackingLM.java:104)
org.eclipse.birt.report.engine.layout.pdf.PDFBlockStackingLM.traverseChildren(PDFBlockStackingLM.java:86)
org.eclipse.birt.report.engine.layout.pdf.PDFStackingLM.layoutChildren(PDFStackingLM.java:141)
org.eclipse.birt.report.engine.layout.pdf.PDFAbstractLM.layout(PDFAbstractLM.java:132)
org.eclipse.birt.report.engine.layout.pdf.PDFPageLM.layoutFooter(PDFPageLM.java:179)
org.eclipse.birt.report.engine.layout.pdf.PDFPageLM.initialize(PDFPageLM.java:84)
org.eclipse.birt.report.engine.layout.pdf.PDFStackingLM.layoutChildren(PDFStackingLM.java:139)
org.eclipse.birt.report.engine.layout.pdf.PDFPageLM.layout(PDFPageLM.java:212)
org.eclipse.birt.report.engine.layout.pdf.PDFReportLayoutEngine.layoutReport(PDFReportLayoutEngine.java:64)
org.eclipse.birt.report.engine.layout.pdf.PDFReportLayoutEngine.layout(PDFReportLayoutEngine.java:87)
org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.doRun(RunAndRenderTask.java:140)
org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.run(RunAndRenderTask.java:68)

Comments

  • rmurphy
    edited December 31, 1969 #2
    Options
    If you are integrating the ReportEngine into your web application the directory structure for your web application should look something like:
    -webapp
    ----images
    ----reports
    ----WEB-INF
    lib
    platform
    plugins
    configuration

    tidy.jar is located in a directory under the configuration directory. Have you included the configuration directory in your webapp?

    Rob
  • stephan_born
    edited December 31, 1969 #3
    Options
    We are using BIRT 2.2.1.1 and in the Tidy.jar is always located in

    pluginsorg.eclipse.birt.report.engine_2.2.1.r22x_v20070924.jarlibTidy.jar

    No matter if I use BIRTReportFrameworkSDK or BIRT-Runtime (both ReportEngine and WebViewerExample).

    The Tidy.jar under configuration seems to be a runtime copy of the deployed and running report-web-viewer.

    We have sometimes the same problem (often solved after restart of the application-server) if we deploy the ReportingWAR inside an EAR file in WAS61.
  • rmurphy
    edited December 31, 1969 #4
    Options
    When deploying BIRT on WebSphere, make sure you set the Classloader mode to PARENT_LAST and the WAR Classloader Policy to Application.<br />
    <br />
    This wiki post should provide some additional information:<br />
    <a class='bbc_url' href='http://www.birt-exchange.com/modules/mediawiki/index.php/BIRT:Deployment#Q:_How_do_I_install_BIRT_in_WebSphere.3F'>http://www.birt-exchange.com/modules/mediawiki/index.php/BIRT:Deployment#Q:_How_do_I_install_BIRT_in_WebSphere.3F</a><br />
    <br />
    Rob
  • Sriraja
    edited December 31, 1969 #5
    Options
    Hi
    I also had a similar problem. and I provided write access to the user tomcat on the directory WEB-INF/platform and everything goes fine. Seems like BIRT is writing/extracting some files in the configuration directory and creating a workspace folder also.