Bamboo Agent Throws java.lang.reflect.UndeclaredThrowableException

Still need help?

The Atlassian Community is here for you.

Ask the community

This KB article is not relevant to any version of Bamboo currently supported. If this fits your current installation, please consider upgrading Bamboo

Symptoms

Bamboo agent throws OOMEs and the following stacktrace:

java.lang.reflect.UndeclaredThrowableException
	at $Proxy0.toMessage(Unknown Source)
	at com.atlassian.bamboo.build.pipeline.concurrent.NamedThreadFactory$2.run(NamedThreadFactory.java:50)
	at java.lang.Thread.run(Thread.java:619)
...
Caused by: java.lang.reflect.InvocationTargetException
	at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at com.atlassian.bamboo.spring.LazyComponentProxyFactoryBean$LazyInvocationHandler.invoke(LazyComponentProxyFactoryBean.java:59)
Caused by: java.lang.OutOfMemoryError: Java heap space
...
	at com.thoughtworks.xstream.core.util.QuickWriter.flush(QuickWriter.java:73)
	at com.thoughtworks.xstream.core.util.QuickWriter.write(QuickWriter.java:49)
	at com.thoughtworks.xstream.io.xml.PrettyPrintWriter.writeText(PrettyPrintWriter.java:273)
	at com.thoughtworks.xstream.io.xml.PrettyPrintWriter.writeAttributeValue(PrettyPrintWriter.java:223)
	at com.thoughtworks.xstream.io.xml.PrettyPrintWriter.addAttribute(PrettyPrintWriter.java:218)
	at com.thoughtworks.xstream.io.WriterWrapper.addAttribute(WriterWrapper.java:41)
...

Cause

The build is producing massive amounts of log and this data needs to be serialized and transferred to the Bamboo server. At some point the agent is not able to fit in the memory and causes these errors.

Resolution

Theris problem was fixed in Bamboo 5.0 ( BAM-11899 - Getting issue details... STATUS ).

For older versions, please reduce the logged amount.

 

Last modified on Nov 30, 2017

Was this helpful?

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