Hi,
We are using APACHE DS 1.5.5 in embedded mode for testng tests. During
some of our tests , we are trying to update a User's multi valued
attributes
If we pass not null values, then the attributes are updated with out any
problem.But if we pass a null value or an empty list we get a null pointer
exception and the attribute is not updated. Please find the exception
trace attached below.
This was working in APACHE DS 1.5.4 ( NOT embedded version) server
We are using Spring LDAP 1.3 API to connect and perform operations on the
embedded APACHE DS from testng.
We tried two ways to update the multi valued attribute (email2) with a
null. Our goal is to not have any values in the multi valued attribute
(email2)
1. Trying to remove the attribute from user in APACHE DS, as its desired
to be null
DirContextOperations context;
context.removeAttributeValue("email2", oldValuesArray);
2. Trying to Pass an empty list to update the multi valued attribute. So
that the multivalued attribute becomes empty.
DirContextOperations context;
String[] userValArray = new String[0];
context.setAttributeValues("email2", userValArray);
In both the above cases we get a the below exception when we try to update
:
java.lang.NullPointerException
at
org.apache.directory.server.core.collective.CollectiveAttributesSchemaChecker.checkModify(CollectiveAttributesSchemaChecker.java:89)
at
org.apache.directory.server.core.collective.CollectiveAttributeInterceptor.modify(CollectiveAttributeInterceptor.java:358)
at
org.apache.directory.server.core.interceptor.InterceptorChain$Entry$1.modify(InterceptorChain.java:1216)
at
org.apache.directory.server.core.subtree.SubentryInterceptor.modify(SubentryInterceptor.java:1104)
at
org.apache.directory.server.core.interceptor.InterceptorChain$Entry$1.modify(InterceptorChain.java:1216)
at
org.apache.directory.server.core.schema.SchemaInterceptor.modify(SchemaInterceptor.java:1551)
at
org.apache.directory.server.core.interceptor.InterceptorChain$Entry$1.modify(InterceptorChain.java:1216)
at
org.apache.directory.server.core.operational.OperationalAttributeInterceptor.modify(OperationalAttributeInterceptor.java:209)
at
org.apache.directory.server.core.interceptor.InterceptorChain$Entry$1.modify(InterceptorChain.java:1216)
at
org.apache.directory.server.core.changelog.ChangeLogInterceptor.modify(ChangeLogInterceptor.java:225)
at
org.apache.directory.server.core.interceptor.InterceptorChain$Entry$1.modify(InterceptorChain.java:1216)
at
org.apache.directory.server.core.exception.ExceptionInterceptor.modify(ExceptionInterceptor.java:367)
at
org.apache.directory.server.core.interceptor.InterceptorChain$Entry$1.modify(InterceptorChain.java:1216)
at
org.apache.directory.server.core.authz.DefaultAuthorizationInterceptor.modify(DefaultAuthorizationInterceptor.java:273)
at
org.apache.directory.server.core.interceptor.InterceptorChain$Entry$1.modify(InterceptorChain.java:1216)
at
org.apache.directory.server.core.authz.AciAuthorizationInterceptor.modify(AciAuthorizationInterceptor.java:565)
at
org.apache.directory.server.core.interceptor.InterceptorChain$Entry$1.modify(InterceptorChain.java:1216)
at
org.apache.directory.server.core.referral.ReferralInterceptor.modify(ReferralInterceptor.java:403)
at
org.apache.directory.server.core.interceptor.InterceptorChain$Entry$1.modify(InterceptorChain.java:1216)
at
org.apache.directory.server.core.authn.AuthenticationInterceptor.modify(AuthenticationInterceptor.java:336)
at
org.apache.directory.server.core.interceptor.InterceptorChain$Entry$1.modify(InterceptorChain.java:1216)
at
org.apache.directory.server.core.normalization.NormalizationInterceptor.modify(NormalizationInterceptor.java:146)
at
org.apache.directory.server.core.interceptor.InterceptorChain.modify(InterceptorChain.java:821)
at
org.apache.directory.server.core.DefaultOperationManager.modify(DefaultOperationManager.java:691)
at
org.apache.directory.server.core.DefaultCoreSession.modify(DefaultCoreSession.java:829)
at
org.apache.directory.server.core.DefaultCoreSession.modify(DefaultCoreSession.java:815)
at
org.apache.directory.server.ldap.handlers.ModifyHandler.handle(ModifyHandler.java:56)
at
org.apache.directory.server.ldap.handlers.ModifyHandler.handle(ModifyHandler.java:39)
at
org.apache.directory.server.ldap.handlers.LdapRequestHandler.handleMessage(LdapRequestHandler.java:176)
at
org.apache.directory.server.ldap.handlers.LdapRequestHandler.handleMessage(LdapRequestHandler.java:56)
at
org.apache.mina.handler.demux.DemuxingIoHandler.messageReceived(DemuxingIoHandler.java:232)
at
org.apache.directory.server.ldap.LdapProtocolHandler.messageReceived(LdapProtocolHandler.java:194)
at
org.apache.mina.core.filterchain.DefaultIoFilterChain$TailFilter.messageReceived(DefaultIoFilterChain.java:721)
at
org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:433)
at
org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:47)
at
org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:801)
at
org.apache.mina.core.filterchain.IoFilterEvent.fire(IoFilterEvent.java:71)
at org.apache.mina.core.session.IoEvent.run(IoEvent.java:63)
at
org.apache.mina.filter.executor.UnorderedThreadPoolExecutor$Worker.runTask(UnorderedThreadPoolExecutor.java:480)
at
org.apache.mina.filter.executor.UnorderedThreadPoolExecutor$Worker.run(UnorderedThreadPoolExecutor.java:434)
Please advise us how to over come this problem, as we need to update the
multi valued attributes with nulls.
Ramesh Nakka
Websphere Portal Consultant
Mobile# 1-248 835 9758
Office# 1-518-408-4457
[email protected]
[email protected]
Notice: This communication, including any attachments, is intended solely
for the use of the individual or entity to which it is addressed. This
communication may contain information that is protected from disclosure
under State and/or Federal law. Please notify the sender immediately if
you have received this communication in error and delete this email from
your system. If you are not the intended recipient, you are requested not
to disclose, copy, distribute or take any action in reliance on the
contents of this information.