Home
Analytics
"row" is not defined
chris_rss
I have inherited our birt reports.
I think many of my inital issues were because i downloaded the latest birt plugins for eclipse.
Ultimately i have tried updating everything to the latest i can find.
Birt works in preview, but not when i run it on tomcat.
My guess is that i have missed a reference to the scripts birt needs.
could you please guide me in a direction of where this issue might be comming from.
Thanks for any help,
chris
Here is the error i am getting:
Nov 6, 2009 11:37:42 AM org.eclipse.birt.report.engine.api.impl.RunAndRenderTask doRun
SEVERE: An error happened while running the report. Cause:
org.mozilla.javascript.EcmaError: ReferenceError: "row" is not defined. (<inline>#1)
at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3350)
at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3340)
at org.mozilla.javascript.ScriptRuntime.notFoundError(ScriptRuntime.java:3413)
at org.mozilla.javascript.ScriptRuntime.nameOrFunction(ScriptRuntime.java:1678)
at org.mozilla.javascript.ScriptRuntime.name(ScriptRuntime.java:1617)
at org.mozilla.javascript.gen.c4._c0(<inline>:1)
at org.mozilla.javascript.gen.c4.call(<inline>)
Find more posts tagged with
Comments
JasonW
In tomcat are you using the ReportEngine API or the BIRT Viewer?
If you are using the RE API verify that you have all the libs from the runtime/ReportEngine/lib directory in your webapp classpath.
If you are using the viewer what JDK are you using?
Jason
newBeeHere
Hey...was this problem resolved? i am running into this issue too.What is interesting is that I get the report properly with one database but not with another(same schema located in a different machine)!. Also preview doesn't show any error :-(
JasonW
Is it the same db type? Is it the same Birt Viewer instance?
Jason
amatta
Hi, I think I'm having the same problem described in this thread. I'm using BIRT 2.5.1.
My report runs correctly on my machine (Arch Linux 64-bit, kernel 2.6.31) against a remote MySQL database (5.1.37, 64-bit) and against a remote MS SQL Server (2005, 32-bit) database. It also runs on some other Linux (Ubuntu 64-bit 8.04 and newer) machines running various MySQL 5 databases. On these machines, it works using the RE API as well as the BIRT viewer.
However, when I try to run it on a machine with Windows Server 2003 64-bit against a MySQL 5.1.22 database hosted on another Windows Server 2003 64-bit system, I get pretty much the same error as chriss_rss when running using the RE API, JDK 6u17. If I try to run it in the BIRT viewer (tried on Apache Tomcat 6.0.20, and on Glassfish 2.1 b60e) I get a different error. I also tried using two other JDKs - an older JDK6 and a JDK 5.
I have tried to set up the non-functioning machine with as similar an environment to the working machines as possible. The main difference so far is that the broken one is the one machine where the report engine itself runs on a Windows box (although as I said before I did have a Linux-based report engine run against a Windows MS SQL db). I'm pretty baffled by this one, and would appreciate any insight. Thanks!
-Andrew
Errors:
RE API:
=============================================
SEVERE: An error happened while running the report. Cause:
org.mozilla.javascript.EcmaError: ReferenceError: "row" is not defined. (<inline>#1)
at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3557)
at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3535)
at org.mozilla.javascript.ScriptRuntime.notFoundError(ScriptRuntime.java:3620)
at org.mozilla.javascript.ScriptRuntime.nameOrFunction(ScriptRuntime.java:1718)
at org.mozilla.javascript.ScriptRuntime.name(ScriptRuntime.java:1657)
at org.mozilla.javascript.gen.c13._c0(<inline>:1)
at org.mozilla.javascript.gen.c13.call(<inline>)
at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:401)
at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3003)
at org.mozilla.javascript.gen.c13.call(<inline>)
at org.mozilla.javascript.gen.c13.exec(<inline>)
at org.eclipse.birt.report.engine.javascript.JavascriptEngine.evaluate(JavascriptEngine.java:256)
at org.eclipse.birt.core.script.ScriptContext.evaluate(ScriptContext.java:152)
at org.eclipse.birt.report.engine.executor.ExecutionContext.evaluate(ExecutionContext.java:706)
at org.eclipse.birt.report.engine.executor.ExecutionContext.evaluate(ExecutionContext.java:637)
at org.eclipse.birt.report.engine.executor.ReportItemExecutor.evaluateBoolean(ReportItemExecutor.java:309)
at org.eclipse.birt.report.engine.executor.ReportItemExecutor.processVisibility(ReportItemExecutor.java:470)
at org.eclipse.birt.report.engine.executor.TableItemExecutor.execute(TableItemExecutor.java:66)
at ....
BIRT Viewer:
=============================================
Caused by: org.mozilla.javascript.EvaluatorException: Invalid field name: pcheckId.
at org.mozilla.javascript.DefaultErrorReporter.runtimeError(DefaultErrorReporter.java:109)
at org.mozilla.javascript.Context.reportRuntimeError(Context.java:922)
at org.mozilla.javascript.Context.reportRuntimeError(Context.java:978)
at org.eclipse.birt.data.engine.script.JSResultSetRow.get(JSResultSetRow.java:173)
at org.mozilla.javascript.ScriptableObject.getProperty(ScriptableObject.java:1575)
at org.mozilla.javascript.ScriptRuntime.getObjectElem(ScriptRuntime.java:1363)
at org.mozilla.javascript.ScriptRuntime.getObjectElem(ScriptRuntime.java:1345)
at org.mozilla.javascript.gen.c28._c0(unnamed script:0)
at org.mozilla.javascript.gen.c28.call(unnamed script)
at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:401)
at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3003)
at org.mozilla.javascript.gen.c28.call(unnamed script)
at org.mozilla.javascript.gen.c28.exec(unnamed script)
at org.eclipse.birt.report.engine.javascript.JavascriptEngine.evaluate(JavascriptEngine.java:256)
at org.eclipse.birt.core.script.ScriptContext.evaluate(ScriptContext.java:152)
at org.eclipse.birt.data.engine.script.ScriptEvalUtil.evalExpr(ScriptEvalUtil.java:678)
at org.eclipse.birt.data.engine.impl.ComputedColumnHelperInstance.process(ComputedColumnHelper.java:412)
at org.eclipse.birt.data.engine.impl.ComputedColumnHelper.process(ComputedColumnHelper.java:119)
at ....
JasonW
Can you try to use the sample report? Does it give you the same errors? Did any of your test machines happen to have openJDK?
Jason
amatta
The test report which is built in to the birt viewer worked properly on the target machine (the one having the problem). I'm fairly certain that all the machines I tried it on were using offical Sun JDKs, and I know the target machine is using a Sun JDK. I wonder if there's something not working right with that particular version of MySQL. I tried installing the latest versions of Tomcat and MySQL on a Windows Server 2008 test box and the report ran fine using the same JDBC driver and a Java 6u7 vm. I'm thinking of trying to update the MySQL on the target machine, but it's a production system so I might need to wait a while. Thanks for your reponse.
JasonW
You may also want to try and use different versions of the mysql driver.
amatta
The problem is likely caused by the fact that the sql statement is selecting from a view. I made a simple report that selects the ID and one varchar field from a table in our database, copied this file, and made the copy do the same thing from one of our views. The table select succeeded but the view select failed with the invalid field name error. I am able to run the same SQL query from within the SQuirreL SQL program (java-based query tool) using the same JDBC driver I'd used for BIRT, and the output data and column names look the same on the target machine as they do on the other boxes I've tested on. I have previously tried with two other versions of the MySQL JDBC connector to no avail (5.0.5, 5.0.8) and am mainly using 5.1.10. I wonder if the particular version of MySQL is returning the results in a slightly different way to the JDBC driver. I'll keep playing with it. Thanks.
amatta
It looks like the problem had something to do with views in the 5.1.22 MySQL release. Pointing at a newly-installed 5.1.41 server fixed the problem. Thanks for the suggestions.