码迷,mamicode.com
首页 > 编程语言 > 详细

captcha报错java.lang.ArrayIndexOutOfBoundsException

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

标签: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

(0)
(1)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!