Missing CAPTCHA image
プラットフォームについて: Server および Data Center のみ。この記事は、Server および Data Center プラットフォームのアトラシアン製品にのみ適用されます。
Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Fisheye および Crucible は除く
問題
The CAPTCHA image is not visible from the UI if a user provides too many incorrect passwords.
診断
The following error will be shown in the atlassian-bitbucket.log
file.
2017-09-27 10:22:10,063 ERROR [http-nio-7990-exec-563] *GVIXKXx622x2299588x6 an2yuk 127.0.0.1 "GET /captcha HTTP/1.1" c.a.s.i.w.HandlerExceptionResolverImpl Error creating bean with name 'imageCaptchaServicePrototype' defined in class path resource [stash-context.xml]: Cannot create inner bean 'com.atlassian.stash.internal.web.util.captcha.StashCaptchaEngine#59c71843' of type [com.atlassian.stash.internal.web.util.captcha.StashCaptchaEngine] while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.atlassian.stash.internal.web.util.captcha.StashCaptchaEngine#59c71843' defined in class path resource [stash-context.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.atlassian.stash.internal.web.util.captcha.StashCaptchaEngine]: Constructor threw exception; nested exception is java.lang.ArrayIndexOutOfBoundsException: 0
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'imageCaptchaServicePrototype' defined in class path resource [stash-context.xml]: Cannot create inner bean 'com.atlassian.stash.internal.web.util.captcha.StashCaptchaEngine#59c71843' of type [com.atlassian.stash.internal.web.util.captcha.StashCaptchaEngine] while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.atlassian.stash.internal.web.util.captcha.StashCaptchaEngine#59c71843' defined in class path resource [stash-context.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.atlassian.stash.internal.web.util.captcha.StashCaptchaEngine]: Constructor threw exception; nested exception is java.lang.ArrayIndexOutOfBoundsException: 0
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:313) ~[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE]
at com.atlassian.stash.internal.web.users.CaptchaController.viewCaptcha(CaptchaController.java:30) ~[classes/:na]
at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:24) [applinks-plugin-5.2.4_1483512906000.jar:na]
at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:24) [applinks-plugin-5.2.4_1483512906000.jar:na]
at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:24) [applinks-plugin-5.2.4_1483512906000.jar:na]
at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:24) [applinks-plugin-5.2.4_1483512906000.jar:na]
at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:24) [applinks-plugin-5.2.4_1483512906000.jar:na]
at com.atlassian.stash.internal.spring.security.StashAuthenticationFilter.doFilter(StashAuthenticationFilter.java:113) [classes/:na]
at com.atlassian.stash.internal.web.auth.BeforeLoginPluginAuthenticationFilter.doInsideSpringSecurityChain(BeforeLoginPluginAuthenticationFilter.java:109) [classes/:na]
at com.atlassian.stash.internal.web.auth.BeforeLoginPluginAuthenticationFilter.doFilter(BeforeLoginPluginAuthenticationFilter.java:75) [classes/:na]
at com.atlassian.security.auth.trustedapps.filter.TrustedApplicationsFilter.doFilter(TrustedApplicationsFilter.java:94) [atlassian-trusted-apps-core-4.2.0.jar:na]
at com.atlassian.oauth.serviceprovider.internal.servlet.OAuthFilter.doFilter(OAuthFilter.java:67) [atlassian-oauth-service-provider-plugin-2.0.3_1483512906000.jar:na]
at com.atlassian.security.auth.trustedapps.filter.TrustedApplicationsFilter.doFilter(TrustedApplicationsFilter.java:94) [atlassian-trusted-apps-core-4.2.0.jar:na]
at com.atlassian.oauth.serviceprovider.internal.servlet.OAuthFilter.doFilter(OAuthFilter.java:67) [atlassian-oauth-service-provider-plugin-2.0.3_1483512906000.jar:na]
at com.atlassian.core.filters.ServletContextThreadLocalFilter.doFilter(ServletContextThreadLocalFilter.java:21) [atlassian-core-4.6.19.jar:na]
at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31) [atlassian-core-4.6.19.jar:na]
at com.atlassian.plugin.connect.plugin.auth.user.ThreeLeggedAuthFilter.doFilter(ThreeLeggedAuthFilter.java:109) [atlassian-connect-plugin-1.1.86-bitbucket-04.jar:na]
at com.atlassian.jwt.internal.servlet.JwtAuthFilter.doFilter(JwtAuthFilter.java:32) [jwt-plugin-1.5.11-0002_1483512906000.jar:na]
at com.atlassian.analytics.client.filter.DefaultAnalyticsFilter.doFilter(DefaultAnalyticsFilter.java:38) [analytics-client-5.2.20_1483512906000.jar:na]
at com.atlassian.analytics.client.filter.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:39) [analytics-client-5.2.20_1483512906000.jar:na]
at com.atlassian.stash.internal.web.auth.BeforeLoginPluginAuthenticationFilter.doBeforeBeforeLoginFilters(BeforeLoginPluginAuthenticationFilter.java:87) [classes/:na]
at com.atlassian.stash.internal.web.auth.BeforeLoginPluginAuthenticationFilter.doFilter(BeforeLoginPluginAuthenticationFilter.java:73) [classes/:na]
at com.atlassian.stash.internal.request.DefaultRequestManager.doAsRequest(DefaultRequestManager.java:86) ~[bitbucket-service-impl-4.12.1.jar:na]
at com.atlassian.stash.internal.hazelcast.ConfigurableWebFilter.doFilter(ConfigurableWebFilter.java:38) ~[classes/:na]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[na:1.8.0_141]
at java.lang.Thread.run(Thread.java:748) ~[na:1.8.0_141]
... 267 frames trimmed
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.atlassian.stash.internal.web.util.captcha.StashCaptchaEngine#59c71843' defined in class path resource [stash-context.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.atlassian.stash.internal.web.util.captcha.StashCaptchaEngine]: Constructor threw exception; nested exception is java.lang.ArrayIndexOutOfBoundsException: 0
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1105) ~[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE]
... 26 common frames omitted
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.atlassian.stash.internal.web.util.captcha.StashCaptchaEngine]: Constructor threw exception; nested exception is java.lang.ArrayIndexOutOfBoundsException: 0
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:154) ~[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE]
... 26 common frames omitted
Caused by: java.lang.ArrayIndexOutOfBoundsException: 0
at sun.font.CompositeFont.getSlotFont(CompositeFont.java:351) ~[na:1.8.0_141]
at sun.font.CompositeGlyphMapper.initMapper(CompositeGlyphMapper.java:81) ~[na:1.8.0_141]
at sun.font.CompositeGlyphMapper.<init>(CompositeGlyphMapper.java:62) ~[na:1.8.0_141]
at sun.font.CompositeFont.getMapper(CompositeFont.java:409) ~[na:1.8.0_141]
at sun.font.CompositeFont.canDisplay(CompositeFont.java:435) ~[na:1.8.0_141]
at java.awt.Font.canDisplay(Font.java:1980) ~[na:1.8.0_141]
at com.octo.captcha.component.image.fontgenerator.RandomFontGenerator.checkFontCanDisplayCharacters(RandomFontGenerator.java:223) ~[jcaptcha-2.0-alpha-1.jar:na]
at com.octo.captcha.component.image.fontgenerator.RandomFontGenerator.cleanFontList(RandomFontGenerator.java:179) ~[jcaptcha-2.0-alpha-1.jar:na]
at com.octo.captcha.component.image.fontgenerator.RandomFontGenerator.initializeFonts(RandomFontGenerator.java:94) ~[jcaptcha-2.0-alpha-1.jar:na]
at com.octo.captcha.component.image.fontgenerator.RandomFontGenerator.<init>(RandomFontGenerator.java:81) ~[jcaptcha-2.0-alpha-1.jar:na]
at com.atlassian.stash.internal.web.util.captcha.StashCaptchaEngine.buildInitialFactories(StashCaptchaEngine.java:47) ~[classes/:na]
at com.octo.captcha.engine.image.ListImageCaptchaEngine.<init>(ListImageCaptchaEngine.java:24) ~[jcaptcha-2.0-alpha-1.jar:na]
at com.atlassian.stash.internal.web.util.captcha.StashCaptchaEngine.<init>(StashCaptchaEngine.java:29) ~[classes/:na]
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:142) ~[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE]
... 26 common frames omitted
原因
This is an OS or Java related bug/ problem. Some common causes are a RedHat Bug 1479563 or a missing fonts packages.
回避策
Disable CAPTCHA for the time being by adding feature.auth.captcha=false
to the bitbucket.properties
. Note this change will require a restart. There are a few other workarounds listed in this StackOverflow article as well.
ソリューション
Check with your Unix Admins to see if you're being effected by Bug 1479563 or missing a fonts package.