aspose file tools*
The moose likes Security and the fly likes LDAP Autnetication issue -  not an instance of DirContext Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Engineering » Security
Bookmark "LDAP Autnetication issue -  not an instance of DirContext" Watch "LDAP Autnetication issue -  not an instance of DirContext" New topic
Author

LDAP Autnetication issue - not an instance of DirContext

Prabhat Ranjan
Ranch Hand

Joined: Oct 04, 2006
Posts: 391
Hi All,

I am doing LDAP authentication using jsp and getting this error : not an instance of DirContext

why i am not sure but there is somthing realted to configuration, jar files and policy.

I have added fscontext.jar,ldap.jar,propertyUtils.jar in class path but still i am getting the same error while autehntication in DEBUG statement.

can some who have knowledge of the same issue please help me.

I am using Tomcat 6.0 and jdk 1.6

Regards,
Prabhat



Prabhat Ranjan
Ranch Hand

Joined: Oct 04, 2006
Posts: 391
tomcat 6.0 and jdk1.5
Tim McGuire
Ranch Hand

Joined: Apr 30, 2003
Posts: 820

Prabhat Ranjan wrote:Hi All,

I am doing LDAP authentication using jsp and getting this error : not an instance of DirContext

why i am not sure but there is somthing realted to configuration, jar files and policy.

I have added fscontext.jar,ldap.jar,propertyUtils.jar in class path but still i am getting the same error while autehntication in DEBUG statement.

can some who have knowledge of the same issue please help me.



It cannot find the context. Can you post the full text of the exception, the code that connects, and your context.xml ?
Prabhat Ranjan
Ranch Hand

Joined: Oct 04, 2006
Posts: 391
I got the fixed this issue and everything working fine.

Issue with Hashtable was not null and i was checking

if(hashEnv == null{

context ininit() ...and all here.

}

above if loop was not going through so while using the ctx object we are getting that error.
 
jQuery in Action, 2nd edition
 
subject: LDAP Autnetication issue - not an instance of DirContext