From users-return-3736-apmail-directory-users-archive=directory.apache.org@directory.apache.org Wed Feb 23 08:50:00 2011 Return-Path: Delivered-To: apmail-directory-users-archive@www.apache.org Received: (qmail 74826 invoked from network); 23 Feb 2011 08:50:00 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 23 Feb 2011 08:50:00 -0000 Received: (qmail 16225 invoked by uid 500); 23 Feb 2011 08:50:00 -0000 Delivered-To: apmail-directory-users-archive@directory.apache.org Received: (qmail 16000 invoked by uid 500); 23 Feb 2011 08:49:57 -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 15992 invoked by uid 99); 23 Feb 2011 08:49:56 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 Feb 2011 08:49:56 +0000 X-ASF-Spam-Status: No, hits=0.9 required=5.0 tests=MAY_BE_FORGED,RCVD_IN_DNSWL_NONE,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [62.161.7.2] (HELO smtp-out04.msg.oleane.net) (62.161.7.2) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 Feb 2011 08:49:49 +0000 Received: from smtp02.msg.oleane.net (smtp02.mail.priv [172.17.20.111]) by smtp-out04.msg.oleane.net with ESMTP id p1N8nQiU016440 for ; Wed, 23 Feb 2011 09:49:26 +0100 Received: from smtp02.msg.oleane.net (localhost [127.0.0.1]) by smtp02.msg.oleane.net (MTA-AV) with ESMTP id p1N8nNV5025427 for ; Wed, 23 Feb 2011 09:49:23 +0100 Received: from srv-mes-01.bf_bfm.giems.fr (Microservice.rain.fr [194.250.68.154] (may be forged)) by smtp02.msg.oleane.net (MTA) with ESMTP id p1N8nE5O024773 for ; Wed, 23 Feb 2011 09:49:18 +0100 X-Oleane-Rep: REPA Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-MimeOLE: Produced By Microsoft Exchange V6.5 Subject: RE: Querying Apache DS via .NET C# DirectorySearcher Date: Wed, 23 Feb 2011 09:49:13 +0100 Message-ID: <430DFBEF10F86D45842B2C6C080AF1C70603777D@srv-mes-01.bf_bfm.giems.fr> In-Reply-To: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Querying Apache DS via .NET C# DirectorySearcher Thread-Index: AcvSzPtyPYodDe9eQlOANJqmkQ8nTAAZ6F9w References: <430DFBEF10F86D45842B2C6C080AF1C706037778@srv-mes-01.bf_bfm.giems.fr> From: "Laporte Sylvain (GIE)" To: X-PMX-Spam: Probability=8% X-PFSI-Info: PMX 5.5.9.395186, Antispam-Engine: 2.7.2.376379, Antispam-Data: 2011.2.23.83915 (no virus found) X-Old-Spam-Flag: NO Hi, Thanks for your reply. We are using v1.5.7 with Java 1.6 update 23 When talking about "an old issue related to sub level searching on = RootDSE", do you think that restricting the search on the OU or at least = on the domain could help solve the problem? Thanks -----Message d'origine----- De=A0: ayyagarikiran@gmail.com [mailto:ayyagarikiran@gmail.com] De la = part de Kiran Ayyagari Envoy=E9=A0: mardi 22 f=E9vrier 2011 21:13 =C0=A0: users@directory.apache.org Objet=A0: Re: Querying Apache DS via .NET C# DirectorySearcher hi Laporte, Which version you are using? I guess you are encountering an old issue = related to sub level searching on RootDSE, a fix for this issue was committed to the trunk quite sometime back, may be you can test = your program against the server built from trunk sources. On Tue, Feb 22, 2011 at 9:22 PM, Laporte Sylvain (GIE) = wrote: > Hi all, > > > > We've just implemented Apache Directory Server on one of our Windows > 2008 Servers. > > Some of our developpers have to create a C# web service that query=20 > this new ApacheDS directory using the DirectorySearcher class. > > > > When he comes to query the LDAP directory, he gets a strange message=20 > on his side: < A network peripheral is not functionning > > > Switching the logs to DEBUG, I can see that the bind performs well,=20 > but the search throws a java exception when ADS is handling the = request : > > > > [15:55:49] DEBUG > [org.apache.directory.server.ldap.handlers.ReferralAwareRequestHandler > ] > - OTHER: failed for =A0 =A0 SearchRequest > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0baseDn : '' > > =A0 =A0 =A0 =A0filter : '(2.5.4.0=3D*:[3232])' > > =A0 =A0 =A0 =A0scope : whole subtree > > =A0 =A0 =A0 =A0typesOnly : false > > =A0 =A0 =A0 =A0Size Limit : 1 > > =A0 =A0 =A0 =A0Time Limit : no limit > > =A0 =A0 =A0 =A0Deref Aliases : never Deref Aliases > > =A0 =A0 =A0 =A0attributes : 'objectclass', 'cn' > > : -1 > > java.lang.ArrayIndexOutOfBoundsException: -1 > > > > ADS adds a < : -1 > at the end of the request although the original=20 > search request seems to be well received : > > > > [15:55:49] DEBUG > [org.apache.directory.server.ldap.handlers.ReferralAwareRequestHandler > ] > - Handling single reply request: =A0 =A0 SearchRequest > > =A0 =A0 =A0 =A0baseDn : '' > > =A0 =A0 =A0 =A0filter : '(objectClass=3D*)' > > =A0 =A0 =A0 =A0scope : whole subtree > > =A0 =A0 =A0 =A0typesOnly : false > > =A0 =A0 =A0 =A0Size Limit : 1 > > =A0 =A0 =A0 =A0Time Limit : no limit > > =A0 =A0 =A0 =A0Deref Aliases : never Deref Aliases > > =A0 =A0 =A0 =A0attributes : 'objectclass', 'cn' > > > > The transaction is although very simple : > > > > //Declares the Directory entry object > > DirectoryEntry Ldap =3D new DirectoryEntry(_ldapserver, _bindDN,=20 > _password, AuthenticationTypes.None); > > try > > { > > //Declares the search object > > DirectorySearcher search =3D new DirectorySearcher(Ldap); > > // Adds a filter > > search.Filter =3D "(objectClass=3D*)"; =A0// version APACHE > > =A0 =A0 =A0//Defines the attributes to retrieve > > search.PropertiesToLoad.Add("objectClass"); > > search.PropertiesToLoad.Add("cn"); > > =A0 =A0 =A0 =A0 =A0 =A0//Performs the search > > SearchResult result =3D search.FindOne(); > > } > > > > Can anybody help? I cannot understand where does this ": -1" come from = > as it doesn't appear using Apache Directory Studio. > > > > If useful the full query log is following... > > > > Thank you very much, > > > > S. Laporte > > ------------------------------- > > > > > > [15:40:39] DEBUG > [org.apache.directory.server.ldap.handlers.ReferralAwareRequestHandler > ] > - Handling single reply request: =A0 =A0 SearchRequest > > =A0 =A0 =A0 =A0baseDn : > = 'cn=3DmyBindUser,ou=3DmyBindOU,ou=3DanotherOU,dc=3DmyDomain,dc=3DmyTLD' > > =A0 =A0 =A0 =A0filter : '(objectClass=3D*)' > > =A0 =A0 =A0 =A0scope : single level > > =A0 =A0 =A0 =A0typesOnly : false > > =A0 =A0 =A0 =A0Size Limit : 1000 > > =A0 =A0 =A0 =A0Time Limit : no limit > > =A0 =A0 =A0 =A0Deref Aliases : deref Always > > =A0 =A0 =A0 =A0attributes : 'hassubordinates', 'objectclass' > > > > [15:40:39] DEBUG > [org.apache.directory.server.ldap.handlers.ReferralAwareRequestHandler > ] > - ManageDsaITControl NOT detected. > > [15:40:39] DEBUG > [org.apache.directory.server.ldap.handlers.SearchHandler] - Entry=20 > cn=3DmyBindUser,ou=3DmyBindOU,ou=3DanotherOU,dc=3DmyDomain,dc=3DmyTLD = is NOT a=20 > referral. > > [15:40:39] DEBUG > [org.apache.directory.server.ldap.handlers.SearchHandler] - Message > received: =A0 =A0 =A0SearchRequest > > =A0 =A0 =A0 =A0baseDn : > = 'cn=3DmyBindUser,ou=3DmyBindOU,ou=3DanotherOU,dc=3DmyDomain,dc=3DmyTLD' > > =A0 =A0 =A0 =A0filter : '(objectClass=3D*)' > > =A0 =A0 =A0 =A0scope : single level > > =A0 =A0 =A0 =A0typesOnly : false > > =A0 =A0 =A0 =A0Size Limit : 1000 > > =A0 =A0 =A0 =A0Time Limit : no limit > > =A0 =A0 =A0 =A0Deref Aliases : deref Always > > =A0 =A0 =A0 =A0attributes : 'hassubordinates', 'objectclass' > > > > [15:40:39] DEBUG > [org.apache.directory.server.ldap.handlers.SearchHandler] - using=20 > <1000,1000> for size limit > > [15:55:49] DEBUG=20 > [org.apache.directory.server.ldap.handlers.BindHandler] > - Received: =A0 =A0 BindRequest > > =A0 =A0 =A0 =A0Version : '3' > > =A0 =A0 =A0 =A0Name : > = 'cn=3DmyBindUser,ou=3DmyBindOU,ou=3DanotherOU,dc=3DmyDomain,dc=3DmyTLD' > > =A0 =A0 =A0 =A0Simple authentication : 'password/0x3F 0x41 0x66 0x73 = 0x4B 0x3C=20 > 0x3D 0x6A ' > > > > [15:55:49] DEBUG=20 > [org.apache.directory.server.ldap.handlers.BindHandler] > - Returned SUCCESS message: =A0 =A0 BindResponse > > =A0 =A0 =A0 =A0Ldap Result > > =A0 =A0 =A0 =A0 =A0 =A0Result code : (SUCCESS) success > > =A0 =A0 =A0 =A0 =A0 =A0Matched DN : 'null' > > =A0 =A0 =A0 =A0 =A0 =A0Error message : 'null' > > . > > [15:55:49] DEBUG > [org.apache.directory.server.ldap.handlers.ReferralAwareRequestHandler > ] > - Handling single reply request: =A0 =A0 SearchRequest > > =A0 =A0 =A0 =A0baseDn : '' > > =A0 =A0 =A0 =A0filter : '(objectClass=3D*)' > > =A0 =A0 =A0 =A0scope : base object > > =A0 =A0 =A0 =A0typesOnly : false > > =A0 =A0 =A0 =A0Size Limit : no limit > > =A0 =A0 =A0 =A0Time Limit : no limit > > =A0 =A0 =A0 =A0Deref Aliases : never Deref Aliases > > =A0 =A0 =A0 =A0attributes : 'subschemasubentry', 'dsservicename',=20 > 'namingcontexts', 'defaultnamingcontext', 'schemanamingcontext',=20 > 'configurationnamingcontext', 'rootdomainnamingcontext',=20 > 'supportedcontrol', 'supportedldapversion', 'supportedldappolicies',=20 > 'supportedsaslmechanisms', 'dnshostname', 'ldapservicename',=20 > 'servername', 'supportedcapabilities' > > > > [15:55:49] DEBUG > [org.apache.directory.server.ldap.handlers.ReferralAwareRequestHandler > ] > - ManageDsaITControl NOT detected. > > [15:55:49] DEBUG > [org.apache.directory.server.ldap.handlers.SearchHandler] - Entry = =A0is=20 > NOT a referral. > > [15:55:49] DEBUG > [org.apache.directory.server.ldap.handlers.SearchHandler] - Message > received: =A0 =A0 =A0SearchRequest > > =A0 =A0 =A0 =A0baseDn : '' > > =A0 =A0 =A0 =A0filter : '(objectClass=3D*)' > > =A0 =A0 =A0 =A0scope : base object > > =A0 =A0 =A0 =A0typesOnly : false > > =A0 =A0 =A0 =A0Size Limit : no limit > > =A0 =A0 =A0 =A0Time Limit : no limit > > =A0 =A0 =A0 =A0Deref Aliases : never Deref Aliases > > =A0 =A0 =A0 =A0attributes : 'subschemasubentry', 'dsservicename',=20 > 'namingcontexts', 'defaultnamingcontext', 'schemanamingcontext',=20 > 'configurationnamingcontext', 'rootdomainnamingcontext',=20 > 'supportedcontrol', 'supportedldapversion', 'supportedldappolicies',=20 > 'supportedsaslmechanisms', 'dnshostname', 'ldapservicename',=20 > 'servername', 'supportedcapabilities' > > > > [15:55:49] WARN > [org.apache.directory.server.core.interceptor.context.SearchingOperati > on Context] - Requested attribute dsservicename does not exist in the=20 > schema, it will be ignored > > [15:55:49] WARN > [org.apache.directory.server.core.interceptor.context.SearchingOperati > on Context] - Requested attribute defaultnamingcontext does not exist=20 > in the schema, it will be ignored > > [15:55:49] WARN > [org.apache.directory.server.core.interceptor.context.SearchingOperati > on Context] - Requested attribute schemanamingcontext does not exist=20 > in the schema, it will be ignored > > [15:55:49] WARN > [org.apache.directory.server.core.interceptor.context.SearchingOperati > on Context] - Requested attribute configurationnamingcontext does not=20 > exist in the schema, it will be ignored > > [15:55:49] WARN > [org.apache.directory.server.core.interceptor.context.SearchingOperati > on Context] - Requested attribute rootdomainnamingcontext does not=20 > exist in the schema, it will be ignored > > [15:55:49] WARN > [org.apache.directory.server.core.interceptor.context.SearchingOperati > on Context] - Requested attribute supportedldappolicies does not exist = > in the schema, it will be ignored > > [15:55:49] WARN > [org.apache.directory.server.core.interceptor.context.SearchingOperati > on Context] - Requested attribute dnshostname does not exist in the=20 > schema, it will be ignored > > [15:55:49] WARN > [org.apache.directory.server.core.interceptor.context.SearchingOperati > on Context] - Requested attribute ldapservicename does not exist in=20 > the schema, it will be ignored > > [15:55:49] WARN > [org.apache.directory.server.core.interceptor.context.SearchingOperati > on Context] - Requested attribute servername does not exist in the=20 > schema, it will be ignored > > [15:55:49] WARN > [org.apache.directory.server.core.interceptor.context.SearchingOperati > on Context] - Requested attribute supportedcapabilities does not exist = > in the schema, it will be ignored > > [15:55:49] DEBUG > [org.apache.directory.server.ldap.handlers.ReferralAwareRequestHandler > ] > - Handling single reply request: =A0 =A0 SearchRequest > > =A0 =A0 =A0 =A0baseDn : '' > > =A0 =A0 =A0 =A0filter : '(objectClass=3D*)' > > =A0 =A0 =A0 =A0scope : whole subtree > > =A0 =A0 =A0 =A0typesOnly : false > > =A0 =A0 =A0 =A0Size Limit : 1 > > =A0 =A0 =A0 =A0Time Limit : no limit > > =A0 =A0 =A0 =A0Deref Aliases : never Deref Aliases > > =A0 =A0 =A0 =A0attributes : 'objectclass', 'cn' > > > > [15:55:49] DEBUG > [org.apache.directory.server.ldap.handlers.ReferralAwareRequestHandler > ] > - ManageDsaITControl NOT detected. > > [15:55:49] DEBUG > [org.apache.directory.server.ldap.handlers.SearchHandler] - Entry = =A0is=20 > NOT a referral. > > [15:55:49] DEBUG > [org.apache.directory.server.ldap.handlers.SearchHandler] - Message > received: =A0 =A0 =A0SearchRequest > > =A0 =A0 =A0 =A0baseDn : '' > > =A0 =A0 =A0 =A0filter : '(objectClass=3D*)' > > =A0 =A0 =A0 =A0scope : whole subtree > > =A0 =A0 =A0 =A0typesOnly : false > > =A0 =A0 =A0 =A0Size Limit : 1 > > =A0 =A0 =A0 =A0Time Limit : no limit > > =A0 =A0 =A0 =A0Deref Aliases : never Deref Aliases > > =A0 =A0 =A0 =A0attributes : 'objectclass', 'cn' > > > > [15:55:49] DEBUG > [org.apache.directory.server.ldap.handlers.ReferralAwareRequestHandler > ] > - OTHER: failed for =A0 =A0 SearchRequest > > =A0 =A0 =A0 =A0baseDn : '' > > =A0 =A0 =A0 =A0filter : '(2.5.4.0=3D*:[3232])' > > =A0 =A0 =A0 =A0scope : whole subtree > > =A0 =A0 =A0 =A0typesOnly : false > > =A0 =A0 =A0 =A0Size Limit : 1 > > =A0 =A0 =A0 =A0Time Limit : no limit > > =A0 =A0 =A0 =A0Deref Aliases : never Deref Aliases > > =A0 =A0 =A0 =A0attributes : 'objectclass', 'cn' > > : -1 > > java.lang.ArrayIndexOutOfBoundsException: -1 > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0at java.util.ArrayList.get(Unknown = Source) > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0at > org.apache.directory.server.core.filtering.CursorList.beforeFirst(Curs > or > List.java:170) > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0at > org.apache.directory.server.ldap.handlers.SearchHandler.doSimpleSearch > (S > earchHandler.java:729) > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0at > org.apache.directory.server.ldap.handlers.SearchHandler.handleIgnoring > Re > ferrals(SearchHandler.java:978) > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0at > org.apache.directory.server.ldap.handlers.SearchHandler.handleWithRefe > rr > als(SearchHandler.java:1054) > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0at > org.apache.directory.server.ldap.handlers.SearchHandler.handleWithRefe > rr > als(SearchHandler.java:78) > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0at > org.apache.directory.server.ldap.handlers.ReferralAwareRequestHandler. > ha > ndle(ReferralAwareRequestHandler.java:94) > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0at > org.apache.directory.server.ldap.handlers.ReferralAwareRequestHandler. > ha > ndle(ReferralAwareRequestHandler.java:57) > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0at > org.apache.directory.server.ldap.handlers.LdapRequestHandler.handleMes > sa > ge(LdapRequestHandler.java:208) > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0at > org.apache.directory.server.ldap.handlers.LdapRequestHandler.handleMes > sa > ge(LdapRequestHandler.java:58) > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0at > org.apache.mina.handler.demux.DemuxingIoHandler.messageReceived(Demuxi > ng > IoHandler.java:232) > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0at > org.apache.directory.server.ldap.LdapProtocolHandler.messageReceived(L > da > pProtocolHandler.java:193) > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0at > org.apache.mina.core.filterchain.DefaultIoFilterChain$TailFilter.messa > ge > Received(DefaultIoFilterChain.java:713) > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0at > org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageR > ec > eived(DefaultIoFilterChain.java:434) > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0at > org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(Defa > ul > tIoFilterChain.java:46) > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0at > org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.mess > ag > eReceived(DefaultIoFilterChain.java:793) > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0at > org.apache.mina.core.filterchain.IoFilterEvent.fire(IoFilterEvent.java > :7 > 1) > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0at > org.apache.mina.core.session.IoEvent.run(IoEvent.java:63) > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0at > org.apache.mina.filter.executor.UnorderedThreadPoolExecutor$Worker.run > Ta > sk(UnorderedThreadPoolExecutor.java:480) > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0at > org.apache.mina.filter.executor.UnorderedThreadPoolExecutor$Worker.run > (U > norderedThreadPoolExecutor.java:434) > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0at java.lang.Thread.run(Unknown Source) > > [15:55:49] DEBUG=20 > [org.apache.directory.server.ldap.LdapProtocolHandler] > - Cleaning the LdapSession : > = <2.5.4.3=3Dmybinduser,2.5.4.11=3Dmybinfou,2.5.4.11=3Danotherou,0.9.2342.1= 920 > 03 00.100.1.25=3Dmydomain,0.9.2342.19200300.100.1.25=3Dmytld,...> = session > > [15:55:49] INFO > [org.apache.directory.server.ldap.handlers.LdapRequestHandler] -=20 > ignoring the message=20 > org.apache.directory.shared.ldap.message.UnbindRequestImpl@374e67ab > received from null session > > -- Kiran Ayyagari