Captcha reports an error java.lang.arrayindexoutofboundsexception

*Captcha reports an error java.lang.arrayindexoutofboundsexception

The following error message was found when starting the program, which has been tangled for a long time

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

Later, I checked some data and found that the deployed system did not use the font when using the verification code component
install the corresponding font and fix it. Fonts can refer to another documented article: installing fonts on Linux

Similar Posts: