java.lang.NoClassDefFoundError: Could not initialize class sun.awt.X11FontManager
12/30 14:18:50
springboot-jl47-005
at java.lang.Class.forName0(Native Method) ~[na:1.8.0_292]
12/30 14:18:50
springboot-jl47-005
at java.lang.Class.forName(Class.java:348) ~[na:1.8.0_292]
12/30 14:18:50
springboot-jl47-005
at sun.font.FontManagerFactory$1.run(FontManagerFactory.java:82) ~[na:1.8.0_292]
12/30 14:18:50
springboot-jl47-005
at java.security.AccessController.doPrivileged(Native Method) ~[na:1.8.0_292]
12/30 14:18:50
springboot-jl47-005
at sun.font.FontManagerFactory.getInstance(FontManagerFactory.java:74) ~[na:1.8.0_292]
12/30 14:18:50
springboot-jl47-005
at java.awt.Font.getFont2D(Font.java:491) ~[na:1.8.0_292]
12/30 14:18:50
springboot-jl47-005
at java.awt.Font.access$000(Font.java:224) ~[na:1.8.0_292]
12/30 14:18:50
springboot-jl47-005
at java.awt.Font$FontAccessImpl.getFont2D(Font.java:228) ~[na:1.8.0_292]
12/30 14:18:50
springboot-jl47-005
at sun.font.FontUtilities.getFont2D(FontUtilities.java:180) ~[na:1.8.0_292]
12/30 14:18:50
springboot-jl47-005
at sun.font.StandardGlyphVector.initFontData(StandardGlyphVector.java:1126) ~[na:1.8.0_292]
12/30 14:18:50
springboot-jl47-005
at sun.font.StandardGlyphVector.init(StandardGlyphVector.java:1115) ~[na:1.8.0_292]
12/30 14:18:50
springboot-jl47-005
at sun.font.StandardGlyphVector.<init>(StandardGlyphVector.java:167) ~[na:1.8.0_292]
12/30 14:18:50
springboot-jl47-005
at java.awt.Font.createGlyphVector(Font.java:2549) ~[na:1.8.0_292]
12/30 14:18:50
springboot-jl47-005
at com.google.code.kaptcha.text.impl.DefaultWordRenderer.renderWord(DefaultWordRenderer.java:66) ~[kaptcha-2.3.2.jar!/:2.3.2]
12/30 14:18:50
springboot-jl47-005
at com.google.code.kaptcha.impl.DefaultKaptcha.createImage(DefaultKaptcha.java:43) ~[kaptcha-2.3.2.jar!/:2.3.2]
12/30 14:18:50
springboot-jl47-005
at com.example.demo.KaptchaController.kaptcha(KaptchaController.java:55) ~[classes!/:0.0.1-SNAPSHOT]
12/30 14:18:50
springboot-jl47-005
at sun.reflect.GeneratedMethodAccessor30.invoke(Unknown Source) ~[na:na]
12/30 14:18:50
springboot-jl47-005
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_292]
12/30 14:18:50
springboot-jl47-005
at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_292]
12/30 14:18:50
springboot-jl47-005
at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205) ~[spring-web-5.3.14.jar!/:5.3.14]
12/30 14:18:50
springboot-jl47-005
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:150) ~[spring-web-5.3.14.jar!/:5.3.14]
12/30 14:18:50
springboot-jl47-005
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:117) ~[spring-webmvc-5.3.14.jar!/:5.3.14]
更多
12/30 14:18:50
springboot-jl47-005
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895) ~[spring-webmvc-5.3.14.jar!/:5.3.14]
更多
12/30 14:18:50
springboot-jl47-005
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808) ~[spring-webmvc-5.3.14.jar!/:5.3.14]
更多
12/30 14:18:50
springboot-jl47-005
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87) ~[spring-webmvc-5.3.14.jar!/:5.3.14]
12/30 14:18:50
springboot-jl47-005
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1067) ~[spring-webmvc-5.3.14.jar!/:5.3.14]
在微信云托管里没有相关进入容器的地方啊
你好,需要安装下字体,RUN yum install dejavu-sans-fonts fontconfig -y