java.net.SocketException (operation in progress) while using JNDI LDAP pool
Hi all.
We've been using the integrated JNDI LDAP connection pooling capability for a few months now, and I just started seeing these exceptions in our test environment. Does anyone know of a way to avoid them? They are transient and will go away on their own (indicating slow connection startup maybe?)
javax.naming.CommunicationException: ldap.server.com:4003 [Root exception is java.net.SocketException: Operation already in progress]
at com.sun.jndi.ldap.Connection.<init>(Connection.java:204)
at com.sun.jndi.ldap.LdapClient.<init>(LdapClient.java:119)
at com.sun.jndi.ldap.LdapClientFactory.createPooledConnection(LdapClientFactory.java:44)
at com.sun.jndi.ldap.pool.Connections.<init>(Connections.java:97)
at com.sun.jndi.ldap.pool.Pool.getPooledConnection(Pool.java:78)
at com.sun.jndi.ldap.LdapPoolManager.getLdapClient(LdapPoolManager.java:291)
at com.sun.jndi.ldap.LdapClient.getInstance(LdapClient.java:1662)
at com.sun.jndi.ldap.LdapCtx.connect(LdapCtx.java:2599)
at com.sun.jndi.ldap.LdapCtx.<init>(LdapCtx.java:290)
at com.sun.jndi.ldap.LdapCtxFactory.getUsingURL(LdapCtxFactory.java:175)
at com.sun.jndi.ldap.LdapCtxFactory.getUsingURLs(LdapCtxFactory.java:193)
at com.sun.jndi.ldap.LdapCtxFactory.getLdapCtxInstance(LdapCtxFactory.java:136)
at com.sun.jndi.ldap.LdapCtxFactory.getInitialContext(LdapCtxFactory.java:66)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:662)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243)
at javax.naming.InitialContext.init(InitialContext.java:219)
at javax.naming.InitialContext.<init>(InitialContext.java:195)
at javax.naming.directory.InitialDirContext.<init>(InitialDirContext.java:80)
As far as we can tell, there are no errors in the LDAP server itself.Connections do get closed and returned to the pool every time they are used.

