Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Exception on javascript dont get propagated when using Group with keyExpr that fail
Clovis Wichoski
<p>Hi,</p>
<p> </p>
<p>I'm facing a strange problem on embeding BIRT in a project, the reports stops to work when I add a new dependency for pivot4j, I'm using BIRT 4.3.1 as a maven dependency, on inspecting the code to debug where is the problem, the BIRT throws a new exception at line 947 of the source /home/clovis/.m2/repository/org/eclipse/birt/runtime/org.eclipse.birt.runtime/4.3.1/org.eclipse.birt.runtime-4.3.1-sources.jar:org/eclipse/birt/data/engine/script/ScriptEvalUtil.java:</p>
<pre class="_prettyXprint _linenums:945">
catch ( BirtException e )
{
throw DataException.wrap( e );
}
</pre>
<p>This throw never appears on application side, but debuging on NetBeans, I was able to do a printStackTrace on BirtException that returns:</p>
<blockquote class="ipsBlockquote">
<p> </p>
<p>org.eclipse.birt.core.exception.CoreException: There are errors evaluating script "row.cnpj":<br>
Invalid Javascript expression: dataSetRow["cnpj"].<br>
Invalid Javascript expression: dataSetRow["cnpj"].<br>
at org.eclipse.birt.report.engine.javascript.JavascriptEngine.evaluate(JavascriptEngine.java:295)<br>
at org.eclipse.birt.core.script.ScriptContext.evaluate(ScriptContext.java:159)<br>
at org.eclipse.birt.data.engine.script.ScriptEvalUtil.evalExpr(ScriptEvalUtil.java:919)<br>
at org.eclipse.birt.data.engine.impl.ComputedColumnHelper$ComputedColumnHelperInstance.process(ComputedColumnHelper.java:494)<br>
at org.eclipse.birt.data.engine.impl.ComputedColumnHelper.process(ComputedColumnHelper.java:138)<br>
at org.eclipse.birt.data.engine.executor.cache.RowResultSet.processFetchEvent(RowResultSet.java:173)<br>
at org.eclipse.birt.data.engine.executor.cache.RowResultSet.doNext(RowResultSet.java:126)<br>
at org.eclipse.birt.data.engine.executor.cache.RowResultSet.next(RowResultSet.java:96)<br>
at org.eclipse.birt.data.engine.executor.cache.ExpandableRowResultSet.next(ExpandableRowResultSet.java:63)</p>
</blockquote>
<p> </p>
<p>Here is the expression that cause the above problem:</p>
<pre class="_prettyXprint _lang-xml">
<expression name="keyExpr" type="javascript">row.cnpj</expression>
</pre>
<p>Then, including the pivot4j dependency causes BIRT to get errors on evaluating keyExpr javascript expressions, I tried to remove conflicts to avoid the errors, but without success, do you know if these two system can run at same context? Why the exceptions of JavaScript never get back to the caller application or log about this error?</p>
<p> </p>
<p>Best regards.</p>
<p> </p>
<p>Clóvis</p>
<p> </p>
<p>ps: I tried with newer versions of BIRT and the same problem occurs</p>
<p>ps2: without propagating exception the users get a blank PDF report, appearing that as no data.</p>
Find more posts tagged with
Comments
There are no comments yet