Strange imutable collection report error
Options
<p>Hi all!</p>
<p> </p>
<p>I'm having this error when running my report... Anyone else seen this before and can give me a clue on what's going on? Thanks in advance!</p>
<p> </p>
<div>
<pre class="_prettyXprint _lang-nocode">
2015-11-24 16:35:48,471 SEVERE [org.eclipse.birt.report.engine.api.impl.ReportEngine] An error happened while running the report. Cause:
java.lang.UnsupportedOperationException
at java.util.Collections$UnmodifiableCollection.add(Collections.java:1016)
at org.eclipse.birt.report.engine.toc.TOCBuilder.startEntry(TOCBuilder.java:109)
at org.eclipse.birt.report.engine.toc.TOCBuilder.startGroupEntry(TOCBuilder.java:52)
at org.eclipse.birt.report.engine.executor.ReportItemExecutor.startGroupTOCEntry(ReportItemExecutor.java:758)
at org.eclipse.birt.report.engine.executor.TableGroupExecutor.execute(TableGroupExecutor.java:46)
at org.eclipse.birt.report.engine.internal.executor.wrap.WrappedReportItemExecutor.execute(WrappedReportItemExecutor.java:45)
at org.eclipse.birt.report.engine.internal.executor.emitter.ReportItemEmitterExecutor.execute(ReportItemEmitterExecutor.java:45)
at org.eclipse.birt.report.engine.internal.executor.dup.SuppressDuplicateItemExecutor.execute(SuppressDuplicateItemExecutor.java:42)
at org.eclipse.birt.report.engine.layout.html.HTMLBlockStackingLM.layoutNodes(HTMLBlockStackingLM.java:63)
at org.eclipse.birt.report.engine.layout.html.HTMLStackingLM.layoutChildren(HTMLStackingLM.java:27)
at org.eclipse.birt.report.engine.layout.html.HTMLTableLM.layoutChildren(HTMLTableLM.java:76)
at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.layout(HTMLAbstractLM.java:133)
at org.eclipse.birt.report.engine.layout.html.HTMLBlockStackingLM.layoutNodes(HTMLBlockStackingLM.java:68)
at org.eclipse.birt.report.engine.layout.html.HTMLPageLM.layout(HTMLPageLM.java:90)
at org.eclipse.birt.report.engine.layout.html.HTMLReportLayoutEngine.layout(HTMLReportLayoutEngine.java:101)
at org.eclipse.birt.report.engine.presentation.ReportDocumentBuilder.build(ReportDocumentBuilder.java:231)
at org.eclipse.birt.report.engine.api.impl.RunTask.doRun(RunTask.java:237)
at org.eclipse.birt.report.engine.api.impl.RunTask.run(RunTask.java:90)
</pre>
</div>
<p> </p>
<p> </p>
<p>I'm having this error when running my report... Anyone else seen this before and can give me a clue on what's going on? Thanks in advance!</p>
<p> </p>
<div>
<pre class="_prettyXprint _lang-nocode">
2015-11-24 16:35:48,471 SEVERE [org.eclipse.birt.report.engine.api.impl.ReportEngine] An error happened while running the report. Cause:
java.lang.UnsupportedOperationException
at java.util.Collections$UnmodifiableCollection.add(Collections.java:1016)
at org.eclipse.birt.report.engine.toc.TOCBuilder.startEntry(TOCBuilder.java:109)
at org.eclipse.birt.report.engine.toc.TOCBuilder.startGroupEntry(TOCBuilder.java:52)
at org.eclipse.birt.report.engine.executor.ReportItemExecutor.startGroupTOCEntry(ReportItemExecutor.java:758)
at org.eclipse.birt.report.engine.executor.TableGroupExecutor.execute(TableGroupExecutor.java:46)
at org.eclipse.birt.report.engine.internal.executor.wrap.WrappedReportItemExecutor.execute(WrappedReportItemExecutor.java:45)
at org.eclipse.birt.report.engine.internal.executor.emitter.ReportItemEmitterExecutor.execute(ReportItemEmitterExecutor.java:45)
at org.eclipse.birt.report.engine.internal.executor.dup.SuppressDuplicateItemExecutor.execute(SuppressDuplicateItemExecutor.java:42)
at org.eclipse.birt.report.engine.layout.html.HTMLBlockStackingLM.layoutNodes(HTMLBlockStackingLM.java:63)
at org.eclipse.birt.report.engine.layout.html.HTMLStackingLM.layoutChildren(HTMLStackingLM.java:27)
at org.eclipse.birt.report.engine.layout.html.HTMLTableLM.layoutChildren(HTMLTableLM.java:76)
at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.layout(HTMLAbstractLM.java:133)
at org.eclipse.birt.report.engine.layout.html.HTMLBlockStackingLM.layoutNodes(HTMLBlockStackingLM.java:68)
at org.eclipse.birt.report.engine.layout.html.HTMLPageLM.layout(HTMLPageLM.java:90)
at org.eclipse.birt.report.engine.layout.html.HTMLReportLayoutEngine.layout(HTMLReportLayoutEngine.java:101)
at org.eclipse.birt.report.engine.presentation.ReportDocumentBuilder.build(ReportDocumentBuilder.java:231)
at org.eclipse.birt.report.engine.api.impl.RunTask.doRun(RunTask.java:237)
at org.eclipse.birt.report.engine.api.impl.RunTask.run(RunTask.java:90)
</pre>
</div>
<p> </p>
0
Comments
-
<p>Finally I found the cause of this problem. Yet the solution is elluding me.</p>
<p> </p>
<p>When I have one or more filters on my report, even if they are in different dataSets, this error happens when I try to access a column of the second filter. If you open and look at my rptdesign you'll notice a filter in dsCliente and a filter in dsContrato. If I comment the second filter I get no error.</p>
<p> </p>
<p>This started to happen when I migrated my webapp from JSF1 to JSF2, using icefaces...</p>
<p> </p>
<p>I'm still working in a solution. I'm 3 days asleep by now </p>
0 -
<p>I FOUND THE **** PROBLEM!!!!!</p>
<p> </p>
<p>The problem is the Value1 of the filters!!!</p>
<p> </p>
<p>The first Dataset in the first filter:</p>
<pre class="_prettyXprint _lang-">
<oda-data-set extensionID="org.eclipse.birt.report.data.oda.jdbc.JdbcSelectDataSet" name="dsCliente" id="8">
<list-property name="filter">
<structure>
<property name="operator">eq</property>
<expression name="expr">var retorno=null;
if (params["clienteId"].value==null){
retorno = row["CLI_ID"];
}else{
retorno = row["CLI_ID"] *-1; // para ficar diferente e bloquear a linha no retorno da query
var clientes= new Array();
clientes = params["clienteId"].value.split("| ",100);
for(i=0; i<clientes.length ; i++)
{
if (clientes[i] ==row["CLI_ID"])
{
retorno = row["CLI_ID"]; //deixo igual para permitir que a linha faça parte do retorno da query
}
}
}
retorno;</expression>
<simple-property-list name="value1">
<value>row["CLI_ID"]</value>
</simple-property-list>
</structure>
</list-property>
</pre>
<p>And the second Dataset in the second filter:</p>
<pre class="_prettyXprint _lang-">
<oda-data-set extensionID="org.eclipse.birt.report.data.oda.jdbc.JdbcSelectDataSet" name="dsContrato" id="6138">
<list-property name="filter">
<structure>
<property name="operator">eq</property>
<expression name="expr">var retorno=null;
if (params["clienteId"].value==null){
retorno = row["CLI_ID"];
}else{
retorno = row["CLI_ID"] *-1; // para ficar diferente e bloquear a linha no retorno da query
var clientes= new Array();
clientes = params["clienteId"].value.split("| ",100);
for(i=0; i<clientes.length ; i++)
{
if (clientes[i] ==row["CLI_ID"])
{
retorno = row["CLI_ID"]; //deixo igual para permitir que a linha faça parte do retorno da query
}
}
}
retorno;</expression>
<simple-property-list name="value1">
<value>row["CLI_ID"]</value>
</simple-property-list>
</structure>
</list-property>
</pre>
<p>That's what causes the problem. Somehow Birt goes nuts when we have 2 filters, even if they are in different datasets. Apparently he thinks that the value1 is the same across all the Datasets, and when I try to use the value1 of the second filter it gives the error that I'm trying to modify an immutable list by adding another value.</p>
<p> </p>
<p>If I change the second value1 for example to value1_REMOVE it works perfectly in my webapp, but it does not work in BIRT report designer anymore...</p>
<p> </p>
<p>So, did anyone come across this problem and knows a way to fix this? As I stated this started after I migrated from JSF1 to JSF2 with icefaces.</p>
0 -
<p>I'm moving this post to the BIRT Runtime forum for more exposure there.</p>
Warning No formatter is installed for the format ipb0
Categories
- All Categories
- 109 Developer Announcements
- 49 Articles
- 100 General Questions
- 122 IM Services
- 40 OpenText Hackathon
- 31 Developer Tools
- 20.6K Analytics
- 4.1K AppWorks
- 8.9K Extended ECM
- 897 Cloud Fax and Notifications
- 77 Digital Asset Management
- 9.3K Documentum
- 29 eDOCS
- 122 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management