users@glassfish.java.net

How do I get a servlet to initate an SSL connections w/GlassFish

From: <glassfish_at_javadesktop.org>
Date: Wed, 17 Oct 2007 10:29:29 PDT

Hi,

I have a servlet that makes secure connections to ActiveDirectory and I have a certificate generated by the windows domain server that enables me to make those connections. The certificate is stored in ${JAVA_HOME}/jre/lib/security/cacerts. When I run this particular servlet in Tomcat, the secured connection gets made and everything works. The exact same servlet, when deployed to GlassFish fails to bind. I've included the stacktrace down to where my servlet attempts to bind to ActiveDirectory:

09:43:39 17 Oct 2007 (PublicFolderManagerWorker.java:87) -- Bind failed: simple bind failed: loki.catnet.wfo.linfield.edu:636
        com.sun.jndi.ldap.LdapClient.authenticate(LdapClient.java:197)
        com.sun.jndi.ldap.LdapCtx.connect(LdapCtx.java:2658)
        com.sun.jndi.ldap.LdapCtx.<init>(LdapCtx.java:287)
        com.sun.jndi.ldap.LdapCtxFactory.getUsingURL(LdapCtxFactory.java:175)
        com.sun.jndi.ldap.LdapCtxFactory.getUsingURLs(LdapCtxFactory.java:193)
        com.sun.jndi.ldap.LdapCtxFactory.getLdapCtxInstance(LdapCtxFactory.java:136)
        com.sun.jndi.ldap.LdapCtxFactory.getInitialContext(LdapCtxFactory.java:66)
        javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
        javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
        javax.naming.InitialContext.init(InitialContext.java:223)
        javax.naming.InitialContext.<init>(InitialContext.java:197)
       javax.naming.directory.InitialDirContext.<init>(InitialDirContext.java:82)
org.linfield.publicFolderManager.workers.PublicFolderManagerWorker.connectToActiveDirectory(PublicFolderManagerWorker.java:81)
[Message sent by forum member 'caspersgrin' (caspersgrin)]

http://forums.java.net/jive/thread.jspa?messageID=240715