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

jvergara
04.20.2007 cac1a9c7e0106bf228e2832aae5a62d41e05bef6
Fix for issue 1761.

The problem was that the code of the WebStartInstaller tried to create an Installation object. Installation calls start-ds(.bat) to get information about the build, but this fails if no JAVA_HOME is set. JAVA_HOME is not set in general for the WebStart installer but it should be for the other applications. The fix consists of writing the java home before creating the Installation object.

Some fixes have been also done related to the progress bar of the web start installer. Now there is some progress bar updates during the downloading.
1 files modified
25 ■■■■ changed files
opends/src/quicksetup/org/opends/quicksetup/installer/webstart/WebStartInstaller.java 25 ●●●● patch | view | raw | blame | history
opends/src/quicksetup/org/opends/quicksetup/installer/webstart/WebStartInstaller.java
@@ -33,6 +33,8 @@
import java.io.PrintStream;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.opends.quicksetup.ApplicationException;
import org.opends.quicksetup.ProgressStep;
@@ -77,6 +79,9 @@
  private HashMap<InstallProgressStep, String> hmSummary =
      new HashMap<InstallProgressStep, String>();
  private static final Logger LOG =
    Logger.getLogger(WebStartInstaller.class.getName());
  /**
   * WebStartInstaller constructor.
   */
@@ -106,25 +111,36 @@
      InputStream in =
          getZipInputStream(getRatio(InstallProgressStep.EXTRACTING));
      notifyListeners(getTaskSeparator());
      setStatus(InstallProgressStep.EXTRACTING);
      notifyListeners(getTaskSeparator());
      createParentDirectoryIfRequired();
      extractZipFiles(in, getRatio(InstallProgressStep.EXTRACTING),
          getRatio(InstallProgressStep.CONFIGURING_SERVER));
      try
      {
        in.close();
      }
      catch (Throwable t)
      {
        LOG.log(Level.INFO, "Error closing zip input stream: "+t, t);
      }
      setStatus(InstallProgressStep.CONFIGURING_SERVER);
      notifyListeners(getTaskSeparator());
      // Write java home before calling Installation class.  The installation
      // class does a call to start-ds to get information about the build.
      writeJavaHome();
      setInstallation(new Installation(getUserData().getServerLocation()));
      setStatus(InstallProgressStep.CONFIGURING_SERVER);
      configureServer();
      createData();
      updateADS();
      writeJavaHome();
      if (Utils.isWindows())
      {
          notifyListeners(getTaskSeparator());
@@ -277,7 +293,6 @@
          getMsg("error-zipinputstreamnull", new String[] {zipName}), null);
    }
    notifyListeners(getFormattedDone());
    return in;
  }