From a52fe2b385c4d22833b34efbf29ae898933963b2 Mon Sep 17 00:00:00 2001
From: kenneth_suter <kenneth_suter@localhost>
Date: Fri, 06 Apr 2007 20:44:42 +0000
Subject: [PATCH] fixed broken import data step during install after import command args changed
---
opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/installer/Installer.java | 5 +++--
opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/util/Utils.java | 18 ++++++++++++++++++
opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/resources/Resources.properties | 2 +-
3 files changed, 22 insertions(+), 3 deletions(-)
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 785a484..ab7f171 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
@@ -593,7 +593,7 @@
argList.add(getBackendName());
argList.add("-t");
argList.add(templatePath.getAbsolutePath());
- argList.add("-S");
+ argList.add("-s"); // seed
argList.add("0");
String[] args = new String[argList.size()];
@@ -606,9 +606,10 @@
if (result != 0)
{
+ String[] msgArgs = { Utils.stringArrayToString(args, " ") };
throw new QuickSetupException(
QuickSetupException.Type.CONFIGURATION_ERROR,
- getMsg("error-import-automatically-generated"), null);
+ getMsg("error-import-automatically-generated", msgArgs), null);
}
} catch (Throwable t)
{
diff --git a/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/resources/Resources.properties b/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/resources/Resources.properties
index 273b126..0f787e9 100644
--- a/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/resources/Resources.properties
+++ b/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/resources/Resources.properties
@@ -654,7 +654,7 @@
error-creating-base-entry=Error Creating Base Entry.
error-importing-ldif=Error Importing LDIF File.
error-import-automatically-generated=Error Importing Automatically- Generated \
-Data.
+Data when invoked with arguments: {0}".
error-starting-server=Error Starting Directory Server.
error-starting-server-in-windows=Could not connect to Server after Start. \
If you have a firewall configured check that it allows connections to port {0}.
diff --git a/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/util/Utils.java b/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/util/Utils.java
index 8d44f87..9f9e9f9 100644
--- a/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/util/Utils.java
+++ b/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/util/Utils.java
@@ -1544,4 +1544,22 @@
return sb.toString();
}
+ /**
+ * Creates a string consisting of the string representation of the
+ * elements in the <code>list</code> separated by <code>separator</code>.
+ * @param array the list to print
+ * @param separator to use in separating elements
+ * @return String representing the list
+ */
+ static public String stringArrayToString(String[] array, String separator) {
+ StringBuffer sb = new StringBuffer();
+ for (int i = 0; i < array.length; i++) {
+ sb.append(array[i]);
+ if (i < array.length - 1) {
+ sb.append(separator);
+ }
+ }
+ return sb.toString();
+ }
+
}
--
Gitblit v1.10.0