Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » Problem with Script Datasource(Getting error running a java script)
Problem with Script Datasource [message #891916] Tue, 26 June 2012 10:46 Go to next message
Carlos Ferrer is currently offline Carlos Ferrer
Messages: 18
Registered: July 2009
Junior Member
On BIRT version 3.7.2
I have encountered an issue when doing a data script birt report(My first one). I compiled and jarred the classes successfully. I verified that I have the most current version of the jar.
I created the following for open():
importPackage(Packages.birtjava.tdcj.ProdDb2Test);

count = 0;

prodDb2Test = new Packages.birtjava.tdcj.ProdDb2Test();

ntoNcrList = prodDb2Test.build();
fetch():
while(count < ntoNcrList.size())
{
row["email"] = ntoNcrList.get(count).getNeoEmail();
row["userid"] = ntoNcrList.get(count).getNeoNtouserid();
row["rptType"] = ntoNcrList.get(count).getNelRptType();

count++;
return true;
}

return false;

Additional information: Per other programmers here, I placed the jar file in the same location as the .rptdesign file.

When I did a Preview I encountered the following error:
The following items have errors:


ReportDesign (id = 1):
+ There are errors evaluating script "importPackage(Packages.birtjava.tdcj.ProdDb2Test);

count = 0;

prodDb2Test = new Packages.birtjava.tdcj.ProdDb2Test();

ntoNcrList = prodDb2Test.build();
":
Fail to execute script in function __bm_OPEN(). Source:
------
" + importPackage(Packages.birtjava.tdcj.ProdDb2Test);

count = 0;

prodDb2Test = new Packages.birtjava.tdcj.ProdDb2Test();

ntoNcrList = prodDb2Test.build();
+ "
-----
A BIRT exception occurred. See next exception for more information.
Error evaluating Javascript expression. Script engine error: TypeError: [JavaPackage birtjava.tdcj.ProdDb2Test] is not a function, it is object. (/report/data-sets/script-data-set[@id="8"]/method[@name="open"]#5)
Script source: /report/data-sets/script-data-set[@id="8"]/method[@name="open"], line: 0, text:
__bm_OPEN(). (Element ID:1)
Error.ScriptEvaluationError ( 1 time(s) )
detail : org.eclipse.birt.report.engine.api.EngineException: There are errors evaluating script "importPackage(Packages.birtjava.tdcj.ProdDb2Test);

count = 0;

prodDb2Test = new Packages.birtjava.tdcj.ProdDb2Test();

ntoNcrList = prodDb2Test.build();
":
Fail to execute script in function __bm_OPEN(). Source:
------
" + importPackage(Packages.birtjava.tdcj.ProdDb2Test);

count = 0;

prodDb2Test = new Packages.birtjava.tdcj.ProdDb2Test();

ntoNcrList = prodDb2Test.build();
+ "
-----
A BIRT exception occurred. See next exception for more information.
Error evaluating Javascript expression. Script engine error: TypeError: [JavaPackage birtjava.tdcj.ProdDb2Test] is not a function, it is object. (/report/data-sets/script-data-set[@id="8"]/method[@name="open"]#5)
Script source: /report/data-sets/script-data-set[@id="8"]/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:1134)
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.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.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.api.impl.RunAndRenderTask.doRun(RunAndRenderTask.java:180)
at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.run(RunAndRenderTask.java:77)
at org.eclipse.birt.report.service.ReportEngineService.runAndRenderReport(ReportEngineService.java:929)
at org.eclipse.birt.report.service.BirtViewerReportService.runAndRenderReport(BirtViewerReportService.java:973)
at org.eclipse.birt.report.service.actionhandler.BirtGetPageAllActionHandler.__execute(BirtGetPageAllActionHandler.java:131)
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.handleGetPageAll(BirtDocumentProcessor.java:183)
at sun.reflect.GeneratedMethodAccessor34.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.GeneratedMethodAccessor33.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:727)
at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
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:126)
at org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:60)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.eclipse.equinox.http.jetty.internal.HttpServerManager$InternalHttpServiceServlet.service(HttpServerManager.java:317)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:390)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:326)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:939)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:756)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
Caused by: org.eclipse.birt.data.engine.core.DataException: Fail to execute script in function __bm_OPEN(). Source:
------
" + importPackage(Packages.birtjava.tdcj.ProdDb2Test);

count = 0;

prodDb2Test = new Packages.birtjava.tdcj.ProdDb2Test();

