[
https://issues.apache.org/jira/browse/DIRAPI-175?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13907194#comment-13907194
]
Emmanuel Lecharny commented on DIRAPI-175:
------------------------------------------
It's not a bug in the LDIF parser : your LDIF file is not correct, accordingly
to the RFC.
ldif-file = ldif-content / ldif-changes
ldif-content = version-spec 1*(1*SEP ldif-attrval-record)
ldif-changes = version-spec 1*(1*SEP ldif-change-record)
ldif-attrval-record = dn-spec SEP 1*attrval-spec
ldif-change-record = dn-spec SEP *control changerecord
attrval-spec = AttributeDescription value-spec SEP
changerecord = "changetype:" FILL
(change-add / change-delete /
change-modify / change-moddn)
So either it's a change-record, or a attrval-record, but you need to add a
attrval-spec or a "changetype" at the begin of the line after the DN.
Check your LDIF.
Note that it makes sense to have at least the ObjectClass Attribute : how
possibly your LDAP server can validate a DN which RDN is not part of the entry
? This is not a legal entry.
> LdifReader should handle empty entries
> --------------------------------------
>
> Key: DIRAPI-175
> URL: https://issues.apache.org/jira/browse/DIRAPI-175
> Project: Directory Client API
> Issue Type: Bug
> Affects Versions: 1.0.0-M11
> Reporter: Raphaƫl Ouazana
>
> A simple LDIF file containing 3 entries is rejected by LDIFParser:
> dn: uid=uniqueId, dc=domain
> dn: uid=uniqueId2, dc=domain
> dn: uid=uniqueId3, dc=domain
> I don't see any issue in this LDIF. Parser should return 3 entries with no
> attribute.
> With M11, the error is the following:
> ERROR - ERR_12058_UNKNOWN_ENTRY_TYPE Unknown entry type
> ERROR - ERR_12058_UNKNOWN_ENTRY_TYPE Unknown entry type
> ERROR - ERR_12069 Cannot parse the ldif buffer : ERR_12059_UNKNOWN_ENTRY
> Unknown entry
> ERROR - ERR_12069 Cannot parse the ldif buffer : ERR_12059_UNKNOWN_ENTRY
> Unknown entry
> If I add an attribute to each entry, I get no more error.
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)