Secure connexion to LDAP wtih Groovy script

Hi,
I cannot use a secure connection via a Groovy script in an XWiki page.
I am trying to implement the startTLS() method of the com.novell.ldap.LDAPConnection library.
It never give any result and never stop without any log…
Here are some elements of my script:
{{groovy}}
import org.xwiki.velocity.tools.EscapeTool;
import org.xwiki.contrib.ldap.XWikiLDAPConfig;
import org.xwiki.contrib.ldap.XWikiLDAPConnection;
import org.xwiki.contrib.ldap.XWikiLDAPSearchAttribute;
import com.novell.ldap.LDAPConnection;
import java.io.;
import java.util.
;
import org.apache.commons.io.IOUtils;

def connection = new LDAPConnection();

try{
connection.connect(server, Integer.parseInt(port))
connection.startTLS()
connection.bind(LDAPConnection.LDAP_V3, binddn, bindpassword.getBytes(“UTF8”));
println "* Connexion établie "
} catch (e) {
println “* Erreur de connexion”
e.printStackTrace();
println(“Exception”)
println(e.getMessage())
println(org.apache.commons.lang.exception.ExceptionUtils.getStackTrace(e));
}

Same pb with Xwiki 14.10.16 or 14.10.5

Regards.

The only log i’ve found (catalina.org) :
java.lang.Throwable: null
at java.lang.Object.wait(Native Method) ~[?:?]
at java.lang.Object.wait(Object.java:328) ~[?:?]
at com.novell.ldap.MessageAgent.getLDAPMessage(MessageAgent.java:399) ~[?:?]
at com.novell.ldap.LDAPMessageQueue.getResponse(LDAPMessageQueue.java:175) ~[?:?]
at com.novell.ldap.LDAPMessageQueue.getResponse(LDAPMessageQueue.java:126) ~[?:?]
at com.novell.ldap.LDAPConnection.startTLS(LDAPConnection.java:825) ~[?:?]
at com.novell.ldap.LDAPConnection$startTLS$0.call(Unknown Source) ~[?:?]

Despite the “import com.novell.ldap.LDAPConnection;”