所以我和其他人在这里描述的问题几乎完全相同: birt-exchange
我已将BIRT与我现有的Web应用程序集成,该应用程序需要xerces jar(我的版本为2.5),当我尝试查看报告时会抛出以下异常:
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)
我已成功查看了现有应用程序的集成演示报告(包含在BIRT运行时下载中),但我的报告没有包含图表。堆栈跟踪表明图表是不工作和工作之间的差异。
有没有人有任何想法?我无法删除xerces jar,因为我的现有应用程序将无法部署。无论如何有效地告诉BIRT忽略WEB-INF / lib目录中可能包含的其他任何jar?
如果相关;我的网络应用服务器是Tomcat 5.5。
答案 0 :(得分:3)
我相信我找到了问题。
在 WEB-INF / platform / plugins 目录下(其中platform是BIRT特定目录),有一个名为 org.apache.xerces_2.9.0.v200909240008.jar的jar
我将我的Xerces jar更新到版本2.9并且似乎正在工作......希望能帮助任何可能遇到此问题的人!
答案 1 :(得分:1)
遇到同样的问题,在我的情况下,它在类路径(2.4)上变成了一个旧版本的Xerces。删除那个解决了这个问题。