Possible Bug in 2.2 when processing extended content in LocalizedContentVisitor [message #254043] |
Thu, 30 August 2007 21:06  |
Eclipse User |
|
|
|
Hi,
The problem I'm running into at the moment appears to be a bug at
org.eclipse.birt.report.engine.presentation.LocalizedContent Visitor
protected IContent processExtendedContent(IForeignContent content)
I've written a custom report item and I want it to be able to be used
within a table but also by itself.
And it pretty much works, except for the situation when the item ISN'T
embedded in a table but there IS a table in the report.
It seems that some new code in the LocalizedContentVisitor is trying to
create a SingleRowSet, but the result set it's trying to use is invalid
(and is sometimes even null).
At line 671
rowSets[0] = new SingleRowSet( context,
(IQueryResultSet) rsets[0] );
bombs out with
java.lang.NullPointerException
at
org.eclipse.birt.data.engine.impl.ResultIterator.getResultMe taData(ResultIterator.java:754)
at
org.eclipse.birt.report.engine.data.dte.QueryResultSet.getRe sultMetaData(QueryResultSet.java:367)
at
org.eclipse.birt.report.engine.extension.internal.RowSet.<init >(RowSet.java:57)
at
org.eclipse.birt.report.engine.extension.internal.SingleRowS et. <init>(SingleRowSet.java:23)
at
org.eclipse.birt.report.engine.presentation.LocalizedContent Visitor.processExtendedContent(LocalizedContentVisitor.java: 672)
at
org.eclipse.birt.report.engine.presentation.LocalizedContent Visitor.visitForeign(LocalizedContentVisitor.java:368)
at
org.eclipse.birt.report.engine.content.impl.ForeignContent.a ccept(ForeignContent.java:59)
I'm not sure why it's trying to create a row set at all, since the item
isn't embedded in the row set or associated with it in anyway.
An expansion of my understanding is more that welcome, but this seems like
a bug to me.
Cheers,
Shaun
|
|
|
Re: Possible Bug in 2.2 when processing extended content in LocalizedContentVisitor [message #254983 is a reply to message #254043] |
Tue, 11 September 2007 04:07   |
Eclipse User |
|
|
|
Below is the fix that I have implemented, in case anyone is interested.
Sorry it's just a CVS diff from BIRT_2_2_0_Branch, but hopefully that
should be enough, I'm not sure what the correct procedure for submitting
these is.
RCS file: /cvsroot/birt/source/org.eclipse.birt.data/src/org/eclipse/b irt/data/engine/impl/ResultIterator.java,v
retrieving revision 1.86
diff -r1.86 ResultIterator.java
753a754,755
> if ( odiResult != null )
> {
754a757,761
> }
> else
> {
> return null;
> }
RCS file: /cvsroot/birt/source/org.eclipse.birt.report.engine/src/org/ eclipse/birt/report/engine/data/dte/QueryResultSet.java,v
retrieving revision 1.2
diff -r1.2 QueryResultSet.java
366c366,370
< else
---
> else {
> IResultMetaData md = rs.getResultMetaData();
> if ( md == null ) {
> return emptyResultMetaData;
> } else {
367a372,373
> }
> }
RCS file: /cvsroot/birt/source/org.eclipse.birt.report.engine/src/org/ eclipse/birt/report/engine/presentation/LocalizedContentVisi tor.java,v
retrieving revision 1.26.2.1
diff -r1.26.2.1 LocalizedContentVisitor.java
668c668
< if ( rsets != null )
---
> if ( rsets != null && rsets[0] != null )
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03694 seconds