Return-Path: Delivered-To: apmail-directory-users-archive@www.apache.org Received: (qmail 53667 invoked from network); 7 Mar 2009 15:57:15 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 7 Mar 2009 15:57:15 -0000 Received: (qmail 66401 invoked by uid 500); 7 Mar 2009 15:57:15 -0000 Delivered-To: apmail-directory-users-archive@directory.apache.org Received: (qmail 66371 invoked by uid 500); 7 Mar 2009 15:57:14 -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 66359 invoked by uid 99); 7 Mar 2009 15:57:14 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 07 Mar 2009 07:57:14 -0800 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of kovach@gmail.com designates 209.85.217.177 as permitted sender) Received: from [209.85.217.177] (HELO mail-gx0-f177.google.com) (209.85.217.177) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 07 Mar 2009 15:57:06 +0000 Received: by gxk25 with SMTP id 25so1662872gxk.1 for ; Sat, 07 Mar 2009 07:56:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=xQs1u3aaAk8vqu1qE83eQkb9mBZnKs/CrVd9NL8zwyk=; b=LKYv4RNahue+9ptUE9katITGJPkm2VAPVx2fJtpOw8BYEC1DNkDbj0FtAt10/H4qbb yIDTWq1L9QT0SunqX02NUUnvihrhxFWNKoakqvsFXpI1mJyWiF1DJ6XnHs18eQLiEgGX S0HkZuuTXXTpkyRg7HG80E6drEbaMjBh+M42U= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=ksDypjOb8s86yhQQfOQUc5GxQ1/YCcPWzdw1M0knOL3MS05e1iGSJy1biW8farYppi COmsjs0Ug2BPRKsEyzEvx54LCN/JLC2HKqSqGmKa2WG77uRBH2IhaYzGj6dWA8aU+WwB F0hmrFePHJL/+xCug38+KRndTk79MXbBt3Fps= MIME-Version: 1.0 Received: by 10.90.106.3 with SMTP id e3mr878095agc.54.1236441405660; Sat, 07 Mar 2009 07:56:45 -0800 (PST) In-Reply-To: <49B25493.4060701@nextury.com> References: <49B25493.4060701@nextury.com> Date: Sat, 7 Mar 2009 10:56:45 -0500 Message-ID: Subject: Re: LDAP error code 80 From: Kevin Kovach To: users@directory.apache.org Content-Type: multipart/alternative; boundary=00163616448dc51f7f0464897274 X-Virus-Checked: Checked by ClamAV on apache.org --00163616448dc51f7f0464897274 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable First, thanks for the response and information. But, I want this id to be a string. That's what I am after. When you say, "If you pass something which can't be translated to a String, it will consider it as a byte[], but that will fail when doing a search against String value", what do you mean? Pass to what? The search method? Are yo= u talking about my filter? If so, I don't believe I'm passing anything that can't be translated to a String. As I stated, in this example, I generate a random string of length 25 and do a search for that to see if it is unique. Why it would consider my random string a byte[]. Thanks again for the help. I appreciate it. - Kevin On Sat, Mar 7, 2009 at 6:03 AM, Emmanuel Lecharny wro= te: > Kevin Kovach wrote: > >> Hello, >> >> I am currently running ApacheDS 1.5.4 on 64-bit Ubuntu. I have a Java >> application that's storing objects in the directory. Those objects use = a >> custom schema with an auxiliary ojectclass that contains an id attribute= . >> That id is a 25 character string of alphanumeric characters, and I have >> the >> attribute set to a directory string. I create a random id for a certai= n >> set of the objects, and when I generate a new one I first do a lookup to >> make sure that it's unique in my DIT. >> >> When doing this uniqueness search, I sometimes but not always see the >> following error returned from ApacheDS. I've changed my oid, the object >> name, and hostname for some anonymity, but this is it in a nutshell... >> >> DEBUG httpSSLWorkerThread-8081-2 localhost - Got random id >> eKsFGqG9CxKbmwlvGKFX6ajOV. Checking to see if its unique... >> DEBUG httpSSLWorkerThread-8081-2 localhost - Performing LDAP search for >> filter (myid=3DeKsFGqG9CxKbmwlvGKFX6ajOV) >> ERROR httpSSLWorkerThread-8081-2 localhost - NamingException: [LDAP: err= or >> code 80 - OTHER: failed for SearchRequest >> baseDn : '2.5.4.11=3Dusers,0.9.2342.19200300.100.1.25=3Dlocalhost= ' >> filter : >> '(MYOID.1.15=3DeKsFGqG9CxKbmwlvGKFX6ajOV:[9223372036854775807])' >> scope : whole subtree >> typesOnly : false >> Size Limit : no limit >> Time Limit : no limit >> Deref Aliases : deref Always >> attributes : >> : java.lang.String cannot be cast to [B] >> >> I'm not sure I understand what this is telling me. Like I said, this do= es >> not occurr every time either. I'm also confused as to what the >> ':[9223372036854775807]' is appended to my filter? Any help or insight >> would be appreciated. I will of course be happy to provide more detail = as >> needed. Thanks. >> >> > > First, the [blah] value in the filter is just there to give some > information about the number of objects found using this index (here, it'= s > -1L, as you don't have any index set up for this AttributeType). It's use= d > for debug purpose. > > Now, I guess that your AttributeType is not defined as binary. What > happends is that the serve consider the AttributeType to e HumanReadable, > and stores the values as String. If you pass something which can't be > translated to a String, it will consider it as a byte[], but that will fa= il > when doing a search against String value (because comparing a byte[] and = a > String is not possible...). > > I would suggest you define this AttributeType to be binary, that should d= o > the trick. > >> - Kevin >> >> >> >> > > > -- > -- > cordialement, regards, > Emmanuel L=C3=A9charny > www.iktek.com > directory.apache.org > > > --=20 "He has all the virtues I dislike and none of the vices I admire." -- Winston Churchill --00163616448dc51f7f0464897274--