Return-Path: Delivered-To: apmail-directory-users-archive@www.apache.org Received: (qmail 32576 invoked from network); 15 Dec 2009 17:58:22 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 15 Dec 2009 17:58:22 -0000 Received: (qmail 75875 invoked by uid 500); 15 Dec 2009 17:58:22 -0000 Delivered-To: apmail-directory-users-archive@directory.apache.org Received: (qmail 75821 invoked by uid 500); 15 Dec 2009 17:58:21 -0000 Mailing-List: contact users-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@directory.apache.org Delivered-To: mailing list users@directory.apache.org Received: (qmail 75811 invoked by uid 99); 15 Dec 2009 17:58:21 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 Dec 2009 17:58:21 +0000 X-ASF-Spam-Status: No, hits=-1.8 required=10.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [204.80.56.9] (HELO nyslrs.osc.state.ny.us) (204.80.56.9) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 Dec 2009 17:58:12 +0000 X-Disclaimed: 5318 To: users@directory.apache.org Subject: APACHE DS 1.5.5 Embedded - Updating multi values attributes with nulls MIME-Version: 1.0 X-Mailer: Lotus Notes Release 7.0.2 September 26, 2006 Message-ID: From: RNakka@osc.state.ny.us Date: Tue, 15 Dec 2009 12:57:58 -0500 X-MIMETrack: Serialize by Router on SMTP/IRM/NYSLRS(Release 7.0.2FP2|May 14, 2007) at 12/15/2009 12:58:12 PM, Serialize complete at 12/15/2009 12:58:12 PM Content-Type: multipart/alternative; boundary="=_alternative 0062AD9B0525768D_=" X-Virus-Checked: Checked by ClamAV on apache.org --=_alternative 0062AD9B0525768D_= Content-Type: text/plain; charset="US-ASCII" 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 rnakka@osc.state.ny.us rameshbabu_nl@yahoo.com 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. --=_alternative 0062AD9B0525768D_=--