Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
[Bug?] NullPointerException when running reporting engine
velvlad
I have a Swing application and I would like to integrate a chart into a Frame. I am running the Report Engine api (org.eclipse.birt.report.engine.api) to create the report based on a previously design made within Eclipse.
I am using Eclipse Galileo 3.5.1 with BIRT (Eclipse IDE for Java and Report Developers) and BIRT Runtime 2.5.1
I am getting a very curious NullPointerException at the line where I am trying to open the design. If I try to display a table, it all works OK; only with charts I have this issue. The engine is started correctly, I had traces for that.
The line at which I have the Exception: design = engine.openReportDesign("/root/BIRT/reports/Printers.rptdesign");
java.lang.NullPointerException
16.10.2009 15:58:14.879 Load Application ERROR System at org.eclipse.birt.chart.reportitem.ChartReportItemImpl.doCompatibility(ChartReportItemI
mpl.java:302)
16.10.2009 15:58:14.879 Load Application ERROR System at org.eclipse.birt.chart.reportitem.ChartReportItemImpl.deserialize(ChartReportItemImpl.
java:282)
16.10.2009 15:58:14.879 Load Application ERROR System at org.eclipse.birt.report.model.extension.PeerExtensibilityProvider.initializeReportItem
(PeerExtensibilityProvider.java:582)
16.10.2009 15:58:14.879 Load Application ERROR System at org.eclipse.birt.report.model.elements.ExtendedItem.initializeReportItem(ExtendedItem.
java:305)
16.10.2009 15:58:14.879 Load Application ERROR System at org.eclipse.birt.report.model.elements.ExtendedItem.doCheck(ExtendedItem.java:642)
16.10.2009 15:58:14.879 Load Application ERROR System at org.eclipse.birt.report.model.elements.ExtendedItem.checkCompatibility(ExtendedItem.ja
va:604)
16.10.2009 15:58:14.880 Load Application ERROR System at org.eclipse.birt.report.model.parser.ModuleParserHandler.handleExtendedItemCompatibili
ty(ModuleParserHandler.java:431)
16.10.2009 15:58:14.880 Load Application ERROR System at org.eclipse.birt.report.model.parser.ModuleParserHandler.endDocument(ModuleParserHandl
er.java:393)
16.10.2009 15:58:14.880 Load Application ERROR System at org.apache.xerces.parsers.AbstractSAXParser.endDocument(Unknown Source)
16.10.2009 15:58:14.880 Load Application ERROR System at org.apache.xerces.impl.XMLDocumentScannerImpl.endEntity(Unknown Source)
16.10.2009 15:58:14.880 Load Application ERROR System at org.apache.xerces.impl.XMLEntityManager.endEntity(Unknown Source)
16.10.2009 15:58:14.880 Load Application ERROR System at org.apache.xerces.impl.XMLEntityScanner.load(Unknown Source)
16.10.2009 15:58:14.880 Load Application ERROR System at org.apache.xerces.impl.XMLEntityScanner.skipSpaces(Unknown Source)
16.10.2009 15:58:14.880 Load Application ERROR System at org.apache.xerces.impl.XMLDocumentScannerImpl$TrailingMiscDispatcher.dispatch(Unknown
Source)
16.10.2009 15:58:14.880 Load Application ERROR System at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
16.10.2009 15:58:14.880 Load Application ERROR System at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
16.10.2009 15:58:14.880 Load Application ERROR System at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
16.10.2009 15:58:14.880 Load Application ERROR System at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
16.10.2009 15:58:14.880 Load Application ERROR System at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
16.10.2009 15:58:14.880 Load Application ERROR System at javax.xml.parsers.SAXParser.parse(SAXParser.java:375)
16.10.2009 15:58:14.880 Load Application ERROR System at org.eclipse.birt.report.model.parser.ModuleReader.readModule(ModuleReader.java:94)
16.10.2009 15:58:14.880 Load Application ERROR System at org.eclipse.birt.report.model.parser.DesignReader.read(DesignReader.java:88)
16.10.2009 15:58:14.880 Load Application ERROR System at org.eclipse.birt.report.model.core.DesignSessionImpl.openDesign(DesignSessionImpl.java
:315)
16.10.2009 15:58:14.880 Load Application ERROR System at org.eclipse.birt.report.model.api.SessionHandleImpl.openDesign(SessionHandleImpl.java:
294)
16.10.2009 15:58:14.880 Load Application ERROR System at org.eclipse.birt.report.engine.parser.ReportParser.getDesignHandle(ReportParser.java:1
58)
16.10.2009 15:58:14.880 Load Application ERROR System at org.eclipse.birt.report.engine.api.impl.ReportEngineHelper.openReportDesign(ReportEngi
neHelper.java:255)
16.10.2009 15:58:14.880 Load Application ERROR System at org.eclipse.birt.report.engine.api.impl.ReportEngineHelper.openReportDesign(ReportEngi
neHelper.java:195)
16.10.2009 15:58:14.880 Load Application ERROR System at org.eclipse.birt.report.engine.api.impl.ReportEngineHelper.openReportDesign(ReportEngi
neHelper.java:129)
16.10.2009 15:58:14.880 Load Application ERROR System at org.eclipse.birt.report.engine.api.impl.ReportEngine.openReportDesign(ReportEngine.jav
a:308)
16.10.2009 15:58:14.880 Load Application ERROR System at test.dao.SimpleFrame.runReport(SimpleFrame.java:55)
It looks to be some sort of XML miscue, but I just can't place it. BIRT does not come with its own XML parser, so I don't believe there are conflicts with the versions during classloading.
Any other ideas ?
Thank you !
Vlad.
Find more posts tagged with
Comments
asilo1
if you find a solution plz forward me as well. i have the same problem.
CBR
This might be caused by using a incompatible version of xerces in your application.
BIRT 2.5 needs to have Xerces 2.9. Charts won't work if you are using a lower version of xerces (had similar problems in the past because i was using xerces 2.5 and therefore removed the 2.9 of BIRT from classpath of my application)
asilo1
i used 2.6.2 and 3.7.1 and they are both up to date with xerces file so not sure if i put a new one will affect anything
Susana
Could you outline your code?
Something like:
get design config
get engine config
set engine home
get new session
open design
...stuff
add chart
...stuff
save design file (?)
asilo1
well finally i found out what was the problem. Bc i was using jide i had xercesxml file which was lower version and it wasn't using the xerces file i introduced till i actually downloaded the new xercesxml 2.9 and replaced with the main project. but docomp.... issues is xerces problem 100%