Grails build fails - StackOverflowError

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

Grails build fails and Bamboo build logs show the following error:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 19-Nov-2012 16:35:57 Starting task 'Grails' of type 'com.atlassian.bamboo.plugins.bamboo-grails-plugin:grailsBuilderTaskType' 19-Nov-2012 16:35:57 Beginning to execute external process for build 'Proj10 - Plan10 - 10 - Default Job' ... running command line: E:\Team\grails-2.1.1\bin\grails.bat clean -non-interactive ... in: E:\bamboo\home\xml-data\build-dir\PROJ10-PLAN10-JOB1 ... using extra environment variables: JAVA_HOME=C:\Program Files\Java\jdk1.7.0_09 GRAILS_HOME=E:\Team\grails-2.1.1 Path=C:\Program Files\Java\jdk1.7.0_09\bin;..... 19-Nov-2012 16:36:00 19-Nov-2012 16:36:00 Exception: java.lang.StackOverflowError thrown from the UncaughtExceptionHandler in thread "main" 19-Nov-2012 16:36:00 Failing task since return code was 1 while expected 0

Cause

Bamboo is running as a Windows service without using a local Admin account.

Resolution

Stop Bamboo service and follow this document to run Bamboo service using a local Admin account.

Some helpful troubleshooting steps are:

  • Trying to run the same Grails task from command line (without using Bamboo), from the current working directory of the failing plan using the same user account that runs Bamboo instance.

  • Trying to run the same Grails commands from a Bamboo inline Script task using the absolute path for the Grails executable.

  • Checking if a remote agent is being used for running the plan. If yes, making sure that the remote agent is capable of running that plan and that the Grails executable exists on the machine where the remote agent is running.

Updated on April 8, 2025

Still need help?

The Atlassian Community is here for you.