Home
Analytics
Error message when trying to use Birt debugger
ShlomiW
<p>Hi all,</p><p> </p><p>I have a report that runs without no errors in Web Viewer and also in HTML.</p><p>But when I tried to run it with Eclipse debug (Report Design perspective -> Run -> Debug Report) I get an error message.</p><p> </p><p>Error message text:</p><pre class="_prettyXprint _lang-">>>>> Line changed to: 8>>>> Debugger exception occured:org.mozilla.javascript.EcmaError: ReferenceError: "BarSeriesImpl" is not defined. at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3654) at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3632) at org.mozilla.javascript.ScriptRuntime.notFoundError(ScriptRuntime.java:3717) at org.mozilla.javascript.ScriptRuntime.nameOrFunction(ScriptRuntime.java:1758) at org.mozilla.javascript.ScriptRuntime.name(ScriptRuntime.java:1697) at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:3410) at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:2487) at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:164) at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:398) at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3065) at org.mozilla.javascript.InterpretedFunction.exec(InterpretedFunction.java:175) at org.eclipse.birt.report.engine.javascript.JavascriptEngine.evaluate(JavascriptEngine.java:290) at org.eclipse.birt.core.script.ScriptContext.evaluate(ScriptContext.java:154) at org.eclipse.birt.report.engine.executor.ExecutionContext.evaluate(ExecutionContext.java:789) at org.eclipse.birt.report.engine.executor.ExecutionContext.evaluate(ExecutionContext.java:718) at org.eclipse.birt.report.engine.script.internal.ScriptExecutor.handleScriptInternal(ScriptExecutor.java:118) at org.eclipse.birt.report.engine.script.internal.ScriptExecutor.handleScript(ScriptExecutor.java:105) at org.eclipse.birt.report.engine.script.internal.ReportScriptExecutor.handleBeforeFactory(ReportScriptExecutor.java:114) at org.eclipse.birt.report.engine.api.impl.EngineTask.startFactory(EngineTask.java:2027) at org.eclipse.birt.report.engine.api.impl.RunTask.doRun(RunTask.java:226) at org.eclipse.birt.report.engine.api.impl.RunTask.run(RunTask.java:112) at org.eclipse.birt.report.debug.internal.core.launcher.ReportLauncher.createReportDocument(ReportLauncher.java:632) at org.eclipse.birt.report.debug.internal.core.launcher.ReportLauncher.renderReport(ReportLauncher.java:555) at org.eclipse.birt.report.debug.internal.core.launcher.ReportLauncher.run(ReportLauncher.java:461) at org.eclipse.birt.report.debug.internal.core.launcher.ReportLauncher.main(ReportLauncher.java:105) 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:354) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:181) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:636) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591) at org.eclipse.equinox.launcher.Main.run(Main.java:1450) at org.eclipse.equinox.launcher.Main.main(Main.java:1426)>>>> Exit script.Jul 03, 2013 12:20:15 PM org.eclipse.birt.report.engine.script.internal.ScriptExecutor addExceptionWARNING: There are errors evaluating script "importPackage(Packages.org.eclipse.birt.chart.model.type.impl);importPackage(Packages.org.eclipse.birt.chart.model.attribute); var runnable = reportContext.getReportRunnable();var engine = runnable.getReportEngine();var tsk = engine.createGetParameterDefinitionTask( runnable );bs1 = BarSeriesImpl.create();":ReferenceError: "BarSeriesImpl" is not defined.org.eclipse.birt.report.engine.api.EngineException: There are errors evaluating script "importPackage(Packages.org.eclipse.birt.chart.model.type.impl);importPackage(Packages.org.eclipse.birt.chart.model.attribute); var runnable = reportContext.getReportRunnable();var engine = runnable.getReportEngine();var tsk = engine.createGetParameterDefinitionTask( runnable );bs1 = BarSeriesImpl.create();":ReferenceError: "BarSeriesImpl" is not defined. at org.eclipse.birt.report.engine.script.internal.ScriptExecutor.addException(ScriptExecutor.java:249) at org.eclipse.birt.report.engine.script.internal.ReportScriptExecutor.handleBeforeFactory(ReportScriptExecutor.java:122) at org.eclipse.birt.report.engine.api.impl.EngineTask.startFactory(EngineTask.java:2027) at org.eclipse.birt.report.engine.api.impl.RunTask.doRun(RunTask.java:226) at org.eclipse.birt.report.engine.api.impl.RunTask.run(RunTask.java:112) at org.eclipse.birt.report.debug.internal.core.launcher.ReportLauncher.createReportDocument(ReportLauncher.java:632) at org.eclipse.birt.report.debug.internal.core.launcher.ReportLauncher.renderReport(ReportLauncher.java:555) at org.eclipse.birt.report.debug.internal.core.launcher.ReportLauncher.run(ReportLauncher.java:461) at org.eclipse.birt.report.debug.internal.core.launcher.ReportLauncher.main(ReportLauncher.java:105) 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:354) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:181) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:636) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591) at org.eclipse.equinox.launcher.Main.run(Main.java:1450) at org.eclipse.equinox.launcher.Main.main(Main.java:1426)Caused by: org.eclipse.birt.core.exception.CoreException: There are errors evaluating script "importPackage(Packages.org.eclipse.birt.chart.model.type.impl);importPackage(Packages.org.eclipse.birt.chart.model.attribute); var runnable = reportContext.getReportRunnable();var engine = runnable.getReportEngine();var tsk = engine.createGetParameterDefinitionTask( runnable );bs1 = BarSeriesImpl.create();":ReferenceError: "BarSeriesImpl" is not defined. at org.eclipse.birt.report.engine.javascript.JavascriptEngine.evaluate(JavascriptEngine.java:295) at org.eclipse.birt.core.script.ScriptContext.evaluate(ScriptContext.java:154) at org.eclipse.birt.report.engine.executor.ExecutionContext.evaluate(ExecutionContext.java:789) at org.eclipse.birt.report.engine.executor.ExecutionContext.evaluate(ExecutionContext.java:718) at org.eclipse.birt.report.engine.script.internal.ScriptExecutor.handleScriptInternal(ScriptExecutor.java:118) at org.eclipse.birt.report.engine.script.internal.ScriptExecutor.handleScript(ScriptExecutor.java:105) at org.eclipse.birt.report.engine.script.internal.ReportScriptExecutor.handleBeforeFactory(ReportScriptExecutor.java:114) ... 21 moreCaused by: org.mozilla.javascript.EcmaError: ReferenceError: "BarSeriesImpl" is not defined. at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3654) at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3632) at org.mozilla.javascript.ScriptRuntime.notFoundError(ScriptRuntime.java:3717) at org.mozilla.javascript.ScriptRuntime.nameOrFunction(ScriptRuntime.java:1758) at org.mozilla.javascript.ScriptRuntime.name(ScriptRuntime.java:1697) at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:3410) at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:2487) at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:164) at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:398) at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3065) at org.mozilla.javascript.InterpretedFunction.exec(InterpretedFunction.java:175) at org.eclipse.birt.report.engine.javascript.JavascriptEngine.evaluate(JavascriptEngine.java:290) ... 27 moreJul 03, 2013 12:20:16 PM org.eclipse.birt.report.debug.internal.core.vm.ReportVMServer$1 runWARNING: [Server] client disconnected</pre><p>Please help me so I will be able to use the debug in order to check my reports.</p><p> </p><p>Thanks a lot for all the helpers</p><p>Shlomi</p>
Find more posts tagged with
Comments
kclark
<p>I've not used the debugger like that before. Can you try adding the runtime jars to the eclipse classpath and see if you still get the error?</p>
ShlomiW
<p>Thanks for your reply.</p><p> </p><p>I have now 2 questions:</p><p> </p><p>you said </p><blockquote class="ipsBlockquote"><p> </p><p> </p>[color=rgb(0,0,0);font-family:helvetica, arial, sans-serif;]I've not used the debugger like that before[/color]</blockquote><p>What other way there is to use the debugger?</p><p> </p><p>and also can you explain to me how to I add the jars [color=rgb(0,0,0);font-family:helvetica, arial, sans-serif;]to the eclipse classpath[/color]</p><p> </p><p>[color=rgb(0,0,0);font-family:helvetica, arial, sans-serif;]Waiting for your reply[/color]</p><p>[color=rgb(0,0,0);font-family:helvetica, arial, sans-serif;]Shlomi[/color]</p>
kclark
<p>I was able to debug this with no errors but I needed to add the runtime jar's to the resources of the project. Go here and download the runtime, then copy them into your resource explorer. After you've done this you can add the jars from the property editor > resources > click add file from the jars section. You can add just the one jar or all of them, I added all of them to make sure it would work. After you've done this you shouldn't get any more error with that code while debugging.</p>
ShlomiW
<p>Thank for your replay, but again I have 2 questions :-)</p><p> </p><p>1. You did not put any link "<span style="font-size:14px;">Go here and download the runtime" there, can you add the link that you </span>referred <span style="font-size:14px;">to?</span></p><p> </p><p><span style="font-size:14px;">2. Can you elaborate on what "</span>[color=rgb(0,0,0);font-family:helvetica, arial, sans-serif;font-size:14px;]then copy them into your resource explorer" means? maybe to write me a step by step like you did [/color]</p><p>[color=rgb(0,0,0);font-family:helvetica, arial, sans-serif;font-size:14px;]for adding the files to the [/color][color=rgb(0,0,0);font-family:helvetica, arial, sans-serif;font-size:14px;]resources section of the report. So I will be positive that I do it right and I will be able to get the same result as you.[/color]</p><p> </p><p>[color=rgb(0,0,0);font-family:helvetica, arial, sans-serif;font-size:14px;]Again Thank you for the reply[/color]</p><p>[color=rgb(0,0,0);font-family:helvetica, arial, sans-serif;font-size:14px;]Have a great week, waiting to hear for you again[/color]</p><p>[color=rgb(0,0,0);font-family:helvetica, arial, sans-serif;font-size:14px;]Shlomi[/color]</p>
kclark
<p>Sorry about the missed link, you can <a data-ipb='nomediaparse' href='
http://www.eclipse.org/downloads/download.php?file=/birt/downloads/drops/R-R1-4_3_0-201306131152/birt-runtime-4_3_0.zip'>download
the runtime from here</a>. To add the jar's to the resource explorer you need to click the resource explorer tab in the upper left, it should be under the icon to preview the report. It's in the same tab grouping as palette and data explorer. Once there you can right click on shared resources > add resource > browse then add the jars from here. Let me know if you need anymore help
</p>
ShlomiW
<p>I used your link to download and I got a ZIP file, I extracted it and got some folders and files:</p><blockquote class="ipsBlockquote"><p> </p><p>about_files</p><p>ReportEngine</p><p>WebViewerExample</p><p>about.html</p><p>birt.war</p><p>epl-v10.html</p><p>notice.html</p><p>readme.txt</p></blockquote><p> </p><p>I see many jar files in </p><blockquote class="ipsBlockquote"><p> </p><p>ReportEnginelib</p></blockquote><p> </p><p>and also in</p><blockquote class="ipsBlockquote"><p> </p><p>WebViewerExampleWEB-INFlib</p></blockquote><p> </p><p>From where do I need to take the file? and do I need to used all of them or only some?</p><p> </p><p>Waiting to hear from you again</p><p>Thanks for all</p><p>Shlomi</p>
kclark
<p>You want to use the jar's in ReportEnginelib. Extract them to some location then you should be able to select them all then drag them into your workspace. Once you have them in your project you should be able to add them all from the property editor. You may only need some but I'd them all if you don't know which components your going to use since it seems these errors only occur during the debug process. Once the report is deployed you shouldn't have any of those errors.</p>
ShlomiW
<p>Thank you, now it's works.</p><p> </p><p>But I have another question, when I'm running the debug on and example report that I downloaded form here (<a data-ipb='nomediaparse' href='
http://www.birt-exchange.org/forum/index.php?/topic/28053-group-2-datasets-and-iterate/?p=110717'>http://www.birt-exchange.org/forum/index.php?/topic/28053-group-2-datasets-and-iterate/?p=110717</a>
, file name is: addpiechart.rptdesign)</p><p> </p><p>I get this error message:</p><blockquote class="ipsBlockquote"><p> </p><p>org.mozilla.javascript.WrappedException: Wrapped java.lang.ClassCastException: org.eclipse.birt.chart.model.impl.ChartWithoutAxesImpl cannot be cast to org.eclipse.birt.chart.model.Chart (/report/method[
@name="
;beforeFactory"]#17)</p><div>at org.mozilla.javascript.Context.throwAsScriptRuntimeEx(Context.java:1773)</div><div>at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:183)</div><div>at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:247)</div><div>at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:3330)</div><div>at script(/report/method[
@name="
;beforeFactory"]:17)</div><div>at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:2487)</div><div>at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:164)</div><div>at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:398)</div><div>at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3065)</div><div>at org.mozilla.javascript.InterpretedFunction.exec(InterpretedFunction.java:175)</div><div>at org.eclipse.birt.report.engine.javascript.JavascriptEngine.evaluate(JavascriptEngine.java:290)</div><div>at org.eclipse.birt.core.script.ScriptContext.evaluate(ScriptContext.java:154)</div><div>at org.eclipse.birt.report.engine.executor.ExecutionContext.evaluate(ExecutionContext.java:789)</div><div>at org.eclipse.birt.report.engine.executor.ExecutionContext.evaluate(ExecutionContext.java:718)</div><div>at org.eclipse.birt.report.engine.script.internal.ScriptExecutor.handleScriptInternal(ScriptExecutor.java:118)</div><div>at org.eclipse.birt.report.engine.script.internal.ScriptExecutor.handleScript(ScriptExecutor.java:105)</div><div>at org.eclipse.birt.report.engine.script.internal.ReportScriptExecutor.handleBeforeFactory(ReportScriptExecutor.java:114)</div><div>at org.eclipse.birt.report.engine.api.impl.EngineTask.startFactory(EngineTask.java:2027)</div><div>at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.doRun(RunAndRenderTask.java:101)</div><div>at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.run(RunAndRenderTask.java:77)</div><div>at org.eclipse.birt.report.debug.internal.core.launcher.ReportLauncher.createReport(ReportLauncher.java:600)</div><div>at org.eclipse.birt.report.debug.internal.core.launcher.ReportLauncher.renderReport(ReportLauncher.java:547)</div><div>at org.eclipse.birt.report.debug.internal.core.launcher.ReportLauncher.run(ReportLauncher.java:461)</div><div>at org.eclipse.birt.report.debug.internal.core.launcher.ReportLauncher.main(ReportLauncher.java:105)</div><div>at org.eclipse.birt.report.debug.internal.core.ReportDebugger.start(ReportDebugger.java:39)</div><div>at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)</div><div>at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)</div><div>at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)</div><div>at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:354)</div><div>at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:181)</div><div>at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)</div><div>at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)</div><div>at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)</div><div>at java.lang.reflect.Method.invoke(Unknown Source)</div><div>at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:636)</div><div>at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591)</div><div>at org.eclipse.equinox.launcher.Main.run(Main.java:1450)</div><div>at org.eclipse.equinox.launcher.Main.main(Main.java:1426)</div><div>Caused by: java.lang.ClassCastException: org.eclipse.birt.chart.model.impl.ChartWithoutAxesImpl cannot be cast to org.eclipse.birt.chart.model.Chart</div><div>at org.eclipse.birt.chart.reportitem.ChartReportItemImpl.basicSetProperty(ChartReportItemImpl.java:739)</div><div>at org.eclipse.birt.chart.reportitem.ChartSimplePropertyCommandImpl.execute(ChartSimplePropertyCommandImpl.java:52)</div><div>at org.eclipse.birt.report.model.activity.ExtensionActivityRecord.execute(ExtensionActivityRecord.java:123)</div><div>at org.eclipse.birt.report.model.activity.ActivityStack.execute(ActivityStack.java:353)</div><div>at org.eclipse.birt.report.model.activity.ActivityStack.execute(ActivityStack.java:330)</div><div>at org.eclipse.birt.chart.reportitem.ChartReportItemImpl.executeSetSimplePropertyCommand(ChartReportItemImpl.java:222)</div><div>at org.eclipse.birt.chart.reportitem.ChartReportItemImpl.setProperty(ChartReportItemImpl.java:688)</div><div>at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)</div><div>at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)</div><div>at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)</div><div>at java.lang.reflect.Method.invoke(Unknown Source)</div><div>at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:161)</div><div>... 35 more</div></blockquote><p> </p><p>Do you have any idea how can I fix this error? and also why can I run the report in preview (As HTML and also in the Web Viewer) without getting any error message?</p><p> </p><p>Waiting to hear from you again</p><p>Shlomi</p>
kclark
<p>Sorry for the late reply. When previewing your report it's best to use the WebViewer as it includes all the jars needed and will display how the user will see it when it's deployed. I'm not sure why you're getting that error but I can try to recreate it on my end and let you know.</p>
ShlomiW
<p>I would like it if you could run the report and tried to recreated it yourself.</p><p> </p><p>Also I have checked again and I don't see any error message when viewing the report in "web viewer", only when I run it in "debug" mode.</p><p> </p><p>Waiting to hear for, you again</p><p>Shlomi</p>