`

BIRT2.5执行javascript报错解决

    博客分类:
  • BIRT
阅读更多

BIRT2.5执行DataSet的javascript脚本的时候报错如下:

java.lang.NullPointerException
	at org.eclipse.birt.report.engine.executor.ReportExecutor.execute(ReportExecutor.java:123)
	at org.eclipse.birt.report.engine.internal.executor.wrap.WrappedReportExecutor.execute(WrappedReportExecutor.java:60)
	at org.eclipse.birt.report.engine.internal.executor.dup.SuppressDuplciateReportExecutor.execute(SuppressDuplciateReportExecutor.java:42)
	at org.eclipse.birt.report.engine.internal.executor.wrap.WrappedReportExecutor.execute(WrappedReportExecutor.java:60)
	at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.doRun(RunAndRenderTask.java:168)
	at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.run(RunAndRenderTask.java:75)
	at de.itrn.svp.printing.PrintingEngine.generateOutput(PrintingEngine.java:298)
	at de.itrn.svp.printing.PrintingEngine.<init>(PrintingEngine.java:114)
	at de.itrn.sv.finance.views.InvoiceView$4.widgetSelected(InvoiceView.java:165)

原因:

写道
After some debugging i found, that on executing task.run() the
DataEngine is NULL. ExecutionContext.openDataEngine() catchs a
BirtException 'no such extension: javascript'.

I've installed BIRT with the Eclipse Package-Manager.
Is there anything else to install?

 解决方式:引入插件org.eclipse.birt.report.engine.script.javascript

写道
I continued the problem analysis and I got a more precise result:

1) If I explicitly download BIRT 2.5.1 with the eclipse update manager then
the report creation works fine.
2) If I download the plugins of our software with the eclipse update manager
then the report creation fails with a NullPointerException:

java.lang.NullPointerException
at
org.eclipse.birt.report.engine.executor.ReportExecutor.execu te(ReportExecutor.java:123)
at
org.eclipse.birt.report.engine.internal.executor.wrap.Wrappe dReportExecutor.execute(WrappedReportExecutor.java:60)
at
org.eclipse.birt.report.engine.internal.executor.dup.Suppres sDuplciateReportExecutor.execute(SuppressDuplciateReportExec utor.java:42)
at
org.eclipse.birt.report.engine.internal.executor.wrap.Wrappe dReportExecutor.execute(WrappedReportExecutor.java:60)
at
org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.doR un(RunAndRenderTask.java:168)
at
org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.run (RunAndRenderTask.java:75)

(The DataEngine seems to be null. "ExecutionContext.openDataEngine()"
catches an exception)

3) The only dependency of our report creation plugin to a BIRT plugin is:
"org.eclipse.birt.report.engine". In the past this was enough to get the
necessary BIRT plugins to create the report successfully (with BIRT 2.1.x,
2.2.x, 2.3.x).
4) Now I detected that, if I add the plugin
"org.eclipse.birt.report.engine.script.javascript" (seems to be new in BIRT
2.5.1) manually to the plugins downloaded via eclipse update manager, the
report generation works fine.

Is it really necessary to add a new explicit plugin dependency to this new
plugin? We would have a problem in this case because our report generator
plugin have to work with eclipse 3.2 (BIRT 2.1.x), eclipse 3.2 (BIRT 2.2.x)
and eclipse 3.4 (BIRT 2.3.x), too.
And then I assume that we get a problem because in elder BIRT versions this
plugin doesn't exist...

Or is it a missing dependency bug within BIRT 2.5.1?

 

参考:http://www.eclipse.org/forums/index.php?t=msg&goto=491071&

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics