[Date Prev][Date Next]
Problem with LDIFReader always requiring version number in LDIF file
- To: openldap <openldap-software@OpenLDAP.org>
- Subject: Problem with LDIFReader always requiring version number in LDIF file
- From: Safdar Kureishy <firstname.lastname@example.org>
- Date: Tue, 10 May 2005 20:25:27 -0700
- Content-disposition: inline
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=GcggdtcfAdDR17FbEPKoH/JHQQ/RCodBLKS1MQp0LJ+IJKIPECwhwDmjq2eUQU7V/CTjCXu3/j0M5qeg9wbNpMb4JRcArzRQjLh6ozn88c7hOX2JcyXhtCiAdwfYocs28iopFQ17hLPezlqcuRV9LQ2b3jOmbrX4vid3SFatGT4=
I couldn't find anything about this on the newsgroup, so am posting
I am running into a problem where the LDIFReader (from JLDAP) requires
a "version" field to exist in the LDIF file that it is made to read.
When it doesn't find the version field, the LDIFReader throws the
LDAPLocalException: com.novell.ldap.ldif_dsml.LDIFReader: Version line
must be the first meaningful line(on line 1 of the file) (82) Local
I will always be getting LDIF files from the customer that don't have
a version number as the first line. Instead of adding this line on the
top of each file (which could be an expensive operation for large
LDIFs) before parsing them, is there any way that I can make the
LDIFReader not complain about the version and just default to version
1? If I add "version: 1" to the file, it works fine, so I know that
defaulting to version 1 should be fine.
I've looked around but couldn't find any way of working around this
error in a simple way. Any help would be greatly appreciated.