当前位置:首页 » 《资源分享》 » 正文

Java读取本地字体 缺失 Fontconfig head is null

24 人参与  2024年03月24日 15:05  分类 : 《资源分享》  评论

点击全文阅读


异常问题

2023-11-30 02:46:36.395 [http-nio-13700-exec-3] ERROR o.a.c.c.C.[.[.[/xxx].[dispatcherServlet] - Servlet.service() for servlet [dispatcherServlet] in context with path [/xxx] threw exception [Request processing failed; nested exception is java.lang.RuntimeException: Fontconfig head is null, check your fonts or fonts configuration] with root causejava.lang.RuntimeException: Fontconfig head is null, check your fonts or fonts configuration

环境

新环境 JDK21

java 21.0.1 2023-10-17 LTS
Java™ SE Runtime Environment (build 21.0.1+12-LTS-29)
Java HotSpot™ 64-Bit Server VM (build 21.0.1+12-LTS-29, mixed mode, sharing)

问题原因

项目Spring Boot2.x,JDK1.8,后来改成JDK21,部署之后导出excel,出现该异常

解决

1、服务器配置

在服务器上安装FontConfig组件:

apt-get install -y fontconfigfc-cache --force

鸣谢

https://blog.csdn.net/weixin_42074377/article/details/108281172

点击全文阅读


本文链接:http://zhangshiyu.com/post/84843.html

<< 上一篇 下一篇 >>

  • 评论(0)
  • 赞助本站

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。

关于我们 | 我要投稿 | 免责申明

Copyright © 2020-2022 ZhangShiYu.com Rights Reserved.豫ICP备2022013469号-1