It's all about the answers!

Ask a question

error in report: copyInstance missing


John Kohl (1461815) | asked Dec 12 '11, 9:40 a.m.
I'm trying to run a report to generate a chart. It worked when my RTC server was at 3.0, but after the administrators updated to 3.0.1, the report now fails.
Anybody seen this before:


Java class "org.eclipse.birt.chart.model.attribute.impl.TextImpl" has no public instance field or method named "copyInstance". at line 82 of chart script:'' exception.javascript.error ( 1 time(s) ) detail : org.eclipse.birt.report.engine.api.EngineException: Java class "org.eclipse.birt.chart.model.attribute.impl.TextImpl" has no public instance field or method named "copyInstance". at line 82 of chart script:'' at org.eclipse.birt.report.engine.executor.ExecutionContext.addException(ExecutionContext.java:1215) at org.eclipse.birt.report.engine.presentation.LocalizedContentVisitor.processExtendedContent(LocalizedContentVisitor.java:1037) at
...


Is this something we need to fix in the report? Is it something the administrator needs to fix on the server?

The report design has this code inside a javascript block (just one example of using the copyInstance method):

// If there are no story points for this priority, hide the priority from the legend
var points = priorityTotals.get(priorities[key-1].id);
if (points == null || points == 0) {
var newLegend = TextImpl.copyInstance(oldLegend);
newLegend.setValue("");
lerh.getLabel().setCaption(newLegend);
lerh.getFill().setTransparency(0);
}

4 answers



permanent link
Rafik Jaouani (5.0k16) | answered Dec 12 '11, 3:02 p.m.
JAZZ DEVELOPER
Very strange. RTC 3.0 and RTC 3.0.1 use the same version of BIRT. Can you please file a defect and attach a small report design file that causes the error.

permanent link
John Kohl (1461815) | answered Dec 13 '11, 8:35 a.m.
Can you please file a defect and attach a small report design file that causes the error.

filed as defect 188439

permanent link
John Kohl (1461815) | answered Dec 14 '11, 10:32 a.m.
A variant of the report is in RTC 4.0, apparently (according to the bug info).
Is there a fix we can make to our 3.0.1 (maybe 3.0.1.1) server or report definition to make it work again?

permanent link
John Kohl (1461815) | answered Dec 15 '11, 11:23 a.m.
I needed two updates to the report design I was using.

(1) change all references like this:
var newLegend = TextImpl.copyInstance(oldLegend);

to this:
var newLegend = oldLegend.copyInstance();


(2) Change the output format from SVG to PNG (better browser compatibility):
<property>SVG</property>

to this:
<property>PNG</property>

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.