If you are getting a StackOverflowError your code is probably doing something wrong and most likely calling it self over and over again without breaking out of the pattern. This will require a change...