验证码接口异常,生成不了验证码问题处理:
错误日志:java.lang.NoClassDefFoundError: Could not initialize class sun.awt.X11FontManager
处理:在Tomcat/bin/catalina.sh
文件中添加:JAVA_OPTS="$JAVA_OPTS -Djava.awt.headless=true"
在容器中处理:环境变量配置 JSSE_OPTS=-Djava.awt.headless=true
错误日志:/usr/local/openjdk-8/jre/lib/amd64/libfontmanager.so: libfreetype.so.6: cannot open shared object file: No such file or directory
处理:apt -y install libfreetype6-dev
错误日志:sun.awt.FontConfiguration.getVersion(FontConfiguration.java:1264) ~[na:1.8.0_275]
处理:apt install fontconfig
网友评论