Remote Agent fails to launch as it does not have a no-args constructor
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
Symptoms
Bamboo agents fail to load successfully, and reports stacktraces similar to this:
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
2012-07-04 11:39:05,506 FATAL [Thread-1] [AgentBootstrap] Exiting due to fatal exception.
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'eventManager' defined in class path resource [applicationContextRemoteAgentStartupCore.xml]: Cannot create inner bean 'com.atlassian.bamboo.v2.build.agent.remote.event.KillAgentOnFingerprintMismatchListener#63eaebdd' of type [com.atlassian.bamboo.v2.build.agent.remote.event.KillAgentOnFingerprintMismatchListener] while setting bean property 'defaultListeners' with key [TypedStringValue: value [verifySameServerOnServerStartedEventListener], target type [null]]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.atlassian.bamboo.v2.build.agent.remote.event.KillAgentOnFingerprintMismatchListener#63eaebdd' defined in class path resource [applicationContextRemoteAgentStartupCore.xml]: Cannot resolve reference to bean 'executableBuildAgent' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'agentRegistrationBean' defined in class path resource [applicationContextRemoteAgentStartup.xml]: Invocation of init method failed; nested exception is com.thoughtworks.xstream.converters.ConversionException: Cannot construct com.atlassian.bamboo.v2.build.agent.RemoteAgentDefinitionImpl$1 as it does not have a no-args constructor : Cannot construct com.atlassian.bamboo.v2.build.agent.RemoteAgentDefinitionImpl$1 as it does not have a no-args constructor
---- Debugging information ----
message : Cannot construct com.atlassian.bamboo.v2.build.agent.RemoteAgentDefinitionImpl$1 as it does not have a no-args constructor
cause-exception : com.thoughtworks.xstream.converters.reflection.ObjectAccessException
cause-message : Cannot construct com.atlassian.bamboo.v2.build.agent.RemoteAgentDefinitionImpl$1 as it does not have a no-args constructor
class : org.springframework.remoting.support.RemoteInvocationResult
required-type : com.atlassian.bamboo.v2.build.agent.RemoteAgentDefinitionImpl$1
path : /result/value/capabilityProperties
line number : 7
-------------------------------
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.atlassian.bamboo.v2.build.agent.remote.event.KillAgentOnFingerprintMismatchListener#63eaebdd' defined in class path resource [applicationContextRemoteAgentStartupCore.xml]: Cannot resolve reference to bean 'executableBuildAgent' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'agentRegistrationBean' defined in class path resource [applicationContextRemoteAgentStartup.xml]: Invocation of init method failed; nested exception is com.thoughtworks.xstream.converters.ConversionException: Cannot construct com.atlassian.bamboo.v2.build.agent.RemoteAgentDefinitionImpl$1 as it does not have a no-args constructor : Cannot construct com.atlassian.bamboo.v2.build.agent.RemoteAgentDefinitionImpl$1 as it does not have a no-args constructor
---- Debugging information ----
message : Cannot construct com.atlassian.bamboo.v2.build.agent.RemoteAgentDefinitionImpl$1 as it does not have a no-args constructor
cause-exception : com.thoughtworks.xstream.converters.reflection.ObjectAccessException
cause-message : Cannot construct com.atlassian.bamboo.v2.build.agent.RemoteAgentDefinitionImpl$1 as it does not have a no-args constructor
class : org.springframework.remoting.support.RemoteInvocationResult
required-type : com.atlassian.bamboo.v2.build.agent.RemoteAgentDefinitionImpl$1
path : /result/value/capabilityProperties
line number : 7
-------------------------------
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'agentRegistrationBean' defined in class path resource [applicationContextRemoteAgentStartup.xml]: Invocation of init method failed; nested exception is com.thoughtworks.xstream.converters.ConversionException: Cannot construct com.atlassian.bamboo.v2.build.agent.RemoteAgentDefinitionImpl$1 as it does not have a no-args constructor : Cannot construct com.atlassian.bamboo.v2.build.agent.RemoteAgentDefinitionImpl$1 as it does not have a no-args constructor
---- Debugging information ----
message : Cannot construct com.atlassian.bamboo.v2.build.agent.RemoteAgentDefinitionImpl$1 as it does not have a no-args constructor
cause-exception : com.thoughtworks.xstream.converters.reflection.ObjectAccessException
cause-message : Cannot construct com.atlassian.bamboo.v2.build.agent.RemoteAgentDefinitionImpl$1 as it does not have a no-args constructor
class : org.springframework.remoting.support.RemoteInvocationResult
required-type : com.atlassian.bamboo.v2.build.agent.RemoteAgentDefinitionImpl$1
path : /result/value/capabilityProperties
line number : 7
-------------------------------
Caused by: com.thoughtworks.xstream.converters.ConversionException: Cannot construct com.atlassian.bamboo.v2.build.agent.RemoteAgentDefinitionImpl$1 as it does not have a no-args constructor : Cannot construct com.atlassian.bamboo.v2.build.agent.RemoteAgentDefinitionImpl$1 as it does not have a no-args constructor
---- Debugging information ----
message : Cannot construct com.atlassian.bamboo.v2.build.agent.RemoteAgentDefinitionImpl$1 as it does not have a no-args constructor
cause-exception : com.thoughtworks.xstream.converters.reflection.ObjectAccessException
cause-message : Cannot construct com.atlassian.bamboo.v2.build.agent.RemoteAgentDefinitionImpl$1 as it does not have a no-args constructor
class : org.springframework.remoting.support.RemoteInvocationResult
required-type : com.atlassian.bamboo.v2.build.agent.RemoteAgentDefinitionImpl$1
path : /result/value/capabilityProperties
line number : 7
-------------------------------
at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:89)
at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:63)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:76)
at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshallField(AbstractReflectionConverter.java:246)
at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.doUnmarshal(AbstractReflectionConverter.java:218)
at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshal(AbstractReflectionConverter.java:162)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:82)
at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:63)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:76)
at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshallField(AbstractReflectionConverter.java:246)
at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.doUnmarshal(AbstractReflectionConverter.java:218)
at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshal(AbstractReflectionConverter.java:162)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:82)
at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:63)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:76)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:60)
at com.thoughtworks.xstream.core.TreeUnmarshaller.start(TreeUnmarshaller.java:137)
at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.unmarshal(AbstractTreeMarshallingStrategy.java:33)
at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:923)
at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:909)
at com.thoughtworks.xstream.XStream.fromXML(XStream.java:853)
at com.thoughtworks.xstream.XStream.fromXML(XStream.java:845)
at org.logicblaze.lingo.jms.marshall.XStreamMarshaller.fromXML(XStreamMarshaller.java:110)
at org.logicblaze.lingo.jms.marshall.XStreamMarshaller.extractInvocationResult(XStreamMarshaller.java:57)
at org.logicblaze.lingo.jms.JmsClientInterceptor.invoke(JmsClientInterceptor.java:139)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at $Proxy6.registerAgent(Unknown Source)
at com.atlassian.bamboo.v2.build.agent.remote.AgentRegistrationBean.registerAgent(AgentRegistrationBean.java:41)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1237)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1203)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1167)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:427)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:249)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:155)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:246)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:339)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:249)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:155)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:246)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:339)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:249)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:155)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:246)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:267)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:110)
at org.springframework.beans.factory.support.ConstructorResolver.resolveConstructorArguments(ConstructorResolver.java:389)
at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:120)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:795)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:713)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:386)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:216)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:123)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveManagedMap(BeanDefinitionValueResolver.java:320)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:140)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1095)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:857)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:423)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:249)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:155)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:246)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:248)
at org.springframework.context.support.AbstractApplicationContext.getBeansOfType(AbstractApplicationContext.java:796)
at org.springframework.context.support.AbstractApplicationContext.registerListeners(AbstractApplicationContext.java:592)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:349)
at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:122)
at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:88)
at com.atlassian.bamboo.v2.build.agent.remote.RemoteAgent.initApplicationContext(RemoteAgent.java:163)
at com.atlassian.bamboo.v2.build.agent.remote.RemoteAgent.start(RemoteAgent.java:58)
at com.atlassian.bamboo.agent.bootstrap.AgentRunner.run(AgentRunner.java:20)
at java.lang.Thread.run(Unknown Source)
Caused by: com.thoughtworks.xstream.converters.reflection.ObjectAccessException: Cannot construct com.atlassian.bamboo.v2.build.agent.RemoteAgentDefinitionImpl$1 as it does not have a no-args constructor
at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.newInstance(PureJavaReflectionProvider.java:71)
at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.instantiateNewInstance(AbstractReflectionConverter.java:308)
at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshal(AbstractReflectionConverter.java:161)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:82)
Cause
The JDK being used on the machine where the Remote Agent is installed is not supported by the version of Bamboo being run.
Resolution
Ensure that the JDK version is supported by Bamboo. Please see our Supported platforms page for which versions are supported.
JDK 1.6 is supported up to Bamboo 5.7
JDK 1.7 is supported by Bamboo 3.3 to 5.7
JDK 1.8 is supported by Bamboo 5.8 and above
Was this helpful?