My application uses 2 hashtables. After running for a while, both hashtables contain about 30.000 entries. Both hashtable have Strings for key, and CacheItems for values (containing 3 longs and 1 short).
Every 10 minutes, I make a backup of both hashtables, using 'clone'. After running for a couple of hours, cloning the second hashtable fails, with a stackoverflowerror. Stacktrace:
java.lang.StackOverflowError
at java.util.Hashtable$Entry.clone(Hashtable.java:860)
at java.util.Hashtable$Entry.clone(Hashtable.java:860)
at java.util.Hashtable$Entry.clone(Hashtable.java:860)
etc...
I use jdk1.4.1. I know Stackoverflows are usually caused by infinite loops, but I cannot find one (I didn't check the hashtable clone method though). Would it help to increase stacksize when starting
java (and how do I do that?)?
annekee