Remote Agent fails to launch as it does not have a no-args constructor

Still need help?

The Atlassian Community is here for you.

Ask the community

Symptoms

Bamboo agents fail to load successfully, and reports stacktraces similar to this:

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

 

Last modified on Nov 30, 2017

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.