There could be two different problems:
1.) instead of
it's almost always better to use
2.) OutOfMemoryException: That's a serious issue and you must deal with it. On StackOverflow I've seen a discussion in this topic, here's the link: http://stackoverflow.com/questions/5...yerror-in-java
I think you should give more memory to the JVM.