title: BIRT Scripted Report not working: Getting 'Invalid javascript expression' Exception
body: <p>We are running Eclipse BIRT embedded in our Web application and it worked perfect so far. We are heavily using Reports with Script-Datasources. Sometimes we use Javascript, nowadays we try to write Datasource providers directly in Java.</p>
  
  <p>I currently have a blocker issue, where I am running out of ideas, what the origin of problem could be.</p>
  
  <p>I am getting this exception:</p>
  
  <blockquote>
    <p>Invalid javascript expression: row["Name"]
    org.eclipse.birt.report.data.adapter.api.AdapterException: An exception occurred during processing. Please see the following message for details:
    A BIRT exception occurred. See next exception for more information.
    Invalid javascript expression: row["Name"]
        at org.eclipse.birt.report.data.adapter.impl.DataRequestSessionImpl.prepare(DataRequestSessionImpl.java:677)
        at org.eclipse.birt.report.engine.data.dte.AbstractDataEngine.doPrepareQuery(AbstractDataEngine.java:218)
        at org.eclipse.birt.report.engine.data.dte.DteDataEngine.doPrepareQuery(DteDataEngine.java:273)
        at org.eclipse.birt.report.engine.data.dte.AbstractDataEngine.prepare(AbstractDataEngine.java:183)
        at org.eclipse.birt.report.engine.executor.ReportExecutor.execute(ReportExecutor.java:122)
    at org.eclipse.birt.report.engine.internal.executor.wrap.WrappedReportExecutor.execute(WrappedReportExecutor.java:60)
    ...</p>
    
    <p>Caused by: org.eclipse.birt.core.exception.CoreException: Invalid javascript expression: row["Name"]
        at org.eclipse.birt.core.data.ExpressionParserUtility.compileColumnExpression(ExpressionParserUtility.java:85)
        at org.eclipse.birt.core.data.ExpressionUtil.extractColumnExpressions(ExpressionUtil.java:282)
        at org.eclipse.birt.data.engine.expression.ExpressionCompilerUtil.populateColumnList(ExpressionCompilerUtil.java:499)
        at org.eclipse.birt.data.engine.expression.ExpressionCompilerUtil.extractColumnExpression(ExpressionCompilerUtil.java:116)
        at org.eclipse.birt.data.engine.expression.ExpressionCompilerUtil.extractColumnExpression(ExpressionCompilerUtil.java:89)</p>
  </blockquote>
  
  <p>The weird thing is:</p>
  
  <ul>
  <li>the report definition used (.rptdesign) worked on all setups/installations in a prior version of our webapp.</li>
  <li>it also works on <em>SOME</em> computers with the current version of our webapp.</li>
  <li>it works on development machines. (with eclipse/jetty setup)</li>
  </ul>
  
  <p>But it does not work on one particular machine, with this setup:</p>
  
  <ul>
  <li>Windows XP 32bit (virtual)</li>
  <li>Tomcat 6.0.30 / JRockit 1.6 JRE  (Heap of 1500MB)</li>
  <li>unpacked deployment, all classes in JAR files.</li>
  <li>MySQL database</li>
  </ul>
  
  <p>I suspected classpath issues with Rhino JS engine. I checked dependencies... But it could not find the root cause.</p>
  
  <p>It is not the database content. I ran the scripted report with the exact same webapp code with same tomcat version, jre version and the same database content on my dev machine (with windows7 64bit) and it worked fine.</p>
  
  <p>Any help/ideas very much appreciated!</p>