如何在BIRT查看预览结果时修复错误?

时间:2016-05-09 03:36:15

标签: report reporting birt

我想在数据集中使用Classic Models Inc.示例数据库显示BIRT的预览结果:     选择 *     来自CLASSICMODELS.CUSTOMERS

但是当我想显示预览结果时会出现错误:

org.eclipse.birt.report.engine.api.EngineException: Error happened while running the report.
    at org.eclipse.birt.report.engine.api.impl.DatasetPreviewTask.doRun(DatasetPreviewTask.java:330)
    at org.eclipse.birt.report.engine.api.impl.DatasetPreviewTask.runDataset(DatasetPreviewTask.java:280)
    at org.eclipse.birt.report.engine.api.impl.DatasetPreviewTask.execute(DatasetPreviewTask.java:91)
    at org.eclipse.birt.report.designer.data.ui.dataset.DataSetPreviewer.preview(DataSetPreviewer.java:68)
    at org.eclipse.birt.report.designer.data.ui.dataset.ResultSetPreviewPage$5.run(ResultSetPreviewPage.java:366)
    at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:122)
Caused by: java.lang.NoClassDefFoundError: org/mozilla/javascript/ScriptOrFnNode
    at org.eclipse.birt.data.engine.impl.PreparedQuery.<init>(PreparedQuery.java:100)
    at org.eclipse.birt.data.engine.impl.PreparedDataSourceQuery.<init>(PreparedDataSourceQuery.java:75)
    at org.eclipse.birt.data.engine.impl.PreparedOdaDSQuery.<init>(PreparedOdaDSQuery.java:76)
    at org.eclipse.birt.data.engine.impl.PreparedQueryUtil.newInstance(PreparedQueryUtil.java:211)
    at org.eclipse.birt.data.engine.impl.DataEngineImpl.prepare(DataEngineImpl.java:426)
    at org.eclipse.birt.report.data.adapter.impl.DataRequestSessionImpl.prepare(DataRequestSessionImpl.java:473)
    at org.eclipse.birt.report.data.adapter.impl.DataRequestSessionImpl.prepare(DataRequestSessionImpl.java:483)
    at org.eclipse.birt.report.engine.api.impl.DatasetPreviewTask.extractQuery(DatasetPreviewTask.java:348)
    at org.eclipse.birt.report.engine.api.impl.DatasetPreviewTask.doRun(DatasetPreviewTask.java:309)
    ... 5 more
Caused by: java.lang.ClassNotFoundException: org.mozilla.javascript.ScriptOrFnNode cannot be found by org.eclipse.birt.data_4.4.2.v201501161327
    at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:432)
    at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:345)
    at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:337)
    at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:160)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    ... 14 more

如何解决此错误?

1 个答案:

答案 0 :(得分:0)

从错误日志中,您似乎正在尝试使用eclipse birt designer预览报告。

您可能想尝试在birt设计器中配置数据源以指向正确的数据库。

尝试从birt设计师的数据集控制台查看预览结果,它应该检索您希望在报告中看到的记录。

希望它有所帮助。