File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Spring and the fly likes Spring MVC and LdapTemplate Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Spring MVC and LdapTemplate" Watch "Spring MVC and LdapTemplate" New topic

Spring MVC and LdapTemplate

laura mccord
Ranch Hand

Joined: Feb 10, 2009
Posts: 108
I'm stuck on how to troubleshoot this issue. I am getting this error:

{"error":"Error invoking getPerson. [org.springframework.ldap.NameNotFoundException: [LDAP: error code 32 - No Such Object]; nested exception is javax.naming.NameNotFoundException: [LDAP: error code 32 - No Such Object]; remaining name ....

I have my contextSource defined

Then in my PersonService code I do my search like this:

Neither the ldapTemplate.lookup() or are working.

Yet, if I do this from the command works:

I feel like I am just not catching something obvious that maybe someone can point out that I forgot to do. So a second (or more) pair of eyes would help me.

Thanks so much
laura mccord
Ranch Hand

Joined: Feb 10, 2009
Posts: 108
I got it! Turned out it was a misspelling in my hard-coded search.

Thanks Anyway
I agree. Here's the link:
subject: Spring MVC and LdapTemplate
It's not a secret anymore!