Tom Zeller wrote:
In trunk, it looks like LdifUtils.convertAttributesFromLdif() throws a
NamingException for ldif containing a dn.
Plain normal, but might be confusing. What happens is that this method
tries to convert something stored using a LDIF format to an Attributes
(JNDI). Attributes objects don't contain a DN, only attributes.
This method is a bit confusing, as it does not state that it does not
try to convert only the attributes.
If you want to parse a LDIF to get an Attributes object, you have to use
the LdifReader.parseLdif( String ), you'll get a List of Entry objects,
and loop on the entry's attributes to convert them to Attribute, and
store them into an Attributes.
FYI, we have defined a new set of classes to manage LDAP elements, based
on the Entry element (basically, an entry is a DN plus a set of attributes).
Hope it helps.
--
--
cordialement, regards,
Emmanuel Lécharny
www.iktek.com
directory.apache.org