标签:autowire can methods block 程序 code 字体 dom sed
*captcha报错java.lang.ArrayIndexOutOfBoundsException
启动程序时发现了如下错误信息,纠结了好久
Caused by: java.lang.ArrayIndexOutOfBoundsException: 0
at sun.font.CompositeFont.getSlotFont(CompositeFont.java:375)
at sun.font.CompositeGlyphMapper.initMapper(CompositeGlyphMapper.java:81)
at sun.font.CompositeGlyphMapper.<init>(CompositeGlyphMapper.java:62)
at sun.font.CompositeFont.getMapper(CompositeFont.java:433)
at sun.font.CompositeFont.canDisplay(CompositeFont.java:459)
at java.awt.Font.canDisplay(Font.java:1980)
at com.octo.captcha.component.image.fontgenerator.RandomFontGenerator.checkFontCanDisplayCharacters(RandomFontGenerator.java:207)
at com.octo.captcha.component.image.fontgenerator.RandomFontGenerator.cleanFontList(RandomFontGenerator.java:163)
at com.octo.captcha.component.image.fontgenerator.RandomFontGenerator.initializeFonts(RandomFontGenerator.java:79)
at com.octo.captcha.component.image.fontgenerator.RandomFontGenerator.<init>(RandomFontGenerator.java:75)
at lac.framework.captcha.ImageCaptchaServiceBean.afterPropertiesSet(ImageCaptchaServiceBean.java:74)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1637)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1574)
... 35 more
后来查了一些资料,发现应该是部署的系统没有在使用验证码组件时使用的字体。。。
安装相应字体,就修复了。字体可以参照另一篇做记录的文章:Linux上安装字体
captcha报错java.lang.ArrayIndexOutOfBoundsException
标签:autowire can methods block 程序 code 字体 dom sed
原文地址:https://www.cnblogs.com/shijunyu/p/9660787.html