Announcement Announcement Module
Collapse
No announcement yet.
Issue with DefaultDirContextValidator and search scope Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Issue with DefaultDirContextValidator and search scope

    I did a quick search, but didn't see this mentioned...

    I found a small issue with org.springframework.ldap.pool.validation.DefaultDi rContextValidator that will result in validateDirContext() failing for many/most LDAP implementations. The cause is that the root context search is being attempted with a search scope of SearchControls.ONELEVEL_SCOPE, the default scope when the scope isn't specified. This may succeed for some LDAP implementations (I think it should for Domino), but will fail for e.g., Active Directory and SunONE.

    The fix is to add
    Code:
    this.searchControls.setSearchScope(SearchControls.OBJECT_SCOPE);
    to the constructor. Already done in our DirContextValidator that's based on DefaultDirContextValidator, but changing the 'example code' might save someone a little frustration.

  • #2
    You're right, the default scope is ONELEVEL and a root DSE query with that surely fails on some servers. We're missing an integration test here. Good catch.

    Could you be so kind and create a JIRA issue about this?

    Comment


    • #3
      Thanks, and done: LDAP-121 in Jira.

      Comment


      • #4
        Do you know if this is fixed yet. I am getting an intermittent error as follows, which may be related. "Failed to borrow DirContext from pool.; nested exception is java.util.NoSuchElementException: Could not create a validated object"

        Comment


        • #5
          Originally posted by r.chick View Post
          Do you know if this is fixed yet. I am getting an intermittent error as follows, which may be related. "Failed to borrow DirContext from pool.; nested exception is java.util.NoSuchElementException: Could not create a validated object"
          More than a year later, I am getting the same issue. Has anyone had any luck with this error? My google searches are not revealing anything helpful so far.

          Comment

          Working...
          X