Could not initialize class sun.awt.X11FontManager?
我用html2image执行线上环境就报下面错误。本地不会,尝试过很多办法也不行。麻烦有能帮我看看吗? https://www.cnblogs.com/peachyy/p/15538550.html 8/22 00:27:49 springboot-po0r-022 2022-08-21 16:27:49.207 ERROR 1 --- [p-nio-80-exec-2] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Handler dispatch failed; nested exception is java.lang.NoClassDefFoundError: Could not initialize class sun.awt.X11FontManager] with root cause 08/22 00:27:49 springboot-po0r-022 08/22 00:27:49 springboot-po0r-022 java.lang.NoClassDefFoundError: Could not initialize class sun.awt.X11FontManager 08/22 00:27:49 springboot-po0r-022 at java.lang.Class.forName0(Native Method) ~[na:1.8.0_275] 08/22 00:27:49 springboot-po0r-022 at java.lang.Class.forName(Class.java:348) ~[na:1.8.0_275] 08/22 00:27:49 springboot-po0r-022 at sun.font.FontManagerFactory$1.run(FontManagerFactory.java:82) ~[na:1.8.0_275] 08/22 00:27:49 springboot-po0r-022 at java.security.AccessController.doPrivileged(Native Method) ~[na:1.8.0_275] 08/22 00:27:49