ntoNcrList = prodDb2Test.build();
+ "
-----
A BIRT exception occurred. See next exception for more information.
Error evaluating Javascript expression. Script engine error: TypeError: [JavaPackage birtjava.tdcj.ProdDb2Test] is not a function, it is object. (/report/data-sets/script-data-set[@id="8"]/method[@name="open"]#5)
Script source: /report/data-sets/script-data-set[@id="8"]/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)
... 70 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: TypeError: [JavaPackage birtjava.tdcj.ProdDb2Test] is not a function, it is object. (/report/data-sets/script-data-set[@id="8"]/method[@name="open"]#5)
Script source: /report/data-sets/script-data-set[@id="8"]/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)
... 71 more
Caused by: org.eclipse.birt.core.exception.CoreException: Error evaluating Javascript expression. Script engine error: TypeError: [JavaPackage birtjava.tdcj.ProdDb2Test] is not a function, it is object. (/report/data-sets/script-data-set[@id="8"]/method[@name="open"]#5)
Script source: /report/data-sets/script-data-set[@id="8"]/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)
... 72 more
Caused by: org.mozilla.javascript.EcmaError: TypeError: [JavaPackage birtjava.tdcj.ProdDb2Test] is not a function, it is object. (/report/data-sets/script-data-set[@id="8"]/method[@name="open"]#5)
at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3654)
at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3632)
at org.mozilla.javascript.ScriptRuntime.typeError(ScriptRuntime.java:3660)
at org.mozilla.javascript.ScriptRuntime.typeError2(ScriptRuntime.java:3679)
at org.mozilla.javascript.ScriptRuntime.notFunctionError(ScriptRuntime.java:3734)
at org.mozilla.javascript.ScriptRuntime.notFunctionError(ScriptRuntime.java:3722)
at org.mozilla.javascript.ScriptRuntime.newObject(ScriptRuntime.java:2324)
at org.mozilla.javascript.gen.c30._c1(/report/data-sets/script-data-set[@id="8"]/method[@name="open"]:5)
at org.mozilla.javascript.gen.c30.call(/report/data-sets/script-data-set[@id="8"]/method[@name="open"])
at org.mozilla.javascript.optimizer.OptRuntime.callName0(OptRuntime.java:108)
at org.mozilla.javascript.gen.c8._c0(/report/data-sets/script-data-set[@id="8"]/method[@name="open"]:0)
at org.mozilla.javascript.gen.c8.call(/report/data-sets/script-data-set[@id="8"]/method[@name="open"])
at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:398)
at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3065)
at org.mozilla.javascript.gen.c8.call(/report/data-sets/script-data-set[@id="8"]/method[@name="open"])
at org.mozilla.javascript.gen.c8.exec(/report/data-sets/script-data-set[@id="8"]/method[@name="open"])
at org.eclipse.birt.core.script.JavascriptEvalUtil.evaluateRawScript(JavascriptEvalUtil.java:95)
... 74 more

+ There are errors evaluating script "while(count < ntoNcrList.size())
{
row["email"] = ntoNcrList.get(count).getNeoEmail();
row["userid"] = ntoNcrList.get(count).getNeoNtouserid();
row["rptType"] = ntoNcrList.get(count).getNelRptType();

count++;
return true;
}

return false;":
Fail to execute script in function __bm_FETCH(). Source:
------
" + while(count < ntoNcrList.size())
{
row["email"] = ntoNcrList.get(count).getNeoEmail();
row["userid"] = ntoNcrList.get(count).getNeoNtouserid();
row["rptType"] = ntoNcrList.get(count).getNelRptType();

count++;
return true;
}

return false; + "
-----
A BIRT exception occurred. See next exception for more information.
Error evaluating Javascript expression. Script engine error: ReferenceError: "ntoNcrList" is not defined. (/report/data-sets/script-data-set[@id="8"]/method[@name="fetch"]#1)
Script source: /report/data-sets/script-data-set[@id="8"]/method[@name="fetch"], line: 0, text:
__bm_FETCH(). (Element ID:1)
Error.ScriptEvaluationError ( 1 time(s) )
detail : org.eclipse.birt.report.engine.api.EngineException: There are errors evaluating script "while(count < ntoNcrList.size())
{
row["email"] = ntoNcrList.get(count).getNeoEmail();
row["userid"] = ntoNcrList.get(count).getNeoNtouserid();
row["rptType"] = ntoNcrList.get(count).getNelRptType();

count++;
return true;
}

return false;":
Fail to execute script in function __bm_FETCH(). Source:
------
" + while(count < ntoNcrList.size())
{
row["email"] = ntoNcrList.get(count).getNeoEmail();
row["userid"] = ntoNcrList.get(count).getNeoNtouserid();
row["rptType"] = ntoNcrList.get(count).getNelRptType();

count++;
return true;
}

return false; + "
-----
A BIRT exception occurred. See next exception for more information.
Error evaluating Javascript expression. Script engine error: ReferenceError: "ntoNcrList" is not defined. (/report/data-sets/script-data-set[@id="8"]/method[@name="fetch"]#1)
Script source: /report/data-sets/script-data-set[@id="8"]/method[@name="fetch"], line: 0, text:
__bm_FETCH(). (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.handleFetch(ScriptDataSetScriptExecutor.java:143)
at org.eclipse.birt.data.engine.impl.ScriptDataSetRuntime.fetch(ScriptDataSetRuntime.java:103)
at org.eclipse.birt.data.engine.impl.PreparedScriptDSQuery$ScriptDSQueryExecutor$CustomDataSet.fetch(PreparedScriptDSQuery.java:260)
at org.eclipse.birt.data.engine.executor.cache.OdiAdapter.fetch(OdiAdapter.java:226)
at org.eclipse.birt.data.engine.executor.cache.RowResultSet.doNext(RowResultSet.java:113)
at org.eclipse.birt.data.engine.executor.cache.RowResultSet.next(RowResultSet.java:91)
at org.eclipse.birt.data.engine.executor.cache.ExpandableRowResultSet.next(ExpandableRowResultSet.java:63)
at org.eclipse.birt.data.engine.executor.cache.SmartCacheHelper.populateData(SmartCacheHelper.java:316)
at org.eclipse.birt.data.engine.executor.cache.SmartCacheHelper.initInstance(SmartCacheHelper.java:285)
at org.eclipse.birt.data.engine.executor.cache.SmartCacheHelper.getResultSetCache(SmartCacheHelper.java:246)
at org.eclipse.birt.data.engine.executor.cache.SmartCache.<init>(SmartCache.java:73)
at org.eclipse.birt.data.engine.executor.transform.pass.PassUtil.populateOdiResultSet(PassUtil.java:110)
at org.eclipse.birt.data.engine.executor.transform.pass.PassUtil.pass(PassUtil.java:62)
at org.eclipse.birt.data.engine.executor.transform.pass.PassManager.doSinglePass(PassManager.java:170)
at org.eclipse.birt.data.engine.executor.transform.pass.PassManager.prepareDataSetResultSet(PassManager.java:94)
at org.eclipse.birt.data.engine.executor.transform.pass.PassManager.pass(PassManager.java:134)
at org.eclipse.birt.data.engine.executor.transform.pass.PassManager.populateResultSet(PassManager.java:74)
at org.eclipse.birt.data.engine.executor.transform.ResultSetPopulator.populateResultSet(ResultSetPopulator.java:198)
at org.eclipse.birt.data.engine.executor.transform.CachedResultSet.<init>(CachedResultSet.java:195)
at org.eclipse.birt.data.engine.executor.CandidateQuery.execute(CandidateQuery.java:154)
at org.eclipse.birt.data.engine.impl.PreparedScriptDSQuery$ScriptDSQueryExecutor.executeOdiQuery(PreparedScriptDSQuery.java:226)
at org.eclipse.birt.data.engine.impl.QueryExecutor.execute(QueryExecutor.java:1134)
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.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.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.api.impl.RunAndRenderTask.doRun(RunAndRenderTask.java:180)
at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.run(RunAndRenderTask.java:77)
at org.eclipse.birt.report.service.ReportEngineService.runAndRenderReport(ReportEngineService.java:929)
at org.eclipse.birt.report.service.BirtViewerReportService.runAndRenderReport(BirtViewerReportService.java:973)
at org.eclipse.birt.report.service.actionhandler.BirtGetPageAllActionHandler.__execute(BirtGetPageAllActionHandler.java:131)
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.handleGetPageAll(BirtDocumentProcessor.java:183)
at sun.reflect.GeneratedMethodAccessor34.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.GeneratedMethodAccessor33.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:727)
at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
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:126)
at org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:60)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.eclipse.equinox.http.jetty.internal.HttpServerManager$InternalHttpServiceServlet.service(HttpServerManager.java:317)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:390)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:326)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:939)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:756)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
Caused by: org.eclipse.birt.data.engine.core.DataException: Fail to execute script in function __bm_FETCH(). Source:
------
" + while(count < ntoNcrList.size())
{
row["email"] = ntoNcrList.get(count).getNeoEmail();
row["userid"] = ntoNcrList.get(count).getNeoNtouserid();
row["rptType"] = ntoNcrList.get(count).getNelRptType();

count++;
return true;
}

