From 59d442f5e63759486ad14785f0ff44dc8c4d7cf1 Mon Sep 17 00:00:00 2001
From: jvergara <jvergara@localhost>
Date: Mon, 03 Sep 2007 16:18:11 +0000
Subject: [PATCH] Identify the case where we cannot find the replication ID to initialize the suffix for a given base DN and throw an exception informing of it.

---
 opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/installer/Installer.java |    6 ++++++
 opendj-sdk/opends/src/messages/messages/quicksetup.properties                   |    7 +++++--
 2 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/opendj-sdk/opends/src/messages/messages/quicksetup.properties b/opendj-sdk/opends/src/messages/messages/quicksetup.properties
index a27f727..66cc353 100644
--- a/opendj-sdk/opends/src/messages/messages/quicksetup.properties
+++ b/opendj-sdk/opends/src/messages/messages/quicksetup.properties
@@ -108,7 +108,7 @@
  %s:%s.
 INFO_ERROR_READING_CONFIG_LDAP_CERTIFICATE=Error reading data from server.  \
  There is an error with the certificate presented by the server.\nDetails: \
- %s 
+ %s
 INFO_ERROR_READING_CONFIG_LDAP_CERTIFICATE_SERVER=Error reading data from \
  server %s.  There is an error with the certificate presented by the \
  server.\nDetails: %s
@@ -1040,7 +1040,7 @@
 INFO_UPGRADE_OPERATION_REVERSION=Revert to a previous version
 INFO_UPGRADE_OPERATION_UPGRADE=Upgrade to a newer version
 INFO_UPGRADE_OPERATION_REVERSION_RESPONSE=Please rerun this command specifying \
-  options that indicate a reversion operation.  See the usage guide for details.  
+  options that indicate a reversion operation.  See the usage guide for details.
 INFO_UPGRADE_FILE_PROMPT=Enter the name and path of the OpenDS install file \
  (.zip):
 INFO_UPGRADE_LAUNCHER_DESCRIPTION=This utility may be used to upgrade the \
@@ -1180,3 +1180,6 @@
 INFO_WELCOME_STEP=Welcome
 INFO_CONFIRM_UNINSTALL_STEP=Uninstall Options
 INFO_ZIP_FILES_DESCRIPTION=OpenDS Installation Package (.zip)
+SEVERE_ERR_COULD_NOT_FIND_REPLICATIONID=Could not find a remote peer to \
+ initialize the contents of local base DN: %s.
+ 
\ No newline at end of file
diff --git a/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/installer/Installer.java b/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/installer/Installer.java
index acf6957..8e358a0 100644
--- a/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/installer/Installer.java
+++ b/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/installer/Installer.java
@@ -1809,6 +1809,12 @@
             }
           }
         }
+        if (replicationId == -1)
+        {
+          throw new ApplicationException(
+              ReturnCode.APPLICATION_ERROR,
+              ERR_COULD_NOT_FIND_REPLICATIONID.get(dn), null);
+        }
         try
         {
           Thread.sleep(3000);

--
Gitblit v1.10.0