gpt4 book ai didi

java - Java 11 中的 Jasperreport。java.lang.NoClassDefFoundError : Could not initialize class net. sf.jasperreports.engine.util.JRStyledTextParser

转载 作者:行者123 更新时间:2023-12-01 18:33:37 25 4
gpt4 key购买 nike

我在 docker openjdk:11.0.1-jdk-slim 内运行 jasperreports 没有错误。

内部openjdk:11.0-jdk-slim(openjdk版本“11.0.6”2020-01-14)错误:

Caused by: org.springframework.web.util.NestedServletException: Handler dispatch failed; nested exception is java.lang.NoClassDefFoundError: Could not initialize class net.sf.jasperreports.engine.util.JRStyledTextParser
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:982)
... 116 common frames omitted
Caused by: java.lang.NoClassDefFoundError: Could not initialize class net.sf.jasperreports.engine.util.JRStyledTextParser
at net.sf.jasperreports.engine.fill.JRBaseFiller.<init>(JRBaseFiller.java:116)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.<init>(JRVerticalFiller.java:79)
at net.sf.jasperreports.engine.fill.JRFiller.createBandReportFiller(JRFiller.java:251)
at net.sf.jasperreports.engine.fill.JRFiller.createReportFiller(JRFiller.java:272)
at net.sf.jasperreports.engine.fill.JRFiller.fill(JRFiller.java:156)
at net.sf.jasperreports.engine.fill.JRFiller.fill(JRFiller.java:145)
at net.sf.jasperreports.engine.JasperFillManager.fill(JasperFillManager.java:758)
at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:1074)
at com.keyintegrity.shb.common.report.ReportManager.writeReport(ReportManager.java:57)
at com.keyintegrity.shb.rest.DealController.writeReport(DealController.java:268)
at com.keyintegrity.shb.rest.DealController.getDealApplicationStateReport(DealController.java:211)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:133)
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:97)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:849)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:760)
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:967)
... 116 common frames omitted

Here is describe in java 11 fonts was removed

可以安装这个字体吗?

article应该存在库查找/usr/lib -name libfontconfig.so -o -name libfontconfig.so.1

最佳答案

找到解决方案,创建容器:

FROM openjdk:11.0-jdk-slim

RUN apt-get update && apt-get install -y --no-install-recommends libfontconfig1 && rm -rf /var/lib/apt/lists/*

关于java - Java 11 中的 Jasperreport。java.lang.NoClassDefFoundError : Could not initialize class net. sf.jasperreports.engine.util.JRStyledTextParser,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60110670/

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