return false; + "
-----
A BIRT exception occurred. See next exception for more information.
Error evaluating Javascript expression. Script engine error: ReferenceError: "ntoNcrList" is not defined. (/report/data-sets/script-data-set[@id="8"]/method[@name="fetch"]#1)
Script source: /report/data-sets/script-data-set[@id="8"]/method[@name="fetch"], line: 0, text:
__bm_FETCH()
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: "ntoNcrList" is not defined. (/report/data-sets/script-data-set[@id="8"]/method[@name="fetch"]#1)
Script source: /report/data-sets/script-data-set[@id="8"]/method[@name="fetch"], line: 0, text:
__bm_FETCH()
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: "ntoNcrList" is not defined. (/report/data-sets/script-data-set[@id="8"]/method[@name="fetch"]#1)
Script source: /report/data-sets/script-data-set[@id="8"]/method[@name="fetch"], line: 0, text:
__bm_FETCH()
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: "ntoNcrList" is not defined. (/report/data-sets/script-data-set[@id="8"]/method[@name="fetch"]#1)
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.gen.c20._c1(/report/data-sets/script-data-set[@id="8"]/method[@name="fetch"]:1)
at org.mozilla.javascript.gen.c20.call(/report/data-sets/script-data-set[@id="8"]/method[@name="fetch"])
at org.mozilla.javascript.optimizer.OptRuntime.callName0(OptRuntime.java:108)
at org.mozilla.javascript.gen.c10._c0(/report/data-sets/script-data-set[@id="8"]/method[@name="fetch"]:0)
at org.mozilla.javascript.gen.c10.call(/report/data-sets/script-data-set[@id="8"]/method[@name="fetch"])
at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:398)
at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3065)
at org.mozilla.javascript.gen.c10.call(/report/data-sets/script-data-set[@id="8"]/method[@name="fetch"])
at org.mozilla.javascript.gen.c10.exec(/report/data-sets/script-data-set[@id="8"]/method[@name="fetch"])
at org.eclipse.birt.core.script.JavascriptEvalUtil.evaluateRawScript(JavascriptEvalUtil.java:95)
... 91 more

+ Data Set script method "Fetch" returned null; expected a Boolean value. (Element ID:1)
data.engine.BadFetchScriptReturnType ( 1 time(s) )
detail : org.eclipse.birt.report.engine.api.EngineException: Data Set script method "Fetch" returned null; expected a Boolean value. (Element ID:1)
at org.eclipse.birt.report.engine.script.internal.ScriptExecutor.addException(ScriptExecutor.java:244)
at org.eclipse.birt.report.engine.script.internal.ScriptExecutor.addException(ScriptExecutor.java:233)
at org.eclipse.birt.report.engine.script.internal.ScriptDataSetScriptExecutor.handleFetch(ScriptDataSetScriptExecutor.java:165)
at org.eclipse.birt.data.engine.impl.ScriptDataSetRuntime.fetch(ScriptDataSetRuntime.java:103)
at org.eclipse.birt.data.engine.impl.PreparedScriptDSQuery$ScriptDSQueryExecutor$CustomDataSet.fetch(PreparedScriptDSQuery.java:260)
at org.eclipse.birt.data.engine.executor.cache.OdiAdapter.fetch(OdiAdapter.java:226)
at org.eclipse.birt.data.engine.executor.cache.RowResultSet.doNext(RowResultSet.java:113)
at org.eclipse.birt.data.engine.executor.cache.RowResultSet.next(RowResultSet.java:91)
at org.eclipse.birt.data.engine.executor.cache.ExpandableRowResultSet.next(ExpandableRowResultSet.java:63)
at org.eclipse.birt.data.engine.executor.cache.SmartCacheHelper.populateData(SmartCacheHelper.java:316)
at org.eclipse.birt.data.engine.executor.cache.SmartCacheHelper.initInstance(SmartCacheHelper.java:285)
at org.eclipse.birt.data.engine.executor.cache.SmartCacheHelper.getResultSetCache(SmartCacheHelper.java:246)
at org.eclipse.birt.data.engine.executor.cache.SmartCache.<init>(SmartCache.java:73)
at org.eclipse.birt.data.engine.executor.transform.pass.PassUtil.populateOdiResultSet(PassUtil.java:110)
at org.eclipse.birt.data.engine.executor.transform.pass.PassUtil.pass(PassUtil.java:62)
at org.eclipse.birt.data.engine.executor.transform.pass.PassManager.doSinglePass(PassManager.java:170)
at org.eclipse.birt.data.engine.executor.transform.pass.PassManager.prepareDataSetResultSet(PassManager.java:94)
at org.eclipse.birt.data.engine.executor.transform.pass.PassManager.pass(PassManager.java:134)
at org.eclipse.birt.data.engine.executor.transform.pass.PassManager.populateResultSet(PassManager.java:74)
at org.eclipse.birt.data.engine.executor.transform.ResultSetPopulator.populateResultSet(ResultSetPopulator.java:198)
at org.eclipse.birt.data.engine.executor.transform.CachedResultSet.<init>(CachedResultSet.java:195)
at org.eclipse.birt.data.engine.executor.CandidateQuery.execute(CandidateQuery.java:154)
at org.eclipse.birt.data.engine.impl.PreparedScriptDSQuery$ScriptDSQueryExecutor.executeOdiQuery(PreparedScriptDSQuery.java:226)
at org.eclipse.birt.data.engine.impl.QueryExecutor.execute(QueryExecutor.java:1134)
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.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.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.api.impl.RunAndRenderTask.doRun(RunAndRenderTask.java:180)
at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.run(RunAndRenderTask.java:77)
at org.eclipse.birt.report.service.ReportEngineService.runAndRenderReport(ReportEngineService.java:929)
at org.eclipse.birt.report.service.BirtViewerReportService.runAndRenderReport(BirtViewerReportService.java:973)
at org.eclipse.birt.report.service.actionhandler.BirtGetPageAllActionHandler.__execute(BirtGetPageAllActionHandler.java:131)
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.handleGetPageAll(BirtDocumentProcessor.java:183)
at sun.reflect.GeneratedMethodAccessor34.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.GeneratedMethodAccessor33.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:727)
at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
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:126)
at org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:60)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.eclipse.equinox.http.jetty.internal.HttpServerManager$InternalHttpServiceServlet.service(HttpServerManager.java:317)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:390)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:326)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:939)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:756)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
Caused by: org.eclipse.birt.data.engine.core.DataException: Data Set script method "Fetch" returned null; expected a Boolean value.
at org.eclipse.birt.report.engine.script.internal.ScriptDataSetScriptExecutor.handleFetch(ScriptDataSetScriptExecutor.java:153)
... 85 more



Is below the problem? If so how do I get around this?
A BIRT exception occurred. See next exception for more information.
Error evaluating Javascript expression. Script engine error: TypeError: [JavaPackage birtjava.tdcj.ProdDb2Test] is not a function, it is object. (/report/data-sets/script-data-set[@id="8"]/method[@name="open"]#5)

Thanks for your help.
Re: Problem with Script Datasource [message #891994 is a reply to message #891916] Tue, 26 June 2012 15:11 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason Weathersby
Messages: 9167
Registered: July 2009
Senior Member

Carlos

Where did you put the jar?

Also change:

prodDb2Test = new Packages.birtjava.tdcj.ProdDb2Test();

to

importPackage(Packages.birtjava.tdcj);
prodDb2Test = new ProdDb2Test();


Jason

On 6/26/2012 10:46 AM, Carlos Ferrer wrote:
> On BIRT version 3.7.2
> I have encountered an issue when doing a data script birt report(My
> first one). I compiled and jarred the classes successfully. I verified
> that I have the most current version of the jar.
> I created the following for open():
> importPackage(Packages.birtjava.tdcj.ProdDb2Test);
>
> count = 0;
>
> prodDb2Test = new Packages.birtjava.tdcj.ProdDb2Test();
>
> ntoNcrList = prodDb2Test.build();
> fetch():
> while(count < ntoNcrList.size())
> {
> row["email"] = ntoNcrList.get(count).getNeoEmail();
> row["userid"] = ntoNcrList.get(count).getNeoNtouserid();
> row["rptType"] = ntoNcrList.get(count).getNelRptType();
>
> count++;
> return true;
> }
>
> return false;
>
> Additional information: Per other programmers here, I placed the jar
> file in the same location as the .rptdesign file.
>
> When I did a Preview I encountered the following error:
> The following items have errors:
>
> ReportDesign (id = 1): + There are errors evaluating script
> "importPackage(Packages.birtjava.tdcj.ProdDb2Test);
>
> count = 0;
>
> prodDb2Test = new Packages.birtjava.tdcj.ProdDb2Test();
>
> ntoNcrList = prodDb2Test.build();
> ":
> Fail to execute script in function __bm_OPEN(). Source:
> ------
> " + importPackage(Packages.birtjava.tdcj.ProdDb2Test);
>
> count = 0;
>
> prodDb2Test = new Packages.birtjava.tdcj.ProdDb2Test();
>
> ntoNcrList = prodDb2Test.build();
> + "
> -----
> A BIRT exception occurred. See next exception for more information.
> Error evaluating Javascript expression. Script engine error: TypeError:
> [JavaPackage birtjava.tdcj.ProdDb2Test] is not a function, it is object.
> (/report/data-sets/script-data-set[@id="8"]/method[@name="open"]#5)
> Script source:
> /report/data-sets/script-data-set[@id="8"]/method[@name="open"], line:
> 0, text:
> __bm_OPEN(). (Element ID:1) Error.ScriptEvaluationError ( 1 time(s) )
> detail : org.eclipse.birt.report.engine.api.EngineException: There are
> errors evaluating script
> "importPackage(Packages.birtjava.tdcj.ProdDb2Test);
>
> count = 0;
>
> prodDb2Test = new Packages.birtjava.tdcj.ProdDb2Test();
>
> ntoNcrList = prodDb2Test.build();
> ":
> Fail to execute script in function __bm_OPEN(). Source:
> ------
> " + importPackage(Packages.birtjava.tdcj.ProdDb2Test);
>
> count = 0;
>
> prodDb2Test = new Packages.birtjava.tdcj.ProdDb2Test();
>
> ntoNcrList = prodDb2Test.build();
> + "
> -----
> A BIRT exception occurred. See next exception for more information.
> Error evaluating Javascript expression. Script engine error: TypeError:
> [JavaPackage birtjava.tdcj.ProdDb2Test] is not a function, it is object.
> (/report/data-sets/script-data-set[@id="8"]/method[@name="open"]#5)
> Script source:
> /report/data-sets/script-data-set[@id="8"]/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:1134)
>
> 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.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.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.api.impl.RunAndRenderTask.doRun(RunAndRenderTask.java:180)
>
> at
> org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.run(RunAndRenderTask.java:77)
>
> at
> org.eclipse.birt.report.service.ReportEngineService.runAndRenderReport(ReportEngineService.java:929)
>
> at
> org.eclipse.birt.report.service.BirtViewerReportService.runAndRenderReport(BirtViewerReportService.java:973)
>
> at
> org.eclipse.birt.report.service.actionhandler.BirtGetPageAllActionHandler.__execute(BirtGetPageAllActionHandler.java:131)
>
> 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.handleGetPageAll(BirtDocumentProcessor.java:183)
>
> at sun.reflect.GeneratedMethodAccessor34.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.GeneratedMethodAccessor33.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:727)
> at
> org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)
>
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
> 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:126)
>
> at
> org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:60)
>
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
> at
> org.eclipse.equinox.http.jetty.internal.HttpServerManager$InternalHttpServiceServlet.service(HttpServerManager.java:317)
>
> at
> org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
> at
> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:390)
> at
> org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
> at
> org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
> at
> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
> at org.mortbay.jetty.Server.handle(Server.java:326)
> at
> org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
> at
> org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:939)
>
> at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:756)
> at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
> at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
> at
> org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
>
> at
> org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
>
> Caused by: org.eclipse.birt.data.engine.core.DataException: Fail to
> execute script in function __bm_OPEN(). Source:
> ------
> " + importPackage(Packages.birtjava.tdcj.ProdDb2Test);
>
> count = 0;
>
> prodDb2Test = new Packages.birtjava.tdcj.ProdDb2Test();
>
> ntoNcrList = prodDb2Test.build();
> + "
> -----
> A BIRT exception occurred. See next exception for more information.
> Error evaluating Javascript expression. Script engine error: TypeError:
> [JavaPackage birtjava.tdcj.ProdDb2Test] is not a function, it is object.
> (/report/data-sets/script-data-set[@id="8"]/method[@name="open"]#5)
> Script source:
> /report/data-sets/script-data-set[@id="8"]/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)
>
> ... 70 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: TypeError:
> [JavaPackage birtjava.tdcj.ProdDb2Test] is not a function, it is object.
> (/report/data-sets/script-data-set[@id="8"]/method[@name="open"]#5)
> Script source:
> /report/data-sets/script-data-set[@id="8"]/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)
>
> ... 71 more
> Caused by: org.eclipse.birt.core.exception.CoreException: Error
> evaluating Javascript expression. Script engine error: TypeError:
> [JavaPackage birtjava.tdcj.ProdDb2Test] is not a function, it is object.
> (/report/data-sets/script-data-set[@id="8"]/method[@name="open"]#5)
> Script source:
> /report/data-sets/script-data-set[@id="8"]/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)
>
> ... 72 more
> Caused by: org.mozilla.javascript.EcmaError: TypeError: [JavaPackage
> birtjava.tdcj.ProdDb2Test] is not a function, it is object.
> (/report/data-sets/script-data-set[@id="8"]/method[@name="open"]#5)
> at
> org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3654)
>
> at
> org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3632)
>
> at
> org.mozilla.javascript.ScriptRuntime.typeError(ScriptRuntime.java:3660)
> at
> org.mozilla.javascript.ScriptRuntime.typeError2(ScriptRuntime.java:3679)
> at
> org.mozilla.javascript.ScriptRuntime.notFunctionError(ScriptRuntime.java:3734)
>
> at
> org.mozilla.javascript.ScriptRuntime.notFunctionError(ScriptRuntime.java:3722)
>
> at
> org.mozilla.javascript.ScriptRuntime.newObject(ScriptRuntime.java:2324)
> at
> org.mozilla.javascript.gen.c30._c1(/report/data-sets/script-data-set[@id="8"]/method[@name="open"]:5)
>
> at
> org.mozilla.javascript.gen.c30.call(/report/data-sets/script-data-set[@id="8"]/method[@name="open"])
>
> at
> org.mozilla.javascript.optimizer.OptRuntime.callName0(OptRuntime.java:108)
> at
> org.mozilla.javascript.gen.c8._c0(/report/data-sets/script-data-set[@id="8"]/method[@name="open"]:0)
>
> at
> org.mozilla.javascript.gen.c8.call(/report/data-sets/script-data-set[@id="8"]/method[@name="open"])
>
> at
> org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:398)
> at
> org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3065)
> at
> org.mozilla.javascript.gen.c8.call(/report/data-sets/script-data-set[@id="8"]/method[@name="open"])
>
> at
> org.mozilla.javascript.gen.c8.exec(/report/data-sets/script-data-set[@id="8"]/method[@name="open"])
>
> at
> org.eclipse.birt.core.script.JavascriptEvalUtil.evaluateRawScript(JavascriptEvalUtil.java:95)
>
> ... 74 more
>
> + There are errors evaluating script "while(count <
> ntoNcrList.size())
> {
> row["email"] = ntoNcrList.get(count).getNeoEmail();
> row["userid"] = ntoNcrList.get(count).getNeoNtouserid();
> row["rptType"] = ntoNcrList.get(count).getNelRptType();
>
> count++;
> return true;
> }
>
> return false;":
> Fail to execute script in function __bm_FETCH(). Source:
> ------
> " + while(count < ntoNcrList.size())
> {
> row["email"] = ntoNcrList.get(count).getNeoEmail();
> row["userid"] = ntoNcrList.get(count).getNeoNtouserid();
> row["rptType"] = ntoNcrList.get(count).getNelRptType();
>
> count++;
> return true;
> }
>
> return false; + "
> -----
> A BIRT exception occurred. See next exception for more information.
> Error evaluating Javascript expression. Script engine error:
> ReferenceError: "ntoNcrList" is not defined.
> (/report/data-sets/script-data-set[@id="8"]/method[@name="fetch"]#1)
> Script source:
> /report/data-sets/script-data-set[@id="8"]/method[@name="fetch"], line:
> 0, text:
> __bm_FETCH(). (Element ID:1) Error.ScriptEvaluationError ( 1 time(s) )
> detail : org.eclipse.birt.report.engine.api.EngineException: There are
> errors evaluating script "while(count < ntoNcrList.size())
> {
> row["email"] = ntoNcrList.get(count).getNeoEmail();
> row["userid"] = ntoNcrList.get(count).getNeoNtouserid();
> row["rptType"] = ntoNcrList.get(count).getNelRptType();
>
> count++;
> return true;
> }
>
> return false;":
> Fail to execute script in function __bm_FETCH(). Source:
> ------
> " + while(count < ntoNcrList.size())
> {
> row["email"] = ntoNcrList.get(count).getNeoEmail();
> row["userid"] = ntoNcrList.get(count).getNeoNtouserid();
> row["rptType"] = ntoNcrList.get(count).getNelRptType();
>
> count++;
> return true;
> }
>
> return false; + "
> -----
> A BIRT exception occurred. See next exception for more information.
> Error evaluating Javascript expression. Script engine error:
> ReferenceError: "ntoNcrList" is not defined.
> (/report/data-sets/script-data-set[@id="8"]/method[@name="fetch"]#1)
> Script source:
> /report/data-sets/script-data-set[@id="8"]/method[@name="fetch"], line:
> 0, text:
> __bm_FETCH(). (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.handleFetch(ScriptDataSetScriptExecutor.java:143)
>
> at
> org.eclipse.birt.data.engine.impl.ScriptDataSetRuntime.fetch(ScriptDataSetRuntime.java:103)
>
> at
> org.eclipse.birt.data.engine.impl.PreparedScriptDSQuery$ScriptDSQueryExecutor$CustomDataSet.fetch(PreparedScriptDSQuery.java:260)
>
> at
> org.eclipse.birt.data.engine.executor.cache.OdiAdapter.fetch(OdiAdapter.java:226)
>
> at
> org.eclipse.birt.data.engine.executor.cache.RowResultSet.doNext(RowResultSet.java:113)
>
> at
> org.eclipse.birt.data.engine.executor.cache.RowResultSet.next(RowResultSet.java:91)
>
> at
> org.eclipse.birt.data.engine.executor.cache.ExpandableRowResultSet.next(ExpandableRowResultSet.java:63)
>
> at
> org.eclipse.birt.data.engine.executor.cache.SmartCacheHelper.populateData(SmartCacheHelper.java:316)
>
> at
> org.eclipse.birt.data.engine.executor.cache.SmartCacheHelper.initInstance(SmartCacheHelper.java:285)
>
> at
> org.eclipse.birt.data.engine.executor.cache.SmartCacheHelper.getResultSetCache(SmartCacheHelper.java:246)
>
> at
> org.eclipse.birt.data.engine.executor.cache.SmartCache.<init>(SmartCache.java:73)
>
> at
> org.eclipse.birt.data.engine.executor.transform.pass.PassUtil.populateOdiResultSet(PassUtil.java:110)
>
> at
> org.eclipse.birt.data.engine.executor.transform.pass.PassUtil.pass(PassUtil.java:62)
>
> at
> org.eclipse.birt.data.engine.executor.transform.pass.PassManager.doSinglePass(PassManager.java:170)
>
> at
> org.eclipse.birt.data.engine.executor.transform.pass.PassManager.prepareDataSetResultSet(PassManager.java:94)
>
> at
> org.eclipse.birt.data.engine.executor.transform.pass.PassManager.pass(PassManager.java:134)
>
> at
> org.eclipse.birt.data.engine.executor.transform.pass.PassManager.populateResultSet(PassManager.java:74)
>
> at
> org.eclipse.birt.data.engine.executor.transform.ResultSetPopulator.populateResultSet(ResultSetPopulator.java:198)
>
> at
> org.eclipse.birt.data.engine.executor.transform.CachedResultSet.<init>(CachedResultSet.java:195)
>
> at
> org.eclipse.birt.data.engine.executor.CandidateQuery.execute(CandidateQuery.java:154)
>
> at
> org.eclipse.birt.data.engine.impl.PreparedScriptDSQuery$ScriptDSQueryExecutor.executeOdiQuery(PreparedScriptDSQuery.java:226)
>
> at
> org.eclipse.birt.data.engine.impl.QueryExecutor.execute(QueryExecutor.java:1134)
>
> 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.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.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.api.impl.RunAndRenderTask.doRun(RunAndRenderTask.java:180)
>
> at
> org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.run(RunAndRenderTask.java:77)
>
> at
> org.eclipse.birt.report.service.ReportEngineService.runAndRenderReport(ReportEngineService.java:929)
>
> at
> org.eclipse.birt.report.service.BirtViewerReportService.runAndRenderReport(BirtViewerReportService.java:973)
>
> at
> org.eclipse.birt.report.service.actionhandler.BirtGetPageAllActionHandler.__execute(BirtGetPageAllActionHandler.java:131)
>
> 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.handleGetPageAll(BirtDocumentProcessor.java:183)
>
> at sun.reflect.GeneratedMethodAccessor34.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.GeneratedMethodAccessor33.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:727)
> at
> org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)
>
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
> 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:126)
>
> at
> org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:60)
>
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
> at
> org.eclipse.equinox.http.jetty.internal.HttpServerManager$InternalHttpServiceServlet.service(HttpServerManager.java:317)
>
> at
> org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
> at
> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:390)
> at
> org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
> at
> org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
> at
> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
> at org.mortbay.jetty.Server.handle(Server.java:326)
> at
> org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
> at
> org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:939)
>
> at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:756)
> at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
> at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
> at
> org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
>
> at
> org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
>
> Caused by: org.eclipse.birt.data.engine.core.DataException: Fail to
> execute script in function __bm_FETCH(). Source:
> ------
> " + while(count < ntoNcrList.size())
> {
> row["email"] = ntoNcrList.get(count).getNeoEmail();
> row["userid"] = ntoNcrList.get(count).getNeoNtouserid();
> row["rptType"] = ntoNcrList.get(count).getNelRptType();
>
> count++;
> return true;
> }
>
> return false; + "
> -----
> A BIRT exception occurred. See next exception for more information.
> Error evaluating Javascript expression. Script engine error:
> ReferenceError: "ntoNcrList" is not defined.
> (/report/data-sets/script-data-set[@id="8"]/method[@name="fetch"]#1)
> Script source:
> /report/data-sets/script-data-set[@id="8"]/method[@name="fetch"], line:
> 0, text:
> __bm_FETCH()
> 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: "ntoNcrList" is not defined.
> (/report/data-sets/script-data-set[@id="8"]/method[@name="fetch"]#1)
> Script source:
> /report/data-sets/script-data-set[@id="8"]/method[@name="fetch"], line:
> 0, text:
> __bm_FETCH()
> 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:
> "ntoNcrList" is not defined.
> (/report/data-sets/script-data-set[@id="8"]/method[@name="fetch"]#1)
> Script source:
> /report/data-sets/script-data-set[@id="8"]/method[@name="fetch"], line:
> 0, text:
> __bm_FETCH()
> 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:
> "ntoNcrList" is not defined.
> (/report/data-sets/script-data-set[@id="8"]/method[@name="fetch"]#1)
> 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.gen.c20._c1(/report/data-sets/script-data-set[@id="8"]/method[@name="fetch"]:1)
>
> at
> org.mozilla.javascript.gen.c20.call(/report/data-sets/script-data-set[@id="8"]/method[@name="fetch"])
>
> at
> org.mozilla.javascript.optimizer.OptRuntime.callName0(OptRuntime.java:108)
> at
> org.mozilla.javascript.gen.c10._c0(/report/data-sets/script-data-set[@id="8"]/method[@name="fetch"]:0)
>
> at
> org.mozilla.javascript.gen.c10.call(/report/data-sets/script-data-set[@id="8"]/method[@name="fetch"])
>
> at
> org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:398)
> at
> org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3065)
> at
> org.mozilla.javascript.gen.c10.call(/report/data-sets/script-data-set[@id="8"]/method[@name="fetch"])
>
> at
> org.mozilla.javascript.gen.c10.exec(/report/data-sets/script-data-set[@id="8"]/method[@name="fetch"])
>
> at
> org.eclipse.birt.core.script.JavascriptEvalUtil.evaluateRawScript(JavascriptEvalUtil.java:95)
>
> ... 91 more
>
> + Data Set script method "Fetch" returned null;
> expected a Boolean value. (Element ID:1)
> data.engine.BadFetchScriptReturnType ( 1 time(s) )
> detail : org.eclipse.birt.report.engine.api.EngineException: Data Set
> script method "Fetch" returned null; expected a Boolean value. (Element
> ID:1)
> at
> org.eclipse.birt.report.engine.script.internal.ScriptExecutor.addException(ScriptExecutor.java:244)
>
> at
> org.eclipse.birt.report.engine.script.internal.ScriptExecutor.addException(ScriptExecutor.java:233)
>
> at
> org.eclipse.birt.report.engine.script.internal.ScriptDataSetScriptExecutor.handleFetch(ScriptDataSetScriptExecutor.java:165)
>
> at
> org.eclipse.birt.data.engine.impl.ScriptDataSetRuntime.fetch(ScriptDataSetRuntime.java:103)
>
> at
> org.eclipse.birt.data.engine.impl.PreparedScriptDSQuery$ScriptDSQueryExecutor$CustomDataSet.fetch(PreparedScriptDSQuery.java:260)
>
> at
> org.eclipse.birt.data.engine.executor.cache.OdiAdapter.fetch(OdiAdapter.java:226)
>
> at
> org.eclipse.birt.data.engine.executor.cache.RowResultSet.doNext(RowResultSet.java:113)
>
> at
> org.eclipse.birt.data.engine.executor.cache.RowResultSet.next(RowResultSet.java:91)
>
> at
> org.eclipse.birt.data.engine.executor.cache.ExpandableRowResultSet.next(ExpandableRowResultSet.java:63)
>
> at
> org.eclipse.birt.data.engine.executor.cache.SmartCacheHelper.populateData(SmartCacheHelper.java:316)
>
> at
> org.eclipse.birt.data.engine.executor.cache.SmartCacheHelper.initInstance(SmartCacheHelper.java:285)
>
> at
> org.eclipse.birt.data.engine.executor.cache.SmartCacheHelper.getResultSetCache(SmartCacheHelper.java:246)
>
> at
> org.eclipse.birt.data.engine.executor.cache.SmartCache.<init>(SmartCache.java:73)
>
> at
> org.eclipse.birt.data.engine.executor.transform.pass.PassUtil.populateOdiResultSet(PassUtil.java:110)
>
> at
> org.eclipse.birt.data.engine.executor.transform.pass.PassUtil.pass(PassUtil.java:62)
>
> at
> org.eclipse.birt.data.engine.executor.transform.pass.PassManager.doSinglePass(PassManager.java:170)
>
> at
> org.eclipse.birt.data.engine.executor.transform.pass.PassManager.prepareDataSetResultSet(PassManager.java:94)
>
> at
> org.eclipse.birt.data.engine.executor.transform.pass.PassManager.pass(PassManager.java:134)
>
> at
> org.eclipse.birt.data.engine.executor.transform.pass.PassManager.populateResultSet(PassManager.java:74)
>
> at
> org.eclipse.birt.data.engine.executor.transform.ResultSetPopulator.populateResultSet(ResultSetPopulator.java:198)
>
> at
> org.eclipse.birt.data.engine.executor.transform.CachedResultSet.<init>(CachedResultSet.java:195)
>
> at
> org.eclipse.birt.data.engine.executor.CandidateQuery.execute(CandidateQuery.java:154)
>
> at
> org.eclipse.birt.data.engine.impl.PreparedScriptDSQuery$ScriptDSQueryExecutor.executeOdiQuery(PreparedScriptDSQuery.java:226)
>
> at
> org.eclipse.birt.data.engine.impl.QueryExecutor.execute(QueryExecutor.java:1134)
>
> 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.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.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.api.impl.RunAndRenderTask.doRun(RunAndRenderTask.java:180)
>
> at
> org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.run(RunAndRenderTask.java:77)
>
> at
> org.eclipse.birt.report.service.ReportEngineService.runAndRenderReport(ReportEngineService.java:929)
>
> at
> org.eclipse.birt.report.service.BirtViewerReportService.runAndRenderReport(BirtViewerReportService.java:973)
>
> at
> org.eclipse.birt.report.service.actionhandler.BirtGetPageAllActionHandler.__execute(BirtGetPageAllActionHandler.java:131)
>
> 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.handleGetPageAll(BirtDocumentProcessor.java:183)
>
> at sun.reflect.GeneratedMethodAccessor34.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.GeneratedMethodAccessor33.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:727)
> at
> org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)
>
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
> 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:126)
>
> at
> org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:60)
>
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
> at
> org.eclipse.equinox.http.jetty.internal.HttpServerManager$InternalHttpServiceServlet.service(HttpServerManager.java:317)
>
> at
> org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
> at
> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:390)
> at
> org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
> at
> org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
> at
> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
> at org.mortbay.jetty.Server.handle(Server.java:326)
> at
> org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
> at
> org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:939)
>
> at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:756)
> at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
> at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
> at
> org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
>
> at
> org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
>
> Caused by: org.eclipse.birt.data.engine.core.DataException: Data Set
> script method "Fetch" returned null; expected a Boolean value.
> at
> org.eclipse.birt.report.engine.script.internal.ScriptDataSetScriptExecutor.handleFetch(ScriptDataSetScriptExecutor.java:153)
>
> ... 85 more
>
>
>
> Is below the problem? If so how do I get around this?
> A BIRT exception occurred. See next exception for more information.
> Error evaluating Javascript expression. Script engine error: TypeError:
> [JavaPackage birtjava.tdcj.ProdDb2Test] is not a function, it is object.
> (/report/data-sets/script-data-set[@id="8"]/method[@name="open"]#5)
>
> Thanks for your help.
>


Jason Weathersby

BIRT Exchange
Re: Problem with Script Datasource [message #892016 is a reply to message #891994] Tue, 26 June 2012 16:26 Go to previous messageGo to next message
Carlos Ferrer is currently offline Carlos Ferrer
Messages: 18
Registered: July 2009
Junior Member
Jason,

I placed the jar per another programmer in the same place as the .rptdesign that I created. Is there a better place to put it? Thanks.
Re: Problem with Script Datasource [message #892045 is a reply to message #892016] Tue, 26 June 2012 20:33 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason Weathersby
Messages: 9167
Registered: July 2009
Senior Member

Carlos

Take a look at this post:
http://birtworld.blogspot.com/2009/12/birt-designer-classpath-changes.html
you can put the jar in the resource folder and add it to the report
using the resources entry in the properties view for the report or use
an approach listed in the post above.

Jason

On 6/26/2012 4:26 PM, Carlos Ferrer wrote:
> Jason,
>
> I placed the jar per another programmer in the same place as the
> .rptdesign that I created. Is there a better place to put it? Thanks.


Jason Weathersby

BIRT Exchange
Re: Problem with Script Datasource [message #892262 is a reply to message #892045] Wed, 27 June 2012 10:14 Go to previous message
Carlos Ferrer is currently offline Carlos Ferrer
Messages: 18
Registered: July 2009
Junior Member
Jason,

Thanks for all your help. Everything is hooked up and working.
Previous Topic:Performance of Birt
Next Topic:Problem with creating radar chart
Goto Forum:
  


Current Time: Sun Apr 20 19:52:12 EDT 2014

Powered by FUDForum. Page generated in 0.02999 seconds