Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 323214 - Null pointer exception when viewing report that uses localization, variable and library
Summary: Null pointer exception when viewing report that uses localization, variable a...
Status: VERIFIED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: BIRT (show other bugs)
Version: 2.5.2   Edit
Hardware: Other Linux
: P3 normal (vote)
Target Milestone: 3.7.0   Edit
Assignee: Birt-ReportEngine-inbox@eclipse.org CLA
QA Contact: Xiaodan Wang CLA
URL:
Whiteboard: Non-auto
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-20 02:58 EDT by Pierre-Alain Blanc CLA
Modified: 2011-05-26 13:32 EDT (History)
1 user (show)

See Also:


Attachments
Stack trace of report viewer when executing report (12.00 KB, text/plain)
2010-08-20 03:04 EDT, Pierre-Alain Blanc CLA
no flags Details
report design files (+ library and translation files), ZIP compressed (22.80 KB, application/octet-stream)
2010-08-20 03:08 EDT, Pierre-Alain Blanc CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Pierre-Alain Blanc CLA 2010-08-20 02:58:36 EDT
Build Identifier: 2.5.2

When viewing report (either in designer or in birt-viewer), I get a null pointer exception.
According to stack trace, it seems to be caused when trying to localize report variable. Indeed, if I delete the variable, everything is OK.
Note: if I remember well, this error did not happen before I moved some elements (style with map rules) to the library (that is used by my report). I've designed other reports with variables and (same) localization that made no such problems.


Reproducible: Sometimes

Steps to Reproduce:
1. Needs a database that has datamodel which is expected by report
2.
3.
Comment 1 Pierre-Alain Blanc CLA 2010-08-20 03:04:13 EDT
Created attachment 177064 [details]
Stack trace of report viewer when executing report
Comment 2 Pierre-Alain Blanc CLA 2010-08-20 03:08:54 EDT
Created attachment 177066 [details]
report design files (+ library and translation files), ZIP compressed
Comment 3 Pierre-Alain Blanc CLA 2010-08-20 03:43:53 EDT
Strangely does *not* happen when exporting to Excel, only when viewing in web-viewer.
Comment 4 Xiaoying Gu CLA 2010-08-20 05:29:32 EDT
Hi,

I noticed there is an error in the trace you attached:
SEVERE: Failed to get the report runnable
org.eclipse.birt.report.engine.api.EngineException: The design file
xxx.rptdesign has error and can not be run.
Which indicates that the design file has errors. Did you notice any errors in
the Problems/Error view?

I've tried a report design using sample db on 2.5.2 release, which is similar
to the attached test report, but can not reproduce the issue you mentioned. 

Is there any chance that you can export the data from db to csv flatfile and
change the report design to use the flatfile datasource?
Comment 5 Xiaoying Gu CLA 2010-08-20 11:30:52 EDT
Can you reproduce this issue by below steps in your build:
1. New a blank report, using the library file you attached
2. New a variable in the report
3. Preview in webviewer

I can reproduce the NPE(not the same NPE as you attached) in webviewer by above steps in 2.5.2 but not in the 2.6.0 release.

Would you please try the latest 2.6.0 release build to see if it has been already resolved?
Comment 6 Pierre-Alain Blanc CLA 2010-08-23 11:34:32 EDT
Hi !

Thanks for the investigations.
I've tried the same report under runtime version 2.6.0 and couldn't reproduce it. Seems that the bug was fixed between 2.5.2 and 2.6.0

As it seems to work also when generating Excel under 2.5.2, it is fine for me. You can close the bug. Thanks again for your support !
Comment 7 Xiaoying Gu CLA 2010-08-23 22:21:06 EDT
Fixed in 2.6.0 release.
Comment 8 Xiaodan Wang CLA 2010-09-09 03:58:28 EDT
Set as Verified.