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.

[2003 byte] By [jcimsa] at [2007-10-3 5:15:10]
# 1
we are seeing the same exception with our jdk1.42 webapp when it tries to talk to our sendmail serverjava.net.SocketException: Operation already in progress
fletcher_cocquyta at 2007-7-14 23:21:46 > top of Java-index,Core,Core APIs...
# 2
Our developers fixed this by a code update.Basically they forced java to use a separate email thread for each session - resolving a concurrency issue with the resource.More details upon request :)Cheers,Fletch.
fletcher_cocquyta at 2007-7-14 23:21:46 > top of Java-index,Core,Core APIs...