Access to com.sun.jndi.ldap.pool.Pool.map isn't synchronized in several executing paths: in methods toString(), showStats() and getPooledConnection(). In particular, this results in ConcurrentModificationException when debug information is on. Example of a stack trace with CME: Caused By: java.util.ConcurrentModificationException at java.util.WeakHashMap$HashIterator.nextEntry(WeakHashMap.java:882) at java.util.WeakHashMap$EntryIterator.next(WeakHashMap.java:921) at java.util.WeakHashMap$EntryIterator.next(WeakHashMap.java:919) at java.util.AbstractMap.toString(AbstractMap.java:518) at com.sun.jndi.ldap.pool.Pool.toString(Pool.java:229) at java.lang.String.valueOf(String.java:2849) at java.lang.StringBuilder.append(StringBuilder.java:128) at com.sun.jndi.ldap.pool.Pool.d(Pool.java:240) at com.sun.jndi.ldap.pool.Pool.getPooledConnection(Pool.java:120) at com.sun.jndi.ldap.LdapPoolManager.getLdapClient(LdapPoolManager.java:329) at com.sun.jndi.ldap.LdapClient.getInstance(LdapClient.java:1603) at com.sun.jndi.ldap.LdapCtx.connect(LdapCtx.java:2699) at com.sun.jndi.ldap.LdapCtx.<init>(LdapCtx.java:317)