Captcha Image Missing - Bamboo Login Screen
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. 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.
*Except Fisheye and Crucible
Problem
Captcha Image is failed to load in the Browser UI and hence resulting in a user unable to login. Captcha is shown when a user has made too many failed login attempts.
The following appears in the "atlassian-bamboo.log":
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
2018-03-29 09:40:36,662 INFO [http-nio-8443-exec-19] [AccessLogFilter] 10.66.58.175 POST https://bamboo.com/userlogin.action 1259577kb
2018-03-29 09:40:36,942 INFO [http-nio-8443-exec-14] [AccessLogFilter] 10.66.58.175 GET https://bamboo.com/captcha?atl_token=2064812985756a 1249965kb
2018-03-29 09:40:37,540 INFO [http-nio-8443-exec-26] [AccessLogFilter] 10.66.58.175 GET https://bamboo.com/about.action 1227950kb
2018-03-29 09:40:37,942 ERROR [http-nio-8443-exec-14] [FiveOhOh] 500 Exception was thrown.
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'imageCaptchaService' defined in class path resource [applicationContextCaptcha.xml]: Cannot resolve reference to bean 'captchaEngine' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'captchaEngine' defined in class path resource [applicationContextCaptcha.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.octo.captcha.engine.image.gimpy.DefaultGimpyEngine]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: Could not initialize class sun.awt.X11GraphicsEnvironment
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:359)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:108)
at org.springframework.beans.factory.support.ConstructorResolver.resolveConstructorArguments(ConstructorResolver.java:648)
at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:145)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1193)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1095)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:513)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:208)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1138)
at org.springframework.context.annotation.ContextAnnotationAutowireCandidateResolver$1.getTarget(ContextAnnotationAutowireCandidateResolver.java:83)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:192)
at com.sun.proxy.$Proxy1447.getImageChallengeForID(Unknown Source)
at com.atlassian.bamboo.servlet.BambooCaptchaServlet.getCaptchaImage(BambooCaptchaServlet.java:74)
at com.atlassian.bamboo.servlet.BambooCaptchaServlet.doGet(BambooCaptchaServlet.java:50)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:622)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:39)
Caused By:
1
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.octo.captcha.engine.image.gimpy.DefaultGimpyEngine]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: Could not initialize class sun.awt.X11GraphicsEnvironment
Cause
The following could be the possible causes:
Unsupported JDK.
The server is headless which means that there is no graphics environment to load the captcha service.
Workaround
Disable the Captcha Verification and then try to log in.
Steps:
Stop Bamboo
Edit the "<bamboo_home>/xml-data/configuration/administration.xml" file and you will see a block:
1 2 3 4 5
<captchaConfiguration> <enableCaptcha>true</enableCaptcha> <enableCaptchaOnSignup>true</enableCaptchaOnSignup> <maxLoginAttempts>3</maxLoginAttempts> </captchaConfiguration>
Change it to:
1 2 3 4 5
<captchaConfiguration> <enableCaptcha>false</enableCaptcha> <enableCaptchaOnSignup>true</enableCaptchaOnSignup> <maxLoginAttempts>3</maxLoginAttempts> </captchaConfiguration>
Restart Bamboo and try to login again.
Resolution
Check and confirm if you are using the correct Java Version as per your Bamboo Version. See this for more info - Bamboo Supported Platforms
Verify from your system information page whether you have this environment variable set:
1
-Djava.awt.headless=true
Was this helpful?