当我在iReport 5.1.0中预览JasperReports的报告时,它执行得很好。它包含一个饼图,当我需要从jsp文件运行它时,问题就来了。
java.lang.NoClassDefFoundError: Could not initialize class net.sf.jasperreports.charts.type.PlotOrientationEnum
以下是完整的错误消息:
java.lang.NoClassDefFoundError: org/jfree/chart/plot/PlotOrientation
at net.sf.jasperreports.charts.type.PlotOrientationEnum.<clinit>(PlotOrientationEnum.java:42)
at net.sf.jasperreports.engine.base.JRBaseChartPlot.<init>(JRBaseChartPlot.java:76)
at net.sf.jasperreports.charts.base.JRBasePiePlot.<init>(JRBasePiePlot.java:71)
at net.sf.jasperreports.charts.design.JRDesignPiePlot.<init>(JRDesignPiePlot.java:52)
at net.sf.jasperreports.engine.design.JRDesignChart.setChartType(JRDesignChart.java:744)
at net.sf.jasperreports.engine.design.JRDesignChart.<init>(JRDesignChart.java:189)
at net.sf.jasperreports.charts.xml.JRPieChartFactory.createObject(JRPieChartFactory.java:47)
at org.apache.commons.digester.FactoryCreateRule.begin(FactoryCreateRule.java:397)
at org.apache.commons.digester.Digester.startElement(Digester.java:1583)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:506)
at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.startElement(XMLSchemaValidator.java:749)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:376)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2768)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:606)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:116)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:511)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:846)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:775)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:123)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1210)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:628)
at org.apache.commons.digester.Digester.parse(Digester.java:1892)
at net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:243)
at net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:230)
at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:218)
at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:172)
at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:156)
at net.sf.jasperreports.engine.JasperCompileManager.compile(JasperCompileManager.java:171)
at net.sf.jasperreports.engine.JasperCompileManager.compileReport(JasperCompileManager.java:448)
at logic.PDFReport.printReport(PDFReport.java:93)
at org.apache.jsp.Reports_jsp._jspService(Reports_jsp.java:178)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:111)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:411)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:473)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:377)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1682)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:318)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:160)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:734)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:673)
at com.sun.enterprise.html" target="_blank">web.WebPipeline.invoke(WebPipeline.java:99)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:174)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:357)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:260)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:188)
at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:191)
at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:168)
at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:189)
at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:288)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:206)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:136)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:114)
at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:838)
at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:113)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:115)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:55)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:135)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:564)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:544)
at java.lang.Thread.run(Thread.java:724)
Caused by: java.lang.ClassNotFoundException: org.jfree.chart.plot.PlotOrientation
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 64 more
下载并添加此库。在你的项目中。
https://repo1.maven.org/maven2/info/novatec/testit/livingdoc-confluence5-plugin/1.1.2/livingdoc-confluence5-plugin-1.1.2.jar
问题内容: 是我自己的一类。该类与主类位于同一JAR文件中。因此,这不应该是因为classpath中缺少任何JAR。 当我通过查阅JAR文件时,可以看到其中列出的内容。 顺便说一句:代码在我的本地计算机上运行良好。但是当我将其与某些脚本一起部署到Linux服务器上时无法工作。所以我认为这不是代码的问题。但是出于某种原因。部署过程很难跟踪。 可能是什么问题呢? 问题答案: 我最好的选择是这里有一个问
问题内容: 我是EJB的新手。我的经理告诉我在测试服务器中部署ejb应用程序进行一些修改。该应用程序已经在我们的生产服务器中运行。但是,当我部署应用程序时,我遇到了异常。 我们正在使用Glassfish应用服务器 堆栈异常跟踪: 当我重新启动服务器时,我得到了这些: 在这里您也可以看到相同的问题 任何人都可以 请 帮我,为什么这个错误即将到来。 这是非常需要的。 谢谢 问题答案: 问题解决了。 实
问题内容: 我在此添加了web.xml的源代码 Hibernate.cfg.xml。我的Web服务项目与Jersey + Hibernate一起使用。 这是HibernateUtil类 这是我添加了Hibernate最新的jar文件的错误。[ hibernate-core-4.3.7.Final.jar ] 请帮我解决这个问题谢谢 问题答案: 初始化失败时可能会发生这种错误。您已经提到您正在使用。
在Spring启动应用程序中使用jjwt在REST API中进行基于令牌的身份验证。它在我的本地环境中工作得很好,但是当我在Tomcat中部署war时,它会给出异常-无法初始化类io.jsonwebtoken.Signature的算法。Signature的算法类在jar中,但它的给出java.lang.NoClassDefFoundError错误。 努力在Tomcat中部署它并开始工作。需要帮助来
我怎么才能修好这个? 谢了。 pom.xml 更新:通过使用较新版本的Hibernate修复了它。