开发者

BIRT 2.5 deployed with Xerces jar in WEB-INF/lib throws NullPointerException

so I am having pretty much exactly the same problem as what someone else has described here: birt-exchange.

I have integrated BIRT with my existing web application that requires the xerces jar (mine is version 2.5) and the following exception is thrown when I attempt to view the report:

java.lang.NullPointerException
    at org.eclipse.birt.chart.reportitem.ChartReportItemImpl.doCompatibility(ChartReportItemImpl.java:302)
    at org.eclipse.birt.chart.reportitem.ChartReportItemImpl.deserialize(ChartReportItemImpl.java:282)
    at org.eclipse.birt.report.model.extension.PeerExtensibilityProvider.initializeReportItem(PeerExtensibilityProvider.java:582)
    at org.eclipse.birt.report.model.elements.ExtendedItem.initializeReportItem(ExtendedItem.java:305)
    at org.eclipse.birt.report.model.elements.ExtendedItem.doCheck(ExtendedItem.java:642)
    at org.eclipse.birt.report.model.elements.ExtendedItem.checkCompatibility(ExtendedItem.java:604)
    at org.eclipse.birt.report.model.parser.ModuleParserHandler.handleExtendedItemCompatibility(ModuleParserHandler.java:431)
    at org.eclipse.birt.report.model.parser.ModuleParserHandler.endDocument(ModuleParserHandler.java:393)
    at org.apache.xerces.parsers.AbstractSAXParser.endDocument(Unknown Source)
    at org.apache.xerces.impl.XMLDocumentScannerImpl.endEntity(Unknown Source)
    at org.apache.xerces.impl.XMLEntityManager.endEntity(Unknown Source)
    at org.apache.xerces.impl.XMLEntityScanner.load(Unknown Source)
    at org.apache.xerces.impl.XMLEntityScanner.skipSpaces(Unknown Source)
    at org.apache.xerces.impl.XMLDocumentScannerImpl$TrailingMiscDispatcher.dispatch(Unknown Source)
    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
    at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
    at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
    at javax.xml.parsers.SAXParser.parse(SAXParser.java:375)
    at org.eclipse.birt.report.model.parser.ModuleReader.readModule(ModuleReader.java:94)
    at org.eclipse.birt.report.model.parser.DesignReader.read(DesignReader.java:88)
    at org.eclipse.birt.report.model.core.DesignSessionImpl.openDesign(DesignSessionImpl.java:315)
    at org.eclipse.birt.report.model.api.SessionHandleImpl.openDesign(SessionHandleImpl.java:294)
    at org.eclipse.birt.report.engine.parser.ReportParser.getDesignHandle(ReportParser.java:158)
    at org.eclipse.birt.report.engine.api.impl.ReportEngineHelper.openReportDesign(ReportEngineHelper.java:255)
    at org.eclipse.birt.report.engine.api.impl.ReportEngine.openReportDesign(ReportEngine.java:589)
    at org.eclipse.birt.report.service.ReportEngineService.openReportDesign(ReportEngineService.java:383)
    at org.eclipse.birt.report.utility.BirtUtility.getRunnableFromDesignFile(BirtUtility.java:594)
    at org.eclipse.birt.report.context.ViewerAttributeBean.getDesignHandle(ViewerAttributeBean.java:654)
    at org.eclipse开发者_如何学运维.birt.report.context.ViewerAttributeBean.__init(ViewerAttributeBean.java:231)
    at org.eclipse.birt.report.context.BaseAttributeBean.init(BaseAttributeBean.java:233)
    at org.eclipse.birt.report.context.ViewerAttributeBean.<init>(ViewerAttributeBean.java:116)
    at org.eclipse.birt.report.context.BirtContext.__init(BirtContext.java:44)
    at org.eclipse.birt.report.context.BaseContext.<init>(BaseContext.java:69)
    at org.eclipse.birt.report.context.BirtContext.<init>(BirtContext.java:30)
    at org.eclipse.birt.report.servlet.ViewerServlet.__getContext(ViewerServlet.java:150)
    at org.eclipse.birt.report.servlet.BirtSoapMessageDispatcherServlet.doPost(BirtSoapMessageDispatcherServlet.java:243)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:647)

I have successfully viewed the integrated demo report (included with the BIRT runtime download) with my existing application, but it did not include a chart, my report does. The stack trace indicates the chart is the difference between not working and working.

Does anyone have any ideas? I cannot remove the xerces jar since my existing app will fail to deploy. Is there anyway of effectively telling BIRT to ignore whatever other jars might be contained in the WEB-INF/lib directory?

In case it's relevant; my web app server is Tomcat 5.5.


I belive I have found the problem.

Under the directory WEB-INF/platform/plugins (where platforms is a BIRT specific directory) there is a jar named org.apache.xerces_2.9.0.v200909240008.jar.

I update my Xerces jar to version 2.9 and seems to be working...hope that helps anyone who may also hit this problem!


Got the same problem, in my case it turned out to a be an older version of Xerces on the classpath (2.4). Removing that one solved the problem.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