Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
MXReportScriptContext is undefined
Still
<p>Hello,</p>
<p> </p>
<p>I'm getting this error when I launch the "Debug Report". I made a lot of research but I couldn't find any solution. It sounds like it would come from the installation/configuration of Birt and especially when I had to copy/paste and extract files in the viewer plugin.</p>
<p> </p>
<p>I created a new empty design (to test/reproduce my issue) and added two lines of script in the initialize part :</p>
<p> </p>
<div>importPackage(Packages.classes.com.ibm.tivoli.maximo.report.script); -- gives no error but still... Does it work as expected ?</div>
<div>mxReportScriptContext = MXReportScriptContext.initialize(reportContext); -- throw MXReportScriptContext is undefined</div>
<div> </div>
<div>I just made a new clean install of birt in order to get rid of this error but it didn't work out.</div>
<div> </div>
<div>Here's how the installation looks like (starting from the report viewer plugin) :</div>
<div> </div>
<div>- birt</div>
<div> - WEB-INF</div>
<div> - classes</div>
<div> - com</div>
<div> - ibm</div>
<div> - *etc*</div>
<div> - script</div>
<div> *2 folders and many classes including MXReportScriptContext*</div>
<div> - META-INF</div>
<div> - *etc*</div>
<div> - oracle</div>
<div> mxreportdatasources.properties</div>
<div> - lib</div>
<div> oraclethin.jar</div>
<div> </div>
<div>And I'm using JRE6 (32 bits).</div>
<div> </div>
<div>
<pre class="_prettyXprint">
org.mozilla.javascript.EcmaError: ReferenceError: "MXReportScriptContext" n'est pas défini
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.SecurityController$1.exec(SecurityController.java:193)
at org.eclipse.birt.report.engine.javascript.ScriptUtil$1.execWithDomain(ScriptUtil.java:59)
at org.mozilla.javascript.SecurityController.callWithDomain(SecurityController.java:189)
at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:2474)
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:780)
at org.eclipse.birt.report.engine.executor.ExecutionContext.evaluate(ExecutionContext.java:709)
at org.eclipse.birt.report.engine.script.internal.ScriptExecutor.handleScriptInternal(ScriptExecutor.java:117)
at org.eclipse.birt.report.engine.script.internal.ScriptExecutor.handleScript(ScriptExecutor.java:104)
at org.eclipse.birt.report.engine.script.internal.ReportScriptExecutor.handleInitialize(ReportScriptExecutor.java:72)
at org.eclipse.birt.report.engine.api.impl.EngineTask.loadDesign(EngineTask.java:1774)
at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.doRun(RunAndRenderTask.java:98)
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:344)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
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:622)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
at org.eclipse.equinox.launcher.Main.main(Main.java:1386)
</pre>
</div>
<p>Thanks you in advance for your answer !</p>
Find more posts tagged with
Comments
mwilliams
Are you working in the Eclipse BIRT designer? Have you tried adding your jar as a resource to the report design in the property editor "Resources" section (be sure to click on an open area in the report design to show the properties for the entire design vs an individual element)?
wwilliams
<p><a data-ipb='nomediaparse' href='
http://developer.actuate.com/community/forum/index.php?/topic/36220-mxreportscriptcontext-is-undefined/'>http://developer.actuate.com/community/forum/index.php?/topic/36220-mxreportscriptcontext-is-undefined/</a></p>
;
<p> </p>
<p>Didn't you already post this on 3/5? I don't think the answer will change.</p>
<p> </p>
<p><a data-ipb='nomediaparse' href='
https://www-304.ibm.com/support/docview.wss?uid=swg21423974&aid=1'>https://www-304.ibm.com/support/docview.wss?uid=swg21423974&aid=1</a></p>
;
<p> </p>
<p>2. Within the BIRT 2.3.2 Report Designer, a ‘DebugReport’ Options is available. Do not use this functionality because it does not properly display information with the Maximo implementation of reports<br>
due to the report script library.</p>
<p> </p>
<p>I think this is the same for 3.7.1 as well</p>