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 ------------------------------------------------------------------------

ERROR FATAL ERROR

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

INFO null

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

INFO Trace

java.lang.StackOverflowError

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

This widget could not be displayed.

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.

This widget could not be displayed.
Joe 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.

eg.

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.

In Windows:

set MAVEN_OPTS="-Xss32m"

You can create Environment variable with name: MAVEN_OPTS and value:  -Xss32m

This widget could not be displayed.

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 Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Wednesday in New to Jira

Are you planning to trial, or are currently trialling Jira Software? - We want to talk to you!

Hello! I'm Rayen, a product manager at Atlassian. My team and I are working hard to improve the trial experience for Jira Software Cloud. We are interested in   talking to 20 people planning t...

229 views 3 0
Join discussion

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