mst*_*oiu 5 eclipse debugging birt exception
我想调试图表的afterDataSetFilled方法.当我开始调试时,我收到一个对话框,提示我输入所有报告参数的值(其中两个是日期时间).无论以何种格式输入datetime参数,我总是得到以下异常:
SEVERE: Engine exception
org.eclipse.birt.report.engine.api.impl.ParameterValidationException: The type of parameter "startDate" is expected as "dateTime", not "java.lang.String".
at org.eclipse.birt.report.engine.api.impl.EngineTask.validateParameterValueType(EngineTask.java:865)
at org.eclipse.birt.report.engine.api.impl.EngineTask.validateAbstractScalarParameter(EngineTask.java:829)
at org.eclipse.birt.report.engine.api.impl.EngineTask.access$0(EngineTask.java:756)
at org.eclipse.birt.report.engine.api.impl.EngineTask$ParameterValidationVisitor.visitScalarParameter(EngineTask.java:686)
at org.eclipse.birt.report.engine.api.impl.EngineTask$ParameterVisitor.visit(EngineTask.java:1400)
at org.eclipse.birt.report.engine.api.impl.EngineTask.doValidateParameters(EngineTask.java:670)
at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.doRun(RunAndRenderTask.java:94)
at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.run(RunAndRenderTask.java:77)
at org.eclipse.birt.report.debug.internal.core.launcher.ReportLauncher.createReport(ReportLauncher.java:594)
at org.eclipse.birt.report.debug.internal.core.launcher.ReportLauncher.renderReport(ReportLauncher.java:541)
at org.eclipse.birt.report.debug.internal.core.launcher.ReportLauncher.run(ReportLauncher.java:455)
at org.eclipse.birt.report.debug.internal.core.launcher.ReportLauncher.main(ReportLauncher.java:104)
at org.eclipse.birt.report.debug.internal.core.ReportDebugger.start(ReportDebugger.java:39)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:619)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
at org.eclipse.equinox.launcher.Main.run(Main.java:1407)
at org.eclipse.equinox.launcher.Main.main(Main.java:1383)
May 10, 2011 10:08:11 AM org.eclipse.birt.report.debug.internal.core.vm.ReportVMServer$1 run
WARNING: [Server] client disconnected
Run Code Online (Sandbox Code Playgroud)
我找不到什么问题.我为报告参数输入的默认值(以yyyy-MM-dd HH:mm:ss格式)是正常的,并且报告生成正确.但是,在启动调试器时,它们以不同的格式输入(MMMM d,yh:mm:ss).如果我这样离开他就会得到例外.如果我将它们更改为yyyy-MM-dd HH:mm:ss格式,我仍然会得到例外.这是一个已知的BIRT问题,还是我做错了什么?
我能够通过在SQL查询中对这些值进行硬编码(以及删除日期时间报告参数)来绕过此问题.但在我这样做之后,出现了另一个例外:
SEVERE: Engine exception
org.eclipse.birt.report.engine.api.EngineException: Failed to initialize emitter.
at org.eclipse.birt.report.engine.emitter.EmitterUtil.getOuputStream(EmitterUtil.java:80)
at org.eclipse.birt.report.engine.emitter.html.HTMLReportEmitter.initialize(HTMLReportEmitter.java:350)
at org.eclipse.birt.report.engine.api.impl.EngineTask.initializeContentEmitter(EngineTask.java:2044)
at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.doRun(RunAndRenderTask.java:117)
at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.run(RunAndRenderTask.java:77)
at org.eclipse.birt.report.debug.internal.core.launcher.ReportLauncher.createReport(ReportLauncher.java:594)
at org.eclipse.birt.report.debug.internal.core.launcher.ReportLauncher.renderReport(ReportLauncher.java:541)
at org.eclipse.birt.report.debug.internal.core.launcher.ReportLauncher.run(ReportLauncher.java:455)
at org.eclipse.birt.report.debug.internal.core.launcher.ReportLauncher.main(ReportLauncher.java:104)
at org.eclipse.birt.report.debug.internal.core.ReportDebugger.start(ReportDebugger.java:39)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:619)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
at org.eclipse.equinox.launcher.Main.run(Main.java:1407)
at org.eclipse.equinox.launcher.Main.main(Main.java:1383)
Caused by: java.io.FileNotFoundException: /StandardOCE_PRS2_OperatorProductivity.rptdesign.html (Permission denied)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(FileOutputStream.java:179)
at java.io.FileOutputStream.<init>(FileOutputStream.java:131)
at org.eclipse.birt.report.engine.emitter.EmitterUtil.getOuputStream(EmitterUtil.java:75)
... 22 more
Run Code Online (Sandbox Code Playgroud)
你以前遇到过这个问题吗?你有什么建议我来解决它?
我按照建议做了:
我将"临时文件夹"条目更改为我的Windows用户帐户外的目录(即C驱动器下的内容,例如:C:\ Temp\Birt).我创建了指定的目录.
然后Eclipse调试工作.
小智 4
我今天遇到了和你一样的 FileNotFoundException,我找到了解决方案。
异常的原因是文件路径是绝对路径,并尝试将临时文件保存在 / 没有写权限的地方。解决此问题的方法是简单地创建文件(在您的情况下为 /StandardOCE_PRS2_OperatorProductivity.rptdesign.html。我假设您使用的是 Linux)并使其可由运行 Eclipse 的用户写入。这将使您克服这个错误,但在那之后我又遇到了另一个错误,所以这对我来说不是一个好的解决方案。我认为这显然是 BIRT 插件中的一个错误,因为它应该使用 /tmp 来实现这一点。它甚至似乎在调试配置中进行了配置,但并未使用它。
然后我尝试找出如何更改调试配置。Eclipse 在“报告设计”透视图中隐藏了这一点,因此我有一段时间感到困惑,但如果您更改为 Java 透视图,您将看到“调试”按钮和完整的“运行”菜单。从按钮或菜单中打开“调试配置”,您将看到 BIRT 插件之前为您创建的配置。
如果我然后从那里运行它,它会按应有的方式使用 /tmp 目录并且调试工作。现在您还可以使用调试配置。可能有用!:-)
归档时间: |
|
查看次数: |
6971 次 |
最近记录: |