directory-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From david jones <>
Subject Is anything besides String supported for BasicAttribute?
Date Thu, 15 Sep 2011 12:48:55 GMT
Is anything besides String supported for BasicAttribute?

I'm using ApacheDS 1.5.

I tried adding a port value as an integer to schema:

dn: m-oid=, ou=attributeTypes, cn=other,
objectclass: metaAttributeType
objectclass: metaTop
objectclass: top
m-name: port
m-description: ip port
m-equality: integerMatch
m-syntax: (Integer)


attributes.put(new BasicAttribute("ipV4Addr", "");
attributes.put(new BasicAttribute("port", intPort);
ctx.createSubcontext(cn, attributes);

Looking at the created entry with Studio: it got created with the IP address
attribute (string) , but not the port value (integer). I don't see any
errors in the ldap debug printouts.

If i change code to:
         attributes.put(new BasicAttribute("port", intPort.toString());
and the port's schema to:
     m-syntax: (IA5 String)

The port gets added. Is this expected behavior, or am I missing something in
my schema/code to allow non-String attribute values?


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message