Closed
Description
I am using the following version of Java:
openjdk version "1.8.0_312"
OpenJDK Runtime Environment (build 1.8.0_312-8u312-b07-0ubuntu1~18.04-b07)
OpenJDK 64-Bit Server VM (build 25.312-b07, mixed mode)
When I make the following lookup using StartTLS with spring-ldap-core 2.3.1.RELEASE for a non existent dn:
DefaultTlsDirContextAuthenticationStrategy tlsAuthStratagy = new DefaultTlsDirContextAuthenticationStrategy();
tlsAuthStratagy.setShutdownTlsGracefully(true);
contextSource.setAuthenticationStrategy(tlsAuthStratagy);
PoolingContextSource poolingContextSource = new PoolingContextSource();
poolingContextSource.setMaxActive(5);
poolingContextSource.setContextSource(contextSource);
proxy = new TransactionAwareContextSourceProxy(poolingContextSource);
LdapTemplate ldapTemplate = new LdapTemplate(proxy);
ldapTemplate.lookup(dn);
I receive the following exception as expected:
org.springframework.ldap.NameNotFoundException
However, from spring-ldap-core 2.3.2.RELEASE and above, I received the following exception:
java.lang.reflect.UndeclaredThrowableException
This only happens when I attempt to use StartTLS ie. call setAuthenticationStrategy().