gpt4 book ai didi

java.lang.NoClassDefFoundError : net. sf.jasperreports.engine.util.JRStyledTextParser(初始化失败)

转载 作者:行者123 更新时间:2023-12-01 14:01:51 36 4
gpt4 key购买 nike

美好的一天,

我有一个网络应用程序,它有一个模块,可以让用户在单击按钮时下载 Excel 文件中的报告。

但是,我遇到了这个错误:

[10/10/13 20:21:48:332 MYT] 00000095 ServletWrappe E com.ibm.ws.webcontainer.servlet.ServletWrapper service Uncaught service() exception thrown by servlet action: java.lang.NoClassDefFoundError: net.sf.jasperreports.engine.util.JRStyledTextParser (initialization failure)
at java.lang.J9VMInternals.initialize(J9VMInternals.java:176)
at net.sf.jasperreports.engine.fill.JRBaseFiller.<init>(JRBaseFiller.java:121)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.<init>(JRVerticalFiller.java:88)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.<init>(JRVerticalFiller.java:103)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.<init>(JRVerticalFiller.java:61)
at net.sf.jasperreports.engine.fill.JRFiller.createFiller(JRFiller.java:153)
at net.sf.jasperreports.engine.fill.JRFiller.fill(JRFiller.java:82)
at net.sf.jasperreports.engine.JasperFillManager.fill(JasperFillManager.java:653)
at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:969)
at com.cv.report.service.impl.ReportServiceImpl.getReport(ReportServiceImpl.java:101)
at com.cv.report.service.core.AbstractReportExporter.getReport(AbstractReportExporter.java:69)
at com.cv.report.service.impl.ExcelExporter.exportAsByte(ExcelExporter.java:120)
at com.cv.report.service.core.AbstractReportExporter.export(AbstractReportExporter.java:53)
at com.cv.report.service.impl.ExcelExporter.export(ExcelExporter.java:82)
at com.cv.report.service.impl.ReportService.export(ReportService.java:53)
at com.cv.ibs.ccweb.report.ReportLastSuccessfulSignOnDateAction.performExport(ReportLastSuccessfulSignOnDateAction.java:121)
at com.cv.ibs.ccweb.report.ReportAction.executeOther(ReportAction.java:62)
at com.cv.ibs.ccweb.BaseAction.execute(BaseAction.java:487)
at com.cv.ibs.ccweb.report.ReportAction.execute(ReportAction.java:88)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:465)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1422)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:505)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:575)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:668)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1227)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:776)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:458)
at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:178)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1032)
at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3761)
at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:304)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:976)
at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1662)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:200)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:459)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:526)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:312)
at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:88)
at com.ibm.ws.ssl.channel.impl.SSLReadServiceContext$SSLReadCompletedCallback.complete(SSLReadServiceContext.java:1784)
at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:175)
at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1862)

我尝试从互联网上搜索,但主要讨论的是我的类路径问题中缺少 jar 文件。我在我的环境中检查了我的文件,我认为我的 jar 文件应该是正确的,以下是这些 jar 文件:

  1. commons-beanutils.jar
  2. commons-collections.jar
  3. commons-digester-2.1.jar
  4. commons-discovery-0.2.jar
  5. commons-logging-1.1.1.jar
  6. dom4j-1.6.1.jar
  7. iText-2.1.7.jar
  8. jakarta-regexp.jar
  9. jasperreports-4.7.0.jar
  10. jasperreports-applet-4.7.0.jar
  11. jasperreports-fonts-4.7.0.jar
  12. jasperreports-javaflow-4.7.0.jar
  13. jcommon-1.0.15.jar
  14. poi-3.8-20120326.jar
  15. poi-ooxml-3.8-20120326.jar
  16. poi-ooxml-schemas-3.8-20120326.jar
  17. stax-api-1.0.1.jar
  18. xmlbeans-2.3.0.jar

我正在使用 RAD 8.5.5 和 Struts 框架。在此之前,我正在 RAD 7.0 中开发相同的 Web 应用程序。

RAD 7.0 可以正常使用按钮来下载 Excel 文件中的报告。然而,当我转移到 RAD 8.5.5 时,我遇到了这个错误。

如果我提供的信息有误,请告诉我。

请多多指教。

最佳答案

这可能是由于加载 AWT 类失败造成的(JRStyledTextParser 的静态 init 会执行 GraphicsEnvironment.getLocalGraphicsEnvironment())。

将 -Djava.awt.headless=true 添加到服务器 Java 进程以确认或确认此可能的原因。

关于java.lang.NoClassDefFoundError : net. sf.jasperreports.engine.util.JRStyledTextParser(初始化失败),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19296566/

36 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com