Return-Path: X-Original-To: apmail-directory-dev-archive@www.apache.org Delivered-To: apmail-directory-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 23365101C5 for ; Thu, 18 Apr 2013 22:16:03 +0000 (UTC) Received: (qmail 27064 invoked by uid 500); 18 Apr 2013 22:16:03 -0000 Delivered-To: apmail-directory-dev-archive@directory.apache.org Received: (qmail 26982 invoked by uid 500); 18 Apr 2013 22:16:02 -0000 Mailing-List: contact dev-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Apache Directory Developers List" Delivered-To: mailing list dev@directory.apache.org Received: (qmail 26975 invoked by uid 99); 18 Apr 2013 22:16:02 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 18 Apr 2013 22:16:02 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of elecharny@gmail.com designates 209.85.212.178 as permitted sender) Received: from [209.85.212.178] (HELO mail-wi0-f178.google.com) (209.85.212.178) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 18 Apr 2013 22:15:57 +0000 Received: by mail-wi0-f178.google.com with SMTP id hq17so3716378wib.5 for ; Thu, 18 Apr 2013 15:15:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:message-id:date:from:user-agent:mime-version:to:subject :references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; bh=qs9krDLp+8yPJrMWJiuN1LTvDPz3Bco3oHePCuLFmCQ=; b=h5vJM6EVWzaoEKG4pVE3E4m3LogYRR1ZD+XAKaI254UaDFXpGQJvw2BCgZowTun+k/ aKz2J3lgPAdV2TFQ4T0RmORJT2nuBFcc+K0P+9rIqiY7PkjX+kr0IWR7DfbtkzP7RZKQ dSD83R8jxbv3iyFdkLBPg0kG05hQ4GcBl9mDcQMhHaxQprovvGEA2svEjvrqhm4cA1VG mA4G8JBjSYQpibWiQPOQtTb0CsNJwm7eVOik7EmuaYYoQqFWiBEY2ToBMhrFdnMyP8Zb Ru7NAT7IlVmiQiaVaa+q6qw6OqpwBiBkGcmisxX8auRMTK+7F5VfiMzXv4eueKE4WZgb Od1A== X-Received: by 10.194.103.72 with SMTP id fu8mr21736253wjb.42.1366323336640; Thu, 18 Apr 2013 15:15:36 -0700 (PDT) Received: from Emmanuels-MacBook-Pro.local (ran75-1-78-192-106-184.fbxo.proxad.net. [78.192.106.184]) by mx.google.com with ESMTPSA id du2sm83504wib.0.2013.04.18.15.15.34 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 18 Apr 2013 15:15:35 -0700 (PDT) Message-ID: <51707085.3000607@gmail.com> Date: Fri, 19 Apr 2013 00:15:33 +0200 From: =?UTF-8?B?RW1tYW51ZWwgTMOpY2hhcm55?= User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:17.0) Gecko/20130328 Thunderbird/17.0.5 MIME-Version: 1.0 To: Apache Directory Developers List Subject: Re: what cause InvalidCursonPositionException? References: <7D664BE6CF058A4CB1A06984A7AA678F18037C877B@SM-CALA-VXMB06A.swna.wdpr.disney.com> <7D664BE6CF058A4CB1A06984A7AA678F18039AA75D@SM-CALA-VXMB06A.swna.wdpr.disney.com> In-Reply-To: <7D664BE6CF058A4CB1A06984A7AA678F18039AA75D@SM-CALA-VXMB06A.swna.wdpr.disney.com> X-Enigmail-Version: 1.5.1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org Le 4/18/13 11:08 PM, Wu, James C. a écrit : > Hi Kiran, > > I added this line, but it does not help. > > searchRequest.setScope(SearchScope.OBJECT); > > Basically, I just want to read an entity given its DN, is there an easier way? If you know the DN, and if you just want to get back the associated entry, then yes, there is an easier way : Dn dn = new Dn(maxUidDN); DirectoryService service = getDirectoryService(); CoreSession session = service.getAdminSession(); Entry entry = session.lookup(dn); -- Regards, Cordialement, Emmanuel Lécharny www.iktek.com