Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

LDAP Autnetication issue - not an instance of DirContext

 
Prabhat Ranjan
Ranch Hand
Posts: 397
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 397
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
tomcat 6.0 and jdk1.5
 
Tim McGuire
Ranch Hand
Posts: 820
IntelliJ IDE Tomcat Server VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 397
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic