Return-Path: X-Original-To: apmail-directory-dev-archive@www.apache.org Delivered-To: apmail-directory-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7C8F811D2A for ; Thu, 20 Feb 2014 17:15:22 +0000 (UTC) Received: (qmail 14158 invoked by uid 500); 20 Feb 2014 17:15:20 -0000 Delivered-To: apmail-directory-dev-archive@directory.apache.org Received: (qmail 14098 invoked by uid 500); 20 Feb 2014 17:15:19 -0000 Mailing-List: contact dev-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Apache Directory Developers List" Delivered-To: mailing list dev@directory.apache.org Received: (qmail 14089 invoked by uid 99); 20 Feb 2014 17:15:19 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 Feb 2014 17:15:19 +0000 Date: Thu, 20 Feb 2014 17:15:19 +0000 (UTC) From: "Emmanuel Lecharny (JIRA)" To: dev@directory.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (DIRAPI-175) LdifReader should handle empty entries MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/DIRAPI-175?page=3Dcom.atlassian= .jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D1390= 7194#comment-13907194 ]=20 Emmanuel Lecharny commented on DIRAPI-175: ------------------------------------------ It's not a bug in the LDIF parser : your LDIF file is not correct, accordin= gly to the RFC. ldif-file =3D ldif-content / ldif-changes ldif-content =3D version-spec 1*(1*SEP ldif-attrval-record) ldif-changes =3D version-spec 1*(1*SEP ldif-change-record) ldif-attrval-record =3D dn-spec SEP 1*attrval-spec ldif-change-record =3D dn-spec SEP *control changerecord attrval-spec =3D AttributeDescription value-spec SEP changerecord =3D "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 p= ossibly your LDAP server can validate a DN which RDN is not part of the ent= ry ? 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=C3=ABl Ouazana > > A simple LDIF file containing 3 entries is rejected by LDIFParser: > dn: uid=3DuniqueId, dc=3Ddomain > dn: uid=3DuniqueId2, dc=3Ddomain > dn: uid=3DuniqueId3, dc=3Ddomain > I don't see any issue in this LDIF. Parser should return 3 entries with n= o 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)