Sure. Here it is. dn: m-oid=MYOID.1.15, ou=attributeTypes, cn=custom, ou=schema objectclass: metaAttributeType objectclass: metaTop objectclass: top m-oid: MYOID.1.15 m-name: myid m-syntax: 1.3.6.1.4.1.1466.115.121.1.15 m-singleValue: TRUE
- Kevin On Sat, Mar 7, 2009 at 1:26 PM, Emmanuel Lecharny <[email protected]>wrote: > What would be usefull is the description of your AttributeType in your > schema. > > Can you provide it ? > > On Sat, Mar 7, 2009 at 4:56 PM, Kevin Kovach <[email protected]> wrote: > > 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 > you > > 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 <[email protected] > >wrote: > > > >> 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 > certain > >>> 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=eKsFGqG9CxKbmwlvGKFX6ajOV) > >>> ERROR httpSSLWorkerThread-8081-2 localhost - NamingException: [LDAP: > error > >>> code 80 - OTHER: failed for SearchRequest > >>> baseDn : '2.5.4.11=users,0.9.2342.19200300.100.1.25=localhost' > >>> filter : > >>> '(MYOID.1.15=eKsFGqG9CxKbmwlvGKFX6ajOV:[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 > does > >>> 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 > used > >> 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 > fail > >> 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 > do > >> the trick. > >> > >>> - Kevin > >>> > >>> > >>> > >>> > >> > >> > >> -- > >> -- > >> cordialement, regards, > >> Emmanuel Lécharny > >> www.iktek.com > >> directory.apache.org > >> > >> > >> > > > > > > -- > > "He has all the virtues I dislike and none of the vices I admire." > > > > -- Winston Churchill > > > > > > -- > Regards, > Cordialement, > Emmanuel Lécharny > www.iktek.com > -- "He has all the virtues I dislike and none of the vices I admire." -- Winston Churchill
