• Community
  • Questions
  • java.lang.StackOverflowError - Trying to build JIRA 5.1.6 from source

java.lang.StackOverflowError - Trying to build JIRA 5.1.6 from source

I keep getting an java.lang.StackOverflowError when I try to build JIRA 5.1.6 from source. This happens every time maven tries to build Atlassian JIRA - Plugins - OAuth Service Provider SPI. I have tried increasing my maven heap size in the mvn2.sh file to:

export MAVEN_OPTS=-Xmx4096m -XX:MaxPermSize=2048m

I have also placed the same line in my .bash_profile as well as the build.sh with no luck. I am on a Mac BookPro with 16 GB of RAM running Lion.

The trace is as follows:

INFO ------------------------------------------------------------------------

INFO Building Atlassian JIRA - Plugins - OAuth Service Provider SPI

INFO task-segment: clean, install

INFO ------------------------------------------------------------------------

INFO ------------------------------------------------------------------------


INFO ------------------------------------------------------------------------

INFO null

INFO ------------------------------------------------------------------------

INFO Trace


at java.io.InputStream.(InputStream.java:26)

at java.io.FileInputStream.(FileInputStream.java:142)

at java.lang.UNIXProcess$DeferredCloseInputStream.(UNIXProcess.java:161)

at java.lang.UNIXProcess$DeferredCloseInputStream.(UNIXProcess.java:156)

at java.lang.UNIXProcess$1.run(UNIXProcess.java:65)

at java.security.AccessController.doPrivileged(Native Method)

at java.lang.UNIXProcess.(UNIXProcess.java:60)

at java.lang.ProcessImpl.start(ProcessImpl.java:91)

at java.lang.ProcessBuilder.start(ProcessBuilder.java:453)

at java.lang.Runtime.exec(Runtime.java:593)

at java.lang.Runtime.exec(Runtime.java:431)

at java.lang.Runtime.exec(Runtime.java:328)

at org.codehaus.plexus.interpolation.os.OperatingSystemUtils.getSystemEnvVars(OperatingSystemUtils.java:83)

at org.codehaus.plexus.interpolation.EnvarBasedValueSource.(EnvarBasedValueSource.java:62)

at org.codehaus.plexus.interpolation.EnvarBasedValueSource.(EnvarBasedValueSource.java:47)

at org.apache.maven.profiles.activation.FileProfileActivator.isActive(FileProfileActivator.java:61)

at org.apache.maven.profiles.DefaultProfileManager.isActive(DefaultProfileManager.java:273)

at org.apache.maven.profiles.DefaultProfileManager.getActiveProfiles(DefaultProfileManager.java:209)

at org.apache.maven.project.DefaultMavenProjectBuilder.injectActiveProfiles(DefaultMavenProjectBuilder.java:1506)





at org.apache.maven.project.DefaultMavenProjectBuilder.assembleLineage(DefaultMavenProjectBuilder.java:1415)

at org.apache.maven.project.DefaultMavenProjectBuilder.assembleLineage(DefaultMavenProjectBuilder.java:1415)

INFO ------------------------------------------------------------------------

INFO Total time: 2 minutes 56 seconds

INFO Finished at: Wed Oct 10 23:52:13 EDT 2012

INFO Final Memory: 125M/478M

INFO ------------------------------------------------------------------------

3 answers

1 accepted

I solved my problem. Renjith told me that I may have a circular dependency somewhere so that got me thinking about the pom files. I just went through and downloaded each jar, pom and sha1 file to my local repository and that is what worked for me.

0 vote
Joseph Clark Atlassian Team Oct 10, 2012

The settings you have specified (-Xmx and -XX:MaxPermSize) both control memory allocation on the heap. However, the error message you are seeing is a stack overflow error. The size of the stack is not related to the amount of memory allocated to the heap - it's a separate config.

While the broader question of why your JIRA build is getting a stack overflow remains a mystery to me, you can try brute-forcing through this problem by beefing up your maximum stack size. Use the "-Xss" parameter for this.


export MAVEN_OPTS=-Xss32m

Thanks for the reply Joseph. I tried increasing the maximum stack size, but the build process still breaks at Building Atlassian JIRA - Plugins - OAuth Service Provider SPI. I also noticed that I while I did have jta1.0.1.jar I did not have the pom file in my local repo. Not sure where to go from here. How can I see OAuth Service Provider SPI dependencies.

This seems to be a bug in maven (both 2.0.11 and 2.2.1). Seen it with JIRA 5.2.10 myself again.

Suggest an answer

Log in or Join to answer
Community showcase
Jason Wong
Published yesterday in Agility Beta

Welcome to agility

Every team in the world is unique, and so   Atlassian believes   that each and every team's best way of working  needs to  be molded to their unique circumstances  – ...

333 views 6 15
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot