Bug 582471
| Summary: | PartialResultException when choosing particular Search Bases when using Active Directory | ||
|---|---|---|---|
| Product: | [Other] RHQ Project | Reporter: | Charles Crouch <ccrouch> |
| Component: | Core Server | Assignee: | Simeon Pinder <spinder> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Corey Welton <cwelton> |
| Severity: | medium | Docs Contact: | |
| Priority: | low | ||
| Version: | unspecified | CC: | hbrock, skondkar |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | 2.4 | Doc Type: | Bug Fix |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2010-08-12 16:45:54 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | |||
| Bug Blocks: | 577267 | ||
|
Description
Charles Crouch
2010-04-15 04:55:47 UTC
*** Bug 583748 has been marked as a duplicate of this bug. *** A few source code/issue resolution updates. 1)Setting referrals to 'ignore' resolves the initial java.net.UnknownHostException but then continuation exceptions ensue. -------------- EXCEPTION:Unprocessed Continuation Reference(s) javax.naming.PartialResultException: Unprocessed Continuation Reference(s); remaining name 'dc=ad, dc=analog, dc=com' at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2793) at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2767) at com.sun.jndi.ldap.LdapCtx.searchAux(LdapCtx.java:1821) at com.sun.jndi.ldap.LdapCtx.c_search(LdapCtx.java:1744) at com.sun.jndi.toolkit.ctx.ComponentDirContext.p_search(ComponentDirContext.java:368) at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.search(PartialCompositeDirContext.java:338) at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.search(PartialCompositeDirContext.java:321) at javax.naming.directory.InitialDirContext.search(InitialDirContext.java:248) at com.test.beans.LdapTest.test(LdapTest.java:131) at com.test.beans.LdapTest.main(LdapTest.java:30) ------- 2) This fix for these continuation exceptions is to use NamingEnumeration.hasMoreElements() instead of NamingEnumeration.hasMore() during search iteration. Fixing those references now exposes the following NPE when moving through the enumerations despite getting true from NamingEnumeration.hasMoreElements(): ------- Exception in thread "main" java.lang.NullPointerException at com.sun.jndi.ldap.LdapNamingEnumeration.getNextBatch(LdapNamingEnumeration.java:111) at com.sun.jndi.ldap.LdapNamingEnumeration.nextAux(LdapNamingEnumeration.java:245) at com.sun.jndi.ldap.LdapNamingEnumeration.nextImpl(LdapNamingEnumeration.java:236) at com.sun.jndi.ldap.LdapNamingEnumeration.next(LdapNamingEnumeration.java:184) at com.sun.jndi.ldap.LdapNamingEnumeration.nextElement(LdapNamingEnumeration.java:88) ------- 3) As above NPE is obviously caused by some nonexistent condition check in the sun ldap libraries, I modified the rhq code to detect that NPE in the few places in our code where it could occur and move on. After which another RHQ bug was encountered but the AD lists are now being populated as one would expect. Fixes committed and available in master build >= 241. git commit hash: e38d846200a6bee16b87f7e8c0fe4679ff01752a Verified in rhq build#241 (Revision: e38d846200a6bee16b87f7e8c0fe4679ff01752a) If the search base configured is at the higher level where the groups are created on active directory server (dc=test,dc=pnq,dc=com), the screen displays the list of available groups on active directory server and the ldap group mapping to rhq role is working. Mass-closure of verified bugs against JON. |