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

NullPointerException in BackupManager.java when backup --hash is used offline

    Details

    • Type: Bug
    • Status: Done
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 6.5.0, 6.0.0, 5.5.0, 4.0.0, 3.5.3, 3.5.2, 3.5.1, 3.5.0
    • Fix Version/s: 6.0.0
    • Component/s: core apis, tools
    • Support Ticket IDs:

      Description

       

      NPE occurs when the --hash option is used with an offline backup.

      • Occurs with DJ 3.5.0 - DS 6.0.0-M120.2
      • Does not occur with DJ 3.0.0

      DS 6.0.0 build info:

      e35ca8dd73 (tag: 6.0.0-M120.2) [maven-release-plugin] prepare release 6.0.0-M120.2

      Offline the backup throws an NPE and no backups are created.

      opendj; bin /$ ./status -V ForgeRock Directory Services 6.0.0-SNAPSHOT Build 20180328205816Z
      
      opendj; bin /$ ./backup --hash --backendID userRoot --backupDirectory /opt/instances/backups --offline [28/03/2018:15:26:05 -0600] category=TOOLS seq=0 severity=INFO msg=Starting backup for backend userRoot [28/03/2018:15:26:05 -0600] category=TOOLS seq=1 severity=SEVERE msg=An error occurred while attempting to back up backend userRoot with the requested configuration: NullPointerException(BackupManager.java:331) [28/03/2018:15:26:05 -0600] category=TOOLS seq=2 severity=INFO msg=The backup process completed with one or more errors

      Online backup --hash works with no issues

      opendj; bin /$ ./backup --hash --port 4444 --bindDN "cn=Directory Manager" --bindPassword password --start 0 --trustAll --backendID userRoot --backupDirectory /opt/instances/backups
      Backup task 20180328153822413 scheduled to start Mar 28, 2018 3:38:22 PM MDT
      
      opendj; bin /$ grep hash /opt/instances/backups/backup.info
      hash=/7Y0UxIF3O2krtVyTg9uCIqwCg4=

       

       Line 331 of M120

       

      String digestAlgorithm = cryptoManager.getPreferredMessageDigestAlgorithm();
      

       

       

      /** Constructor for backup creation. */
      private DigestCryptoEngine(BackupConfig backupConfig, NewBackupParams backupParams) throws LdapException {
          super(backupConfig.encryptData());
          String digestAlgorithm = cryptoManager.getPreferredMessageDigestAlgorithm();
          backupParams.putProperty(BACKUP_PROPERTY_DIGEST_ALGORITHM, digestAlgorithm);
          digest = retrieveMessageDigest(digestAlgorithm);
      }
      

       

       

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                ludo Ludovic Poitou
                Reporter:
                lee.trujillo Lee Trujillo
                QA Assignee:
                Ondrej Fuchsik
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: