org.eclipse.birt.report.engine.api.EngineException

There are errors evaluating script "count = 0; importPackage(Packages.org.eclipse.core.runtime); // Create instance of // the GetStockHistory class //gsh = new Packages.daomock.StockDaoMock(); importPackage(Packages.daomock); gsh = new StockDaoMock(); //Load the List stock = gsh.getStockValues("Java"); ": Fail to execute script in function __bm_OPEN(). Source: ------ " + count = 0; importPackage(Packages.org.eclipse.core.runtime); // Create instance of // the GetStockHistory class //gsh = new Packages.daomock.StockDaoMock(); importPackage(Packages.daomock); gsh = new StockDaoMock(); //Load the List stock = gsh.getStockValues("Java"); + " ----- A BIRT exception occurred. See next exception for more information. Error evaluating Javascript expression. Script engine error: ReferenceError: "StockDaoMock" is not defined. (/report/data-sets/script-data-set[@id="40"]/method[@name="open"]#10) Script source: /report/data-sets/script-data-set[@id="40"]/method[@name="open"], line: 0, text: __bm_OPEN(). (Element ID:1)

Samebug tips0

We couldn't find tips for this exception.

Don't give up yet. Paste your full stack trace to get a solution.

Solutions on the web236

  • via Unknown by Unknown author,
  • Stack trace

    • org.eclipse.birt.report.engine.api.EngineException: There are errors evaluating script "count = 0; importPackage(Packages.org.eclipse.core.runtime); // Create instance of // the GetStockHistory class //gsh = new Packages.daomock.StockDaoMock(); importPackage(Packages.daomock); gsh = new StockDaoMock(); //Load the List stock = gsh.getStockValues("Java"); ": Fail to execute script in function __bm_OPEN(). Source: ------ " + count = 0; importPackage(Packages.org.eclipse.core.runtime); // Create instance of // the GetStockHistory class //gsh = new Packages.daomock.StockDaoMock(); importPackage(Packages.daomock); gsh = new StockDaoMock(); //Load the List stock = gsh.getStockValues("Java"); + " ----- A BIRT exception occurred. See next exception for more information. Error evaluating Javascript expression. Script engine error: ReferenceError: "StockDaoMock" is not defined. (/report/data-sets/script-data-set[@id="40"]/method[@name="open"]#10) Script source: /report/data-sets/script-data-set[@id="40"]/method[@name="open"], line: 0, text: __bm_OPEN(). (Element ID:1) at org.eclipse.birt.report.engine.script.internal.DtEScriptExecutor.handleJS(DtEScriptExecutor.java:99) at org.eclipse.birt.report.engine.script.internal.DataSetScriptExecutor.handleJS(DataSetScriptExecutor.java:256) at org.eclipse.birt.report.engine.script.internal.ScriptDataSetScriptExecutor.handleOpen(ScriptDataSetScriptExecutor.java:98) at org.eclipse.birt.data.engine.impl.ScriptDataSetRuntime.open(ScriptDataSetRuntime.java:80) at org.eclipse.birt.data.engine.impl.PreparedScriptDSQuery$ScriptDSQueryExecutor$CustomDataSet.open(PreparedScriptDSQuery.java:247) at org.eclipse.birt.data.engine.impl.PreparedScriptDSQuery$ScriptDSQueryExecutor.executeOdiQuery(PreparedScriptDSQuery.java:223) at org.eclipse.birt.data.engine.impl.QueryExecutor.execute(QueryExecutor.java:1142) at org.eclipse.birt.data.engine.impl.ServiceForQueryResults.executeQuery(ServiceForQueryResults.java:232) at org.eclipse.birt.data.engine.impl.QueryResults.getResultIterator(QueryResults.java:177) at org.eclipse.birt.report.engine.data.dte.QueryResultSet.<init>(QueryResultSet.java:98) at org.eclipse.birt.report.engine.data.dte.DteDataEngine.doExecuteQuery(DteDataEngine.java:168) at org.eclipse.birt.report.engine.data.dte.DataGenerationEngine.doExecuteQuery(DataGenerationEngine.java:83) at org.eclipse.birt.report.engine.data.dte.AbstractDataEngine.execute(AbstractDataEngine.java:267) at org.eclipse.birt.report.engine.executor.ExecutionContext.executeQuery(ExecutionContext.java:1939) at org.eclipse.birt.report.engine.executor.QueryItemExecutor.executeQuery(QueryItemExecutor.java:80) at org.eclipse.birt.report.engine.executor.TableItemExecutor.execute(TableItemExecutor.java:62) at org.eclipse.birt.report.engine.internal.executor.wrap.WrappedReportItemExecutor.execute(WrappedReportItemExecutor.java:46) at org.eclipse.birt.report.engine.internal.executor.emitter.ReportItemEmitterExecutor.execute(ReportItemEmitterExecutor.java:46) at org.eclipse.birt.report.engine.internal.executor.dup.SuppressDuplicateItemExecutor.execute(SuppressDuplicateItemExecutor.java:43) at org.eclipse.birt.report.engine.internal.executor.wrap.WrappedReportItemExecutor.execute(WrappedReportItemExecutor.java:46) at org.eclipse.birt.report.engine.internal.executor.l18n.LocalizedReportItemExecutor.execute(LocalizedReportItemExecutor.java:34) at org.eclipse.birt.report.engine.layout.html.HTMLBlockStackingLM.layoutNodes(HTMLBlockStackingLM.java:65) at org.eclipse.birt.report.engine.layout.html.HTMLPageLM.layout(HTMLPageLM.java:92) at org.eclipse.birt.report.engine.layout.html.HTMLReportLayoutEngine.layout(HTMLReportLayoutEngine.java:100) at org.eclipse.birt.report.engine.presentation.ReportDocumentBuilder.build(ReportDocumentBuilder.java:249) at org.eclipse.birt.report.engine.api.impl.RunTask.doRun(RunTask.java:262) at org.eclipse.birt.report.engine.api.impl.RunTask.run(RunTask.java:86) at org.eclipse.birt.report.service.ReportEngineService.runReport(ReportEngineService.java:1325) at org.eclipse.birt.report.service.BirtViewerReportService.runReport(BirtViewerReportService.java:158) at org.eclipse.birt.report.service.actionhandler.BirtRunReportActionHandler.__execute(BirtRunReportActionHandler.java:81) at org.eclipse.birt.report.service.actionhandler.BirtGetPageActionHandler.__checkDocumentExists(BirtGetPageActionHandler.java:58) at org.eclipse.birt.report.service.actionhandler.AbstractGetPageActionHandler.prepareParameters(AbstractGetPageActionHandler.java:119) at org.eclipse.birt.report.service.actionhandler.AbstractGetPageActionHandler.__execute(AbstractGetPageActionHandler.java:104) at org.eclipse.birt.report.service.actionhandler.AbstractBaseActionHandler.execute(AbstractBaseActionHandler.java:90) at org.eclipse.birt.report.soapengine.processor.AbstractBaseDocumentProcessor.__executeAction(AbstractBaseDocumentProcessor.java:47) at org.eclipse.birt.report.soapengine.processor.AbstractBaseComponentProcessor.executeAction(AbstractBaseComponentProcessor.java:143) at org.eclipse.birt.report.soapengine.processor.BirtDocumentProcessor.handleGetPage(BirtDocumentProcessor.java:87) 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.birt.report.soapengine.processor.AbstractBaseComponentProcessor.process(AbstractBaseComponentProcessor.java:112) at org.eclipse.birt.report.soapengine.endpoint.BirtSoapBindingImpl.getUpdatedObjects(BirtSoapBindingImpl.java:66) 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.apache.axis.providers.java.RPCProvider.invokeMethod(RPCProvider.java:397) at org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:186) at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:323) at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32) at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118) at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83) at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:454) at org.apache.axis.server.AxisServer.invoke(AxisServer.java:281) at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:699) at org.eclipse.birt.report.servlet.BirtSoapMessageDispatcherServlet.doPost(BirtSoapMessageDispatcherServlet.java:265) at javax.servlet.http.HttpServlet.service(HttpServlet.java:755) at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327) at javax.servlet.http.HttpServlet.service(HttpServlet.java:848) at org.eclipse.birt.report.servlet.BirtSoapMessageDispatcherServlet.service(BirtSoapMessageDispatcherServlet.java:122) at org.eclipse.equinox.http.registry.internal.ServletManager$ServletWrapper.service(ServletManager.java:180) at org.eclipse.equinox.http.servlet.internal.ServletRegistration.service(ServletRegistration.java:61) at org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:128) at org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:60) at javax.servlet.http.HttpServlet.service(HttpServlet.java:848) at org.eclipse.equinox.http.jetty.internal.HttpServerManager$InternalHttpServiceServlet.service(HttpServerManager.java:384) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:598) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:486) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1065) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:413) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:192) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:999) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:111) at org.eclipse.jetty.server.Server.handle(Server.java:350) at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:454) at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:900) at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:954) at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:851) at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:230) at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:77) at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:606) at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:46) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:603) at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:538) at java.lang.Thread.run(Unknown Source) Caused by: org.eclipse.birt.data.engine.core.DataException: Fail to execute script in function __bm_OPEN(). Source: ------ " + count = 0; importPackage(Packages.org.eclipse.core.runtime); // Create instance of // the GetStockHistory class //gsh = new Packages.daomock.StockDaoMock(); importPackage(Packages.daomock); gsh = new StockDaoMock(); //Load the List stock = gsh.getStockValues("Java"); + " ----- A BIRT exception occurred. See next exception for more information. Error evaluating Javascript expression. Script engine error: ReferenceError: "StockDaoMock" is not defined. (/report/data-sets/script-data-set[@id="40"]/method[@name="open"]#10) Script source: /report/data-sets/script-data-set[@id="40"]/method[@name="open"], line: 0, text: __bm_OPEN() at org.eclipse.birt.data.engine.script.JSMethodRunner.runScript(JSMethodRunner.java:147) at org.eclipse.birt.report.engine.script.internal.DtEScriptExecutor.handleJS(DtEScriptExecutor.java:90) ... 87 more Caused by: org.eclipse.birt.data.engine.core.DataException: A BIRT exception occurred. See next exception for more information. Error evaluating Javascript expression. Script engine error: ReferenceError: "StockDaoMock" is not defined. (/report/data-sets/script-data-set[@id="40"]/method[@name="open"]#10) Script source: /report/data-sets/script-data-set[@id="40"]/method[@name="open"], line: 0, text: __bm_OPEN() at org.eclipse.birt.data.engine.core.DataException.wrap(DataException.java:123) at org.eclipse.birt.data.engine.script.ScriptEvalUtil.evaluateJSAsExpr(ScriptEvalUtil.java:996) at org.eclipse.birt.data.engine.script.JSMethodRunner.runScript(JSMethodRunner.java:138) ... 88 more Caused by: org.eclipse.birt.core.exception.CoreException: Error evaluating Javascript expression. Script engine error: ReferenceError: "StockDaoMock" is not defined. (/report/data-sets/script-data-set[@id="40"]/method[@name="open"]#10) Script source: /report/data-sets/script-data-set[@id="40"]/method[@name="open"], line: 0, text: __bm_OPEN() at org.eclipse.birt.core.script.JavascriptEvalUtil.wrapRhinoException(JavascriptEvalUtil.java:303) at org.eclipse.birt.core.script.JavascriptEvalUtil.evaluateRawScript(JavascriptEvalUtil.java:102) at org.eclipse.birt.core.script.JavascriptEvalUtil.evaluateScript(JavascriptEvalUtil.java:134) at org.eclipse.birt.data.engine.script.ScriptEvalUtil.evaluateJSAsExpr(ScriptEvalUtil.java:992) ... 89 more Caused by: org.mozilla.javascript.EcmaError: ReferenceError: "StockDaoMock" is not defined. (/report/data-sets/script-data-set[@id="40"]/method[@name="open"]#10) 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)

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    Unknown visitor
    Unknown visitorOnce,
    Unknown visitor
    Unknown visitor2 times, last one
    Unknown visitor
    Unknown visitorOnce,
    Unknown visitor
    Unknown visitorOnce,
    JurajiJuraji
    5 times, last one