mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

jvergara
25.49.2007 200523633bec64d495c6f1a4003a191c3d9d1807
Only seed the ads truststore when the ADS were not already replicated.  This avoids a NullPointerException when we enable replication on a baseDN between two servers and another baseDN was already being replicated.
1 files modified
23 ■■■■■ changed files
opends/src/guitools/org/opends/guitools/replicationcli/ReplicationCliMain.java 23 ●●●●● patch | view | raw | blame | history
opends/src/guitools/org/opends/guitools/replicationcli/ReplicationCliMain.java
@@ -3025,17 +3025,20 @@
          ERR_REPLICATION_UPDATING_ADS.get(adce.getMessage()),
          ERROR_UPDATING_ADS, adce);
    }
    try
    if (!adsAlreadyReplicated)
    {
      ServerDescriptor.seedAdsTrustStore(ctxDestination,
        adsCtxSource.getTrustedCertificates());
    }
    catch (Throwable t)
    {
      LOG.log(Level.SEVERE, "Error seeding truststores: "+t, t);
      throw new ReplicationCliException(
          ERR_REPLICATION_ENABLE_SEEDING_TRUSTSTORE.get(t.toString()),
          ERROR_SEEDING_TRUSTORE, t);
      try
      {
        ServerDescriptor.seedAdsTrustStore(ctxDestination,
            adsCtxSource.getTrustedCertificates());
      }
      catch (Throwable t)
      {
        LOG.log(Level.SEVERE, "Error seeding truststores: "+t, t);
        throw new ReplicationCliException(
            ERR_REPLICATION_ENABLE_SEEDING_TRUSTSTORE.get(t.toString()),
            ERROR_SEEDING_TRUSTORE, t);
      }
    }
    printProgressMessage(formatter.getFormattedDone());
    printProgressMessage(formatter.getLineBreak());