I’ve been working on building a fairly large Model-Glue application and it’s been up and running for going on 4 months. Yesterday I was working on some of the planned enhancements when I ran into a 500 ROOT CAUSE: java.lang.StackOverflowError problem. I’ve tracked it down to one instance of adding one referenced bean onto one of my service instances. I can comment out the bean and everything compiles. I can change it to one of my DAO beans and it works, I change it to another of my service beans and it causes the StackOverflowError again.
I have moved some of the ColdSpring.xml out to includes to reduce the file size and that has had no effect. I updated to 1.2 and had no change either. I’ve seen some minor changes in the rest of the error stack when I change up the service I’m including, but it’s more often than not this as the next couple lines:
at coldfusion.runtime.LocalScope.bindInternal(LocalScope.java:373) at coldfusion.runtime.LocalScope.bindInternal(LocalScope.java:387) at cfAbstractBeanFactory2ecfc1246833417$funcRESOLVEBEANNAME.runFunction(coldspringbeansAbstractBeanFactory.cfc:193) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:418) at coldfusion.filter.SilentFilter.invoke(SilentFilter.java:47) at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:360) at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:324) at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:59) at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:277) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:192) at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:2471)
followed by a repeating of the above with several other calls to the cfAbstractBeanFactory instance. I know I’m not providing much, but I’m absolutely stumped as to what can be causing the problem. The bean I am adding that causes the error is also used as a ref bean on another bean without causing the problem. Any ideas that I could poke around at would be much appreciated!


Probably too late a reply to be useful, but I recently got this error because of recursive dependies in the coldspinng xml file.
Yeah – I tracked down some of that too – but even with the recursion removed, it still pops up occasionally for this website. I think the recursion just opened up a door into an abyss for me that I’ve had to find my way through.
Recently, we increased the Heap size of the JVM on this particular server and that seems to have helped with it as well.
Here is a thought:
http://boncode.blogspot.com/2011/04/cf-coldfusion-javalangstackoverflowerro.html
That’s definitely a good point as well. Could be an alternate idea of why the StackOverflowError is happening. Man that one is a joy to track down.