`

奇怪的BIRT Chart NullPointerException

阅读更多
使用的是birt2.5;birt designer中预览chart报表没问题;部署到tomcat中访问的时候报NullPointerException:
引用

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.XML11Configuration.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:395)
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:710)
at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.eclipse.birt.report.servlet.BirtSoapMessageDispatcherServlet.service(BirtSoapMessageDispatcherServlet.java:122)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.eclipse.birt.report.filter.ViewerFilter.doFilter(ViewerFilter.java:68)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:619)


找到原因:
Xerces & Xalan jars,如果缺这两个jar包中的任何一个,请加到lib下。
http://dev.eclipse.org/newslists/news.eclipse.birt/msg30622.html
引用

I got the problem fixed.

The problem is with the Oracle Application Server. OAS is shipped with Oracle XML Parser, which is the default XML parser/transformer implementation used for any application deployed into Oracle Application Server. Oracle's JAXP implementation doesn't seems to be complete and gave problem with the BIRT runtime.

I got this problem fixed by adding the Xerces & Xalan jars into the WEB-INF/lib folder of BIRT runtime war and adding the following entry to the orion-web.xml in the application-deployments folder.

<web-app-class-loader search-local-classes-first="true" include-war-manifest-class-path="true"/>

Now OAS loads the xerces & xalan implementation for BIRT Runtime and the chart appears fine.
分享到:
评论

相关推荐

    java 空指针异常(NullPointerException)

    Java中的空指针异常(NullPointerException)是编程过程中常见的错误类型,尤其对于新手开发者来说更为常见。这个异常通常在试图访问或操作一个值为null的对象引用时抛出。下面将详细探讨这一异常的原因、表现形式、...

    NullPointerException 异常处理

    Excel文件读取时NullPointerException 异常处理

    java.lang.NullPointerException

    Java.lang.NullPointerException 解决方案与原因分析 Java.lang.NullPointerException 是 Java 语言中一种常见的异常,它发生在 Java 应用程序尝试使用 null 对象引用时。这种异常通常是由于程序员错误地认为对象...

    java.lang.NullPointerException的可能原因及处理.docx

    Java.lang.NullPointerException 的可能原因及处理 Java.lang.NullPointerException 是 Java 语言中最常见的异常之一,它的出现通常是由于编程不当或对象未被正确初始化所致。在本文中,我们将探讨 Java.lang....

    java中常见的NullPointerException异常.pdf

    Java中常见的NullPointerException异常 Java中常见的NullPointerException异常是Java编程中最常见的一种异常。这种异常发生在程序试图访问或操作一个为null的对象时。下面是可能发生NullPointerException的几种情况...

    Java中避免NullPointerException的方法总结

    Java 中避免 NullPointerException 的方法总结 Java 中的 NullPointerException 是一个非常常见的错误,它通常是由于程序员没有正确地处理 null 对象导致的。避免 NullPointerException 的方法总结是非常重要的,本...

    NullPointerException如何解决.md

    NullPointerException如何解决.md

    NullPointerException解决办法.md

    NullPointerException解决办法.md

    java中常见的NullPointerException异常[归类].pdf

    Java 中常见的 NullPointerException 异常 在 Java 编程中,NullPointerException 是一种常见的异常,发生在程序尝试访问或操作空对象时。该异常的出现是由于程序员没有正确地处理对象的空值引用的结果。下面我们将...

    java 出现NullPointerException的原因及解决办法

    java 出现NullPointerException的原因及解决办法 日常开发过程中,最常见的异常莫过于NullPointerException,之前的时候,只是知道去找到报错的位置,然后去解决它,最近有空学习C语言,就去深究了下...

    NullPointerException(解决方案).md

    NullPointerException(解决方案).md

    详解Java中NullPointerException异常的原因详解以及解决方法

    在Java编程语言中,`NullPointerException` 是一个常见的运行时异常,它发生在试图访问或操作一个值为null的对象引用时。这个异常表示程序试图通过一个null引用调用方法或访问字段,而实际上该引用并没有指向任何...

    全面解析Java中的NullPointerException及其预防策略

    NullPointerException是Java编程中的一个常见问题,它涉及到对象的初始化、null检查、方法返回值处理等多个方面。通过确保对象在使用前被正确初始化、在操作对象前进行null检查、使用Optional类以及进行代码审查和...

    Java14发布了,再也不怕NullPointerException了

    在这个版本中,Java 带来了一个革命性的新特性:Helpful NullPointerExceptions,这项新特性将彻底改变我们对 NullPointerException 的看法。那么,在 Java 14 中,这个新特性究竟是什么样的呢? 首先,让我们回顾...

    java.lang.NullPointerException出现的几种原因及解决方案

    java.lang.NullPointerException出现的几种原因及解决方案 java.lang.NullPointerException是Java中最常见的异常之一,它经常出现在日常编程中。了解java.lang.NullPointerException的原因和解决方案对于Java开发者...

    CRASH问题:java.lang.NullPointerException

    java.lang.NullPointerException: Attempt to invoke virtual method ‘void android.widget.ImageView.setImageResource(int)’ on a null object reference 今天在家练习ListView的时候,遇到一个java.lang....

    java 避免出现NullPointerException(空指针)的方法总结

    java 避免出现NullPointerException(空指针)的方法总结 java 避免出现NullPointerException(空指针)的方法总结是java应用中非常重要的一部分,因为空指针异常是java应用中最常见的异常之一。避免空指针异常可以...

Global site tag (gtag.js) - Google Analytics