I thought I posted this question already but I can't find it in the mailing list.
Anyway, I think I've found an issue in ldaptive: when a problem occurs, the root exception is never reported back to the original call.
Let's take an example: I'm setting my ldap url to ldap://bidon, which will obviously not work.
When creating a BlockinConnectionPool, I get an IllegalStateException with the message: "Could not initialize pool size" and with no root cause.
ERROR o.l.p.BlockingConnectionPool - unable to connect to the ldap java.net.MalformedURLException: Not an LDAP URL: ladp://bidon
at com.sun.jndi.ldap.LdapURL.<init>(Unknown Source) ~[na:1.7.0_51]
at com.sun.jndi.ldap.LdapCtxFactory.getUsingURL(Unknown Source) ~[na:1.7.0_51]
at com.sun.jndi.ldap.LdapCtxFactory.getUsingURLs(Unknown Source) ~[na:1.7.0_51]
at com.sun.jndi.ldap.LdapCtxFactory.getLdapCtxInstance(Unknown Source) ~[na:1.7.0_51]
at com.sun.jndi.ldap.LdapCtxFactory.getInitialContext(Unknown Source) ~[na:1.7.0_51]
at javax.naming.spi.NamingManager.getInitialContext(Unknown Source) ~[na:1.7.0_51]
at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source) ~[na:1.7.0_51]
at javax.naming.InitialContext.init(Unknown Source) ~[na:1.7.0_51]
at javax.naming.ldap.InitialLdapContext.<init>(Unknown Source) ~[na:1.7.0_51]
Wrapped by: javax.naming.NamingException: Cannot parse url: ladp://bidon
at com.sun.jndi.ldap.LdapURL.<init>(Unknown Source) ~[na:1.7.0_51]
at com.sun.jndi.ldap.LdapCtxFactory.getUsingURL(Unknown Source) ~[na:1.7.0_51]
at com.sun.jndi.ldap.LdapCtxFactory.getUsingURLs(Unknown Source) ~[na:1.7.0_51]
at com.sun.jndi.ldap.LdapCtxFactory.getLdapCtxInstance(Unknown Source) ~[na:1.7.0_51]
at com.sun.jndi.ldap.LdapCtxFactory.getInitialContext(Unknown Source) ~[na:1.7.0_51]
at javax.naming.spi.NamingManager.getInitialContext(Unknown Source) ~[na:1.7.0_51]
at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source) ~[na:1.7.0_51]
at javax.naming.InitialContext.init(Unknown Source) ~[na:1.7.0_51]
at javax.naming.ldap.InitialLdapContext.<init>(Unknown Source) ~[na:1.7.0_51]
Wrapped by: org.ldaptive.provider.ConnectionException: javax.naming.NamingException: Cannot parse url: ladp://bidon [Root exception is java.net.MalformedURLException: Not an LDAP URL: ladp://bidon]
at org.ldaptive.provider.jndi.JndiConnectionFactory.createInternal(JndiConnectionFactory.java:86) ~[ldaptive-1.0.3-SNAPSHOT.jar:na]
at org.ldaptive.provider.jndi.JndiConnectionFactory.createInternal(JndiConnectionFactory.java:31) ~[ldaptive-1.0.3-SNAPSHOT.jar:na]
at org.ldaptive.provider.AbstractProviderConnectionFactory.create(AbstractProviderConnectionFactory.java:118) ~[ldaptive-1.0.3-SNAPSHOT.jar:na]
at org.ldaptive.DefaultConnectionFactory$DefaultConnection.open(DefaultConnectionFactory.java:295) ~[ldaptive-1.0.3-SNAPSHOT.jar:na]
at org.ldaptive.pool.AbstractConnectionPool.createConnection(AbstractConnectionPool.java:432) [ldaptive-1.0.3-SNAPSHOT.jar:na]
at org.ldaptive.pool.AbstractConnectionPool.createAvailableConnection(AbstractConnectionPool.java:453) [ldaptive-1.0.3-SNAPSHOT.jar:na]
at org.ldaptive.pool.AbstractConnectionPool.grow(AbstractConnectionPool.java:337) [ldaptive-1.0.3-SNAPSHOT.jar:na]
at org.ldaptive.pool.AbstractConnectionPool.initialize(AbstractConnectionPool.java:249) [ldaptive-1.0.3-SNAPSHOT.jar:na]
Thanks.