首页 > 编程语言 > 详细

captcha报错java.lang.ArrayIndexOutOfBoundsException

时间:2018-09-17 11:09:50      阅读:328      评论:0      收藏:0      [点我收藏+]

*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

原文:https://www.cnblogs.com/shijunyu/p/9660787.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!