| Summary: | NPE in UpdateContent#getInitializationId() | ||
|---|---|---|---|
| Product: | z_Archived | Reporter: | Brian de Alwis <bsd> |
| Component: | BIRT | Assignee: | Yulin Wang <Lionel.wyl> |
| Status: | VERIFIED INVALID | QA Contact: | Morris Kleiman <mkleiman> |
| Severity: | normal | ||
| Priority: | P3 | CC: | bluesoldier, Lionel.wyl |
| Version: | 2.6.2 | ||
| Target Milestone: | 4.4.1 | ||
| Hardware: | PC | ||
| OS: | All | ||
| Whiteboard: | |||
This is expected behavior.
Looking into Apache Axis class "BeanSerializer" code, it requires Exception to break the while loop, otherwise endless loop will cause out of memory error.
Notice this NPE is just used internally, and won't cause any defects, so this behavior is not a bug.
Axis code for reference:
int j = 0;
while (j >= 0)
{
Object propValue = null;
try
{
propValue = this.propertyDescriptor[i].get(value, j);
j++;
}
catch (Exception e)
{
j = -1;
}
if (j >= 0) {
context.serialize(qname, null, propValue, xmlType, this.propertyDescriptor[i].getType());
}
}
Based on Yulin's comment #1, this is being moved to Verified. If there's something additional to add from the submitter, please update and reopen. |
I normally have a breakpoint on NullPointerException, and have to add an exception for org.eclipse.birt.report.soapengine.api.UpdateContent#getInitializationId(int): public org.eclipse.birt.report.soapengine.api.ReportId getInitializationId(int i) { return this.initializationId[i]; } The field "initializationId" is null. The parameter "i" is 0. In my case, I'm rendering a report through the viewer servlet given a .rptdesign file. Putting a write breakpoint on initializationId, execution is stopped in BirtChangeParameterActionHandler#doRenderPage() at line 90 calls setInitializationId(): UpdateContent content = new UpdateContent( ); content.setContent( DataUtil.toUTF8( page.toByteArray( ) ) ); content.setTarget( operation.getTarget( ).getId( ) ); content.setInitializationId( parseReportId( activeIds ) ); // line 90 The "activeIds" is an empty array. #parseReportId() returns null. The NPE seems to be eaten in org.apache.axis.encoding.ser.BeanSerializer, but I don't have the source code to trace through it.