Uploaded image for project: 'OpenDJ'
  1. OpenDJ
  2. OPENDJ-2858

Unable to parse LDIF record as ChangeRecord if empty attribute is listed first.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.5.0, 4.0.0
    • Fix Version/s: 3.5.0, 4.0.0
    • Component/s: core apis
    • Labels:
    • Environment:
      Windows 7, JDK 1.7.075

      Description

      I'm using an LDIFChangeRecordReader to read an LDIF export and expecting all records to be converted to ADDs. However an exception is thrown if the first attribute listed is empty. I'd like to not have empty attributes but... (a list of terrible reasons)

      Example LDIF...

      dn: cn=acme,o=com
      description:
      cn: acme
      sn: acme
      objectClass: top
      objectClass: person

      And error..

      org.forgerock.opendj.ldap.DecodeException: Unable to parse LDIF change record starting at line 1 with distinguished name "cn=acme,o=com" because it contained a malformed changetype "description:"
      at org.forgerock.opendj.ldap.DecodeException.error(DecodeException.java:40)
      at org.forgerock.opendj.ldif.RejectedLDIFListener$1.handleMalformedRecord(RejectedLDIFListener.java:42)
      at org.forgerock.opendj.ldif.AbstractLDIFReader.handleMalformedRecord(AbstractLDIFReader.java:193)
      at org.forgerock.opendj.ldif.LDIFChangeRecordReader.getNextChangeRecord(LDIFChangeRecordReader.java:445)
      at org.forgerock.opendj.ldif.LDIFChangeRecordReader.hasNext(LDIFChangeRecordReader.java:202)
      at org.forgerock.opendj.ldif.LDIFChangeRecordReader.readChangeRecord(LDIFChangeRecordReader.java:213)

      Maven deps

      <dependency>
      <groupId>org.forgerock.opendj</groupId>
      <artifactId>opendj-core</artifactId>
      <version>4.0.0-SNAPSHOT</version>
      </dependency>
      <dependency>
      <groupId>org.forgerock.opendj</groupId>
      <artifactId>opendj-grizzly</artifactId>
      <version>4.0.0-SNAPSHOT</version>
      </dependency>

      Regards
      Matt

        Attachments

          Activity

            People

            Assignee:
            matthew Matthew Swift
            Reporter:
            mavnom Matthew Stevenson [X] (Inactive)
            Dev Assignee:
            Matthew Swift Matthew Swift
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: