Is there a limit to the number of classes my Java program can use?
We employ about 17,000 classes and receive OutOfMemory errors even when calls to the java system class' free memory method reports hundreds of MB are free.
17,000 classes? That's bull$hit.
Sounds like you may need to increase the maxpermsize JVM parameter if you are using the Sun JVM or a derivative.
Coherence: Clustered JCache for Grid Computing!