Java LDAP Connection With AD DS

I developed a web site to connect through ldap connection mechanism on AD DS windows server, but I'm getting an error called GSSAPI only this error, please someone can explain or give some help to connect with Active Directory through LDAP connection ?
Wesley CostaAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

John TsioumprisSoftware & Systems EngineerCommented:
Check this if it works for you
Wesley CostaAuthor Commented:
Hi John, thanks.. i have tried that last time but still not working
Wesley CostaAuthor Commented:
this is my code...

            String providerURL = obterParametro("providerURL");
            String securityAuthentication = obterParametro("securityAuthentication");
            String securityPrincipal = obterParametro("securityPrincipal");
            String propriedadeUsuario = obterParametro("propriedadeUsuario");

            Hashtable env = new Hashtable();
            env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");
            env.put(Context.SECURITY_AUTHENTICATION, securityAuthentication);
            env.put(Context.REFERRAL, "ignore");
            env.put("com.sun.jndi.ldap.connect.pool", "false");
            env.put("com.sun.jndi.ldap.connect.timeout", "300000");
            env.put(Context.PROVIDER_URL, providerURL);
            env.put(Context.SECURITY_PRINCIPAL, String.format(securityPrincipal, usuario));
            env.put(Context.SECURITY_CREDENTIALS, senha);


where

providerURL is ldap://192.168.1.7:389/
securityAuthentication is GSSAPI
securityPrincipal is the user login
Wesley CostaAuthor Commented:
I discovered that my linux server have to integrate with windows server AD. By doing this i solved my problem. Thank everyone for help !!! Look the reference http://blog.scottlowe.org/2007/07/09/linux-ad-integration-with-windows-server-2008/

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Java

From novice to tech pro — start learning today.