Occasionally, we get a ConcurrentModificationException during JBoss classloading. This seems to be a similar issue as http://jira.jboss.com/jira/browse/JBJMX-45, which though is reported fixed. We experience the same behaviour as described in the last comment (http://jira.jboss.com/jira/browse/JBJMX-45#action_12349435) which was added recently (after the issue was closed). As already described there, the cause of the exception is a TreeSet returned by UnifiedLoaderRepository.getPackageClassLoaders that is iterated over in LoadMgr3.beginLoadTask.
What should we do with this? Would the easy fix of returning a copy of the set be a valid solution, or could this induce other problems, e.g. performance related? Should JBJMX-45 be re-opened, or should we create a new Jira issue?
Regards,
Peter.
Stacktrace:
java.util.ConcurrentModificationException
at java.util.TreeMap$PrivateEntryIterator.nextEntry(TreeMap.java:1031)
at java.util.TreeMap$KeyIterator.next(TreeMap.java:1058)
at org.jboss.mx.loading.LoadMgr3.beginLoadTask(LoadMgr3.java:221)
at org.jboss.mx.loading.RepositoryClassLoader.loadClassImpl(RepositoryClassLoader.java:464)
at org.jboss.mx.loading.RepositoryClassLoader.loadClass(RepositoryClassLoader.java:374)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:164)