Exception(s) when trying to debug a birt report

mstaniloiu picture mstaniloiu · May 10, 2011 · Viewed 7.2k times · Source

I want to debug the afterDataSetFilled method of a chart. When I start debugging, I am getting a dialog prompting me to enter the values of all the report parameters (two of which are datetime). No matter under which format I enter the datetime parameters, I always get the following exception:

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

I couldn't find what was wrong. The default values I entered (in the yyyy-MM-dd HH:mm:ss format) for the report parameters are ok, and the report is generated correctly. However, when starting the debugger they are entered under a different format (MMMM d, y h:mm:ss). If I leave them like that I get the exception. If I change them to the yyyy-MM-dd HH:mm:ss format I still get the exception. Is this a known BIRT issue, or am I doing something wrong?

I was able to bypass this issue by hard-coding these values within the SQL query (and removing the datetime report parameters). But after I did that, another exception appeared:

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

Have you encountered this issue before? What do you suggest I do to fix it?

Answer

Harry Mantheakis picture Harry Mantheakis · Oct 24, 2011

I did as suggested:

  • Changed to the standard 'Debug' perspective
  • Under the full 'Run' menu, opened 'Debug Configurations'

I changed the "Temp Folder" entry to a directory OUTSIDE my Windows User Account (ie something under the C-drive, say: C:\Temp\Birt). I created the specified directory.

Then Eclipse debugging worked.