Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Find and count throw exception if base entry does not exist #8

Open
jgomer2001 opened this issue Oct 8, 2019 · 0 comments
Open

Find and count throw exception if base entry does not exist #8

jgomer2001 opened this issue Oct 8, 2019 · 0 comments
Assignees

Comments

@jgomer2001
Copy link
Contributor

Trying to compute the number of fido entries under a user branch, the following is raised:

org.gluu.persist.exception.EntryPersistenceException: Failed to calculate the number of entries with baseDN: ou=fido,inum=A8F2-DE1E.D7FB,ou=people,o=gluu, filter: (&(&(objectClass=organizationalUnit))(&(objectClass=top)(objectClass=organizationalUnit)))
	at org.gluu.persist.ldap.impl.LdapEntryManager.countEntries(LdapEntryManager.java:780) ~[oxcore-persistence-ldap-4.0.rc3.jar:?]
	at org.gluu.persist.ldap.impl.LdapEntryManager.countEntries(LdapEntryManager.java:734) ~[oxcore-persistence-ldap-4.0.rc3.jar:?]
	at org.gluu.persist.impl.BaseEntryManager.countEntries(BaseEntryManager.java:191) ~[oxcore-persistence-core-4.0.rc3.jar:?]
      ....
	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_222]
Caused by: org.gluu.persist.exception.operation.SearchException: Failed to scroll to specified start
	at org.gluu.persist.ldap.operation.impl.LdapOperationsServiceImpl.searchImpl(LdapOperationsServiceImpl.java:403) ~[oxcore-persistence-ldap-4.0.rc3.jar:?]
	at org.gluu.persist.ldap.operation.impl.LdapOperationsServiceImpl.search(LdapOperationsServiceImpl.java:305) ~[oxcore-persistence-ldap-4.0.rc3.jar:?]
	at org.gluu.persist.ldap.impl.LdapEntryManager.countEntries(LdapEntryManager.java:776) ~[oxcore-persistence-ldap-4.0.rc3.jar:?]
	... 95 more
Caused by: com.unboundid.ldap.sdk.LDAPSearchException: The search base entry 'ou=fido,inum=A8F2-DE1E.D7FB,ou=people,o=gluu' does not exist
	at com.unboundid.ldap.sdk.LDAPConnection.search(LDAPConnection.java:3772) ~[unboundid-ldapsdk-4.0.7.jar:4.0.7]
	at org.gluu.persist.ldap.operation.impl.LdapOperationsServiceImpl.searchImpl(LdapOperationsServiceImpl.java:373) ~[oxcore-persistence-ldap-4.0.rc3.jar:?]
	at org.gluu.persist.ldap.operation.impl.LdapOperationsServiceImpl.search(LdapOperationsServiceImpl.java:305) ~[oxcore-persistence-ldap-4.0.rc3.jar:?]
	at org.gluu.persist.ldap.impl.LdapEntryManager.countEntries(LdapEntryManager.java:776) ~[oxcore-persistence-ldap-4.0.rc3.jar:?]
	... 95 more

IMO that should not be an error: when the base of search does not exist, the call should return 0.

About the same applies for find:

org.gluu.persist.exception.EntryPersistenceException: Failed to find entries with baseDN: ou=fido2_register,inum=A8F2-DE1E.D7FB,ou=people,o=gluu, filter: (&(&(objectClass=oxFido2RegistrationEntry))(&(oxStatus=registered)(personInum=A8F2-DE1E.D7FB)))
	at org.gluu.persist.ldap.impl.LdapEntryManager.findEntries(LdapEntryManager.java:441) ~[oxcore-persistence-ldap-4.0.rc3.jar:?]
	at org.gluu.persist.impl.BaseEntryManager.findEntries(BaseEntryManager.java:150) ~[oxcore-persistence-core-4.0.rc3.jar:?]
	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_222]
Caused by: org.gluu.persist.exception.operation.SearchException: The search base entry 'ou=fido2_register,inum=A8F2-DE1E.D7FB,ou=people,o=gluu' does not exist
	at org.gluu.persist.ldap.operation.impl.LdapOperationsServiceImpl.searchImpl(LdapOperationsServiceImpl.java:427) ~[oxcore-persistence-ldap-4.0.rc3.jar:?]
	at org.gluu.persist.ldap.operation.impl.LdapOperationsServiceImpl.search(LdapOperationsServiceImpl.java:305) ~[oxcore-persistence-ldap-4.0.rc3.jar:?]
	at org.gluu.persist.ldap.impl.LdapEntryManager.findEntries(LdapEntryManager.java:438) ~[oxcore-persistence-ldap-4.0.rc3.jar:?]
	... 73 more
Caused by: com.unboundid.ldap.sdk.LDAPSearchException: The search base entry 'ou=fido2_register,inum=A8F2-DE1E.D7FB,ou=people,o=gluu' does not exist
	at com.unboundid.ldap.sdk.LDAPConnection.search(LDAPConnection.java:3772) ~[unboundid-ldapsdk-4.0.7.jar:4.0.7]
	at com.unboundid.ldap.sdk.AbstractConnectionPool.search(AbstractConnectionPool.java:2056) ~[unboundid-ldapsdk-4.0.7.jar:4.0.7]
	at org.gluu.persist.ldap.operation.impl.LdapOperationsServiceImpl.searchImpl(LdapOperationsServiceImpl.java:425) ~[oxcore-persistence-ldap-4.0.rc3.jar:?]
	at org.gluu.persist.ldap.operation.impl.LdapOperationsServiceImpl.search(LdapOperationsServiceImpl.java:305) ~[oxcore-persistence-ldap-4.0.rc3.jar:?]
	at org.gluu.persist.ldap.impl.LdapEntryManager.findEntries(LdapEntryManager.java:438) ~[oxcore-persistence-ldap-4.0.rc3.jar:?]
	... 73 more
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants