Some searches for user and operational attributes fail, if
denormalizeOpAttrsEnabled is enabled
-----------------------------------------------------------------------------------------------
Key: DIRSERVER-804
URL: http://issues.apache.org/jira/browse/DIRSERVER-804
Project: Directory ApacheDS
Issue Type: Bug
Affects Versions: 1.0.1
Environment: * ApacheDS 1.0.1 (SNAPSHOT)
* Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_07-b03)
* Windows XP Professional SP2
Reporter: Stefan Zoerner
Priority: Minor
If the property denormalizeOpAttrsEnabled is enabled in the server.xml
configuration,
<property name="denormalizeOpAttrsEnabled"><value>true</value></property>
some searches cause unknown errors.
Here is an example:
$ ldapsearch -h localhost -p 10389 -D "uid=admin,ou=system" -w secret -b
"ou=system" -s base "(ObjectClass=*)" * +
ldap_search: Unknown error
$
If the attribute sets "+" and "*" are used alone, no error occurs. And if
denormalizeOpAttrsEnabled is set to false (which is the default), no error
occurs as well with the "* +" combination.
After a change in the logging configuration, I learned that deep in the
OperationalAttributeService, a runtime exception occurs:
Caused by: java.lang.IllegalStateException: Cannot add duplicate to unordered
attribute
at javax.naming.directory.BasicAttribute.set(Unknown Source)
at
org.apache.directory.server.core.operational.OperationalAttributeService.denormalizeEntryOpAttrs(OperationalAttributeService.java:382)
at
org.apache.directory.server.core.operational.OperationalAttributeService.filterDenormalized(OperationalAttributeService.java:441)
at
org.apache.directory.server.core.operational.OperationalAttributeService.access$000(OperationalAttributeService.java:69)
at
org.apache.directory.server.core.operational.OperationalAttributeService$1.accept(OperationalAttributeService.java:78)
at
org.apache.directory.server.core.enumeration.SearchResultFilteringEnumeration.prefetch(SearchResultFilteringEnumeration.java:302)
at
org.apache.directory.server.core.enumeration.SearchResultFilteringEnumeration.<init>(SearchResultFilteringEnumeration.java:109)
at
org.apache.directory.server.core.operational.OperationalAttributeService.search(OperationalAttributeService.java:292)
at
org.apache.directory.server.core.interceptor.InterceptorChain$Entry$1.search(InterceptorChain.java:1263)
... 36 more
You find the complete log attached to this issue.
Btw: (for those who ask why I submit such an obscure search op): I orginally
faced this problem when using Softerra LDAP Administrator to browse the
directory. It caused ugly errors in the UI.
Finally I was able to figure out what it is all about. The original query by
the Softerra tool was:
$ ldapsearch -h localhost -p 10389 -D "uid=admin,ou=system" -w secret -b
"ou=system" -s base "(ObjectClass=*)" createtimestamp + * modifiersname
subschemasubentry modifytimestamp creatorsname hassubordinates
ldap_search: Unknown error
$
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira