birt java.lang.NoClassDefFoundError: org/w3c/tidy/Tidy

前段时间做birt集成开发,遇到一个问题,报表始终不能正确生成

日志如下:

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 com.cs.qdog.report.BirtReport.run(BirtReport.java:179) at com.cs.qdog.proxy.RmiHelperBean.genReport(RmiHelperBean.java:212) at com.cs.qdog.proxy.RmiHelper_fazeq8_EOImpl.genReport(RmiHelper_fazeq8_EOImpl.java:501) at com.cs.qdog.proxy.RmiHelper_fazeq8_EOImpl_WLSkel.invoke(Unknown Source) at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:589) at weblogic.rmi.cluster.ClusterableServerRef.invoke(ClusterableServerRef.java:224) at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:479) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363) at weblogic.security.service.SecurityManager.runAs(Unknown Source) at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:475) at weblogic.rmi.internal.BasicServerRef.access$300(BasicServerRef.java:59) at weblogic.rmi.internal.BasicServerRef$BasicExecuteRequest.run(BasicServerRef.java:1016) at weblogic.work.ExecuteThread.execute(ExecuteThread.java:200) at weblogic.work.ExecuteThread.run(ExecuteThread.java:172) Caused by: java.lang.NoClassDefFoundError: org/w3c/tidy/Tidy at org.eclipse.birt.report.engine.parser.HTMLTextParser.<init>(HTMLTextParser.java:54) at org.eclipse.birt.report.engine.parser.TextParser.parse(TextParser.java:110) at org.eclipse.birt.report.engine.emitter.html.HTMLReportEmitter.outputHtmlText(HTMLReportEmitter.java:2068) at org.eclipse.birt.report.engine.emitter.html.HTMLReportEmitter.startForeign(HTMLReportEmitter.java:2045) at org.eclipse.birt.report.engine.presentation.ContentEmitterVisitor.visitForeign(ContentEmitterVisitor.java:138) at org.eclipse.birt.report.engine.content.impl.ForeignContent.accept(ForeignContent.java:69) at org.eclipse.birt.report.engine.presentation.ContentEmitterVisitor.visit(ContentEmitterVisitor.java:50) at org.eclipse.birt.report.engine.presentation.ContentEmitterVisitor.visitChildren(ContentEmitterVisitor.java:156) at org.eclipse.birt.report.engine.presentation.ContentEmitterVisitor.visitCell(ContentEmitterVisitor.java:101) at org.eclipse.birt.report.engine.content.impl.CellContent.accept(CellContent.java:150) at org.eclipse.birt.report.engine.presentation.ContentEmitterVisitor.visit(ContentEmitterVisitor.java:50) at org.eclipse.birt.report.engine.presentation.ContentEmitterVisitor.visitChildren(ContentEmitterVisitor.java:156) at org.eclipse.birt.report.engine.presentation.ContentEmitterVisitor.visitRow(ContentEmitterVisitor.java:93) at org.eclipse.birt.report.engine.content.impl.RowContent.accept(RowContent.java:64) at org.eclipse.birt.report.engine.presentation.ContentEmitterVisitor.visit(ContentEmitterVisitor.java:50) at org.eclipse.birt.report.engine.presentation.ContentEmitterVisitor.visitChildren(ContentEmitterVisitor.java:156) at org.eclipse.birt.report.engine.presentation.ContentEmitterVisitor.visitTable(ContentEmitterVisitor.java:77) at org.eclipse.birt.report.engine.content.impl.TableContent.accept(TableContent.java:101) at org.eclipse.birt.report.engine.presentation.ContentEmitterVisitor.visit(ContentEmitterVisitor.java:50) at org.eclipse.birt.report.engine.presentation.ContentEmitterVisitor.visitChildren(ContentEmitterVisitor.java:156) at org.eclipse.birt.report.engine.presentation.ContentEmitterVisitor.visitCell(ContentEmitterVisitor.java:101) at org.eclipse.birt.report.engine.content.impl.CellContent.accept(CellContent.java:150) at org.eclipse.birt.report.engine.presentation.ContentEmitterVisitor.visit(ContentEmitterVisitor.java:50) at org.eclipse.birt.report.engine.presentation.ContentEmitterVisitor.visitChildren(ContentEmitterVisitor.java:156) at org.eclipse.birt.report.engine.presentation.ContentEmitterVisitor.visitRow(ContentEmitterVisitor.java:93) at org.eclipse.birt.report.engine.content.impl.RowContent.accept(RowContent.java:64) at org.eclipse.birt.report.engine.presentation.ContentEmitterVisitor.visit(ContentEmitterVisitor.java:50) at org.eclipse.birt.report.engine.presentation.ContentEmitterVisitor.visitChildren(ContentEmitterVisitor.java:156) at org.eclipse.birt.report.engine.presentation.ContentEmitterVisitor.visitTable(ContentEmitterVisitor.java:77) at org.eclipse.birt.report.engine.content.impl.TableContent.accept(TableContent.java:101) at org.eclipse.birt.report.engine.presentation.ContentEmitterVisitor.visit(ContentEmitterVisitor.java:50) at org.eclipse.birt.report.engine.presentation.ContentEmitterVisitor.visitChildren(ContentEmitterVisitor.java:156)

检查路径中Tidy.jar是存在的,初步判断是权限的问题。

在多次尝试后发现Tidy.jar 存在于2个地方

1. ReportEngine/configuration/org.eclipse.osgi/bundles/51/1/.cp/lib (黄色部分可能会有变化)

2. ReportEngine/plugins/org.eclipse.birt.report.engine.jar/lib/

 

configuration位置下的Tidy.jar是一个备份,当生成报表时会被更新。

当该位置没有写权限时,应用程序就会报上面的错误。

 

故保证configuration位置下的读写权限,报表将会被正确生成

 

你可能感兴趣的:(报表)