opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/Installation.java
@@ -342,10 +342,10 @@ * configuration is stored in config/upgrade/config.ldif.[svn rev]. * * @return Configuration object representing the base configuration. * @throws QuickSetupException if there was a problem determining the * @throws ApplicationException if there was a problem determining the * svn rev number. */ public Configuration getBaseConfiguration() throws QuickSetupException { public Configuration getBaseConfiguration() throws ApplicationException { if (baseConfiguration == null) { baseConfiguration = new Configuration(getBaseConfigurationFile()); } @@ -390,10 +390,10 @@ * customizations. * * @return File object with no * @throws QuickSetupException if there was a problem determining the * @throws ApplicationException if there was a problem determining the * svn revision number */ public File getBaseSchemaFile() throws QuickSetupException { public File getBaseSchemaFile() throws ApplicationException { return new File(getConfigurationUpgradeDirectory(), "schema.ldif." + getSvnRev().toString()); } @@ -404,10 +404,10 @@ * customizations. * * @return File object with no * @throws QuickSetupException if there was a problem determining the * @throws ApplicationException if there was a problem determining the * svn revision number */ public File getBaseConfigurationFile() throws QuickSetupException { public File getBaseConfigurationFile() throws ApplicationException { return new File(getConfigurationUpgradeDirectory(), BASE_CONFIG_FILE_PREFIX + getSvnRev().toString()); } @@ -417,10 +417,10 @@ * configuration file config/upgrade/config.ldif.[svn rev #]. * * @return Integer representing the svn number * @throws QuickSetupException if for some reason the number could not * @throws ApplicationException if for some reason the number could not * be determined */ public Integer getSvnRev() throws QuickSetupException { public Integer getSvnRev() throws ApplicationException { Integer rev = null; File configUpgradeDir = getConfigurationUpgradeDirectory(); if (configUpgradeDir.exists()) { @@ -448,8 +448,9 @@ } if (rev == null) { // TODO: i18n throw new QuickSetupException(QuickSetupException.Type.FILE_SYSTEM_ERROR, "Could not determine SVN rev", null); throw new ApplicationException( ApplicationException.Type.FILE_SYSTEM_ERROR, "Could not determine SVN rev", null); } return rev; } @@ -457,9 +458,9 @@ /** * Gets the build ID which is the 14 digit number code like 20070420110336. * @return String representing the build ID * @throws QuickSetupException if something goes wrong * @throws ApplicationException if something goes wrong */ public String getBuildId() throws QuickSetupException { public String getBuildId() throws ApplicationException { if (buildId == null) { List<String> args = new ArrayList<String>(); args.add(Utils.getPath(getServerStartCommandFile())); @@ -479,7 +480,7 @@ } } } catch (IOException e) { throw new QuickSetupException(QuickSetupException.Type.START_ERROR, throw new ApplicationException(ApplicationException.Type.START_ERROR, "Error attempting to determine build ID", e); } finally { if (is != null) { opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/QuickSetupException.java
File was deleted opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/installer/Installer.java
@@ -576,9 +576,9 @@ * the base dn and the number of entries to be generated. * * @return the file object pointing to the create template file. * @throws QuickSetupException if an error occurs. * @throws ApplicationException if an error occurs. */ protected File createTemplateFile() throws QuickSetupException { protected File createTemplateFile() throws ApplicationException { try { return SetupUtils.createTemplateFile( @@ -588,17 +588,17 @@ catch (IOException ioe) { String failedMsg = getThrowableMsg("error-creating-temp-file", null, ioe); throw new QuickSetupException(QuickSetupException.Type.FILE_SYSTEM_ERROR, failedMsg, ioe); throw new ApplicationException( ApplicationException.Type.FILE_SYSTEM_ERROR, failedMsg, ioe); } } /** * This methods configures the server based on the contents of the UserData * object provided in the constructor. * @throws QuickSetupException if something goes wrong. * @throws ApplicationException if something goes wrong. */ protected void configureServer() throws QuickSetupException { protected void configureServer() throws ApplicationException { notifyListeners(getFormattedWithPoints(getMsg("progress-configuring"))); ArrayList<String> argList = new ArrayList<String>(); @@ -692,14 +692,14 @@ if (result != 0) { throw new QuickSetupException( QuickSetupException.Type.CONFIGURATION_ERROR, throw new ApplicationException( ApplicationException.Type.CONFIGURATION_ERROR, getMsg("error-configuring"), null); } } catch (Throwable t) { throw new QuickSetupException( QuickSetupException.Type.CONFIGURATION_ERROR, throw new ApplicationException( ApplicationException.Type.CONFIGURATION_ERROR, getThrowableMsg("error-configuring", null, t), t); } @@ -805,8 +805,8 @@ } catch (Throwable t) { throw new QuickSetupException( QuickSetupException.Type.CONFIGURATION_ERROR, throw new ApplicationException( ApplicationException.Type.CONFIGURATION_ERROR, getThrowableMsg("error-configuring-certificate", null, t), t); } } @@ -814,9 +814,9 @@ /** * This methods creates the base entry for the suffix based on the contents of * the UserData object provided in the constructor. * @throws QuickSetupException if something goes wrong. * @throws ApplicationException if something goes wrong. */ protected void createBaseEntry() throws QuickSetupException { protected void createBaseEntry() throws ApplicationException { String[] arg = { getUserData().getNewSuffixOptions().getBaseDn() }; notifyListeners(getFormattedWithPoints( @@ -850,14 +850,14 @@ if (result != 0) { throw new QuickSetupException( QuickSetupException.Type.CONFIGURATION_ERROR, throw new ApplicationException( ApplicationException.Type.CONFIGURATION_ERROR, getMsg("error-creating-base-entry"), null); } } catch (Throwable t) { throw new QuickSetupException( QuickSetupException.Type.CONFIGURATION_ERROR, throw new ApplicationException( ApplicationException.Type.CONFIGURATION_ERROR, getThrowableMsg("error-creating-base-entry", null, t), t); } @@ -867,9 +867,9 @@ /** * This methods imports the contents of an LDIF file based on the contents of * the UserData object provided in the constructor. * @throws QuickSetupException if something goes wrong. * @throws ApplicationException if something goes wrong. */ protected void importLDIF() throws QuickSetupException { protected void importLDIF() throws ApplicationException { String[] arg = { getUserData().getNewSuffixOptions().getLDIFPath() }; notifyListeners(getFormattedProgress(getMsg("progress-importing-ldif", arg)) @@ -896,14 +896,14 @@ if (result != 0) { throw new QuickSetupException( QuickSetupException.Type.CONFIGURATION_ERROR, throw new ApplicationException( ApplicationException.Type.CONFIGURATION_ERROR, getMsg("error-importing-ldif"), null); } } catch (Throwable t) { throw new QuickSetupException( QuickSetupException.Type.CONFIGURATION_ERROR, throw new ApplicationException( ApplicationException.Type.CONFIGURATION_ERROR, getThrowableMsg("error-importing-ldif", null, t), t); } } @@ -911,9 +911,9 @@ /** * This methods imports automatically generated data based on the contents * of the UserData object provided in the constructor. * @throws QuickSetupException if something goes wrong. * @throws ApplicationException if something goes wrong. */ protected void importAutomaticallyGenerated() throws QuickSetupException { protected void importAutomaticallyGenerated() throws ApplicationException { File templatePath = createTemplateFile(); int nEntries = getUserData().getNewSuffixOptions().getNumberEntries(); String[] arg = @@ -946,23 +946,23 @@ if (result != 0) { String[] msgArgs = { Utils.stringArrayToString(args, " ") }; throw new QuickSetupException( QuickSetupException.Type.CONFIGURATION_ERROR, throw new ApplicationException( ApplicationException.Type.CONFIGURATION_ERROR, getMsg("error-import-automatically-generated", msgArgs), null); } } catch (Throwable t) { throw new QuickSetupException( QuickSetupException.Type.CONFIGURATION_ERROR, throw new ApplicationException( ApplicationException.Type.CONFIGURATION_ERROR, getThrowableMsg("error-import-automatically-generated", null, t), t); } } /** * This methods enables this server as a Windows service. * @throws QuickSetupException if something goes wrong. * @throws ApplicationException if something goes wrong. */ protected void enableWindowsService() throws QuickSetupException { protected void enableWindowsService() throws ApplicationException { notifyListeners(getFormattedProgress( getMsg("progress-enabling-windows-service"))); InstallerHelper helper = new InstallerHelper(); @@ -1086,9 +1086,9 @@ /** * This methods updates the data on the server based on the contents of the * UserData object provided in the constructor. * @throws QuickSetupException if something goes wrong. * @throws ApplicationException if something goes wrong. */ protected void createData() throws QuickSetupException protected void createData() throws ApplicationException { if (createNotReplicatedSuffix()) { @@ -1117,8 +1117,15 @@ /* TODO: replicate them. */ Set<SuffixDescriptor> suffixesToReplicate = getUserData().getSuffixesToReplicateOptions().getAvailableSuffixes(); boolean startedServer = false; if (suffixesToReplicate.size() > 0) { startServerWithoutConnectionHandlers(); startedServer = true; } for (SuffixDescriptor suffix: suffixesToReplicate) { // TODO: localize notifyListeners(getFormattedWithPoints("Creating Suffix")); ArrayList<String> argList = new ArrayList<String>(); @@ -1140,30 +1147,34 @@ if (result != 0) { throw new QuickSetupException( QuickSetupException.Type.CONFIGURATION_ERROR, throw new ApplicationException( ApplicationException.Type.CONFIGURATION_ERROR, getMsg("error-configuring"), null); } } catch (Throwable t) { throw new QuickSetupException( QuickSetupException.Type.CONFIGURATION_ERROR, throw new ApplicationException( ApplicationException.Type.CONFIGURATION_ERROR, getThrowableMsg("error-configuring", null, t), t); } notifyListeners(getFormattedDone()); // TO REMOVE // TODO: localize notifyListeners( getFormattedProgress("One day we will replicate the suffixes!")); } if (startedServer) { getServerController().stopServerInProcess(); } } } /** * This methods updates the ADS contents (and creates the according suffixes). * @throws QuickSetupException if something goes wrong. * @throws ApplicationException if something goes wrong. */ protected void updateADS() throws QuickSetupException protected void updateADS() throws ApplicationException { if (true) return; /* First check if the remote server contains an ADS: if it is the case the @@ -1251,22 +1262,22 @@ catch (NoPermissionException x) { String[] arg = {getHostDisplay(auth)}; throw new QuickSetupException( QuickSetupException.Type.CONFIGURATION_ERROR, throw new ApplicationException( ApplicationException.Type.CONFIGURATION_ERROR, getMsg("cannot-connect-to-remote-permissions", arg), x); } catch (NamingException ne) { String[] arg = {getHostDisplay(auth)}; throw new QuickSetupException( QuickSetupException.Type.CONFIGURATION_ERROR, throw new ApplicationException( ApplicationException.Type.CONFIGURATION_ERROR, getMsg("cannot-connect-to-remote-generic", arg), ne); } catch (ADSContextException ace) { String[] args = {getHostDisplay(auth), ace.toString()}; throw new QuickSetupException( QuickSetupException.Type.CONFIGURATION_ERROR, throw new ApplicationException( ApplicationException.Type.CONFIGURATION_ERROR, getMsg("remote-ads-exception", args), ace); } finally @@ -1295,8 +1306,8 @@ } catch (ADSContextException ace) { throw new QuickSetupException( QuickSetupException.Type.CONFIGURATION_ERROR, throw new ApplicationException( ApplicationException.Type.CONFIGURATION_ERROR, getMsg("local-ads-exception"), ace); } notifyListeners(getFormattedDone()); opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/installer/InstallerHelper.java
File was renamed from opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/InstallerHelper.java @@ -25,11 +25,12 @@ * Portions Copyright 2006-2007 Sun Microsystems, Inc. */ package org.opends.quicksetup; package org.opends.quicksetup.installer; import java.io.File; import java.io.IOException; import org.opends.quicksetup.ApplicationException; import org.opends.quicksetup.i18n.ResourceProvider; import org.opends.quicksetup.webstart.JnlpProperties; import org.opends.quicksetup.util.Utils; @@ -53,10 +54,10 @@ * Invokes the method ConfigureDS.configMain with the provided parameters. * @param args the arguments to be passed to ConfigureDS.configMain. * @return the return code of the ConfigureDS.configMain method. * @throws QuickSetupException if something goes wrong. * @throws ApplicationException if something goes wrong. * @see org.opends.server.tools.ConfigureDS#configMain(String[]). */ public int invokeConfigureServer(String[] args) throws QuickSetupException { public int invokeConfigureServer(String[] args) throws ApplicationException { return org.opends.server.tools.ConfigureDS.configMain(args); } @@ -64,10 +65,10 @@ * Invokes the method ImportLDIF.mainImportLDIF with the provided parameters. * @param args the arguments to be passed to ImportLDIF.mainImportLDIF. * @return the return code of the ImportLDIF.mainImportLDIF method. * @throws org.opends.quicksetup.QuickSetupException if something goes wrong. * @throws org.opends.quicksetup.ApplicationException if something goes wrong. * @see org.opends.server.tools.ImportLDIF#mainImportLDIF(String[]). */ public int invokeImportLDIF(String[] args) throws QuickSetupException { public int invokeImportLDIF(String[] args) throws ApplicationException { return org.opends.server.tools.ImportLDIF.mainImportLDIF(args); } @@ -83,9 +84,9 @@ /** * This methods enables this server as a Windows service. * @throws QuickSetupException if something goes wrong. * @throws ApplicationException if something goes wrong. */ public void enableWindowsService() throws QuickSetupException { public void enableWindowsService() throws ApplicationException { int code = org.opends.server.tools.ConfigureWindowsService.enableService( System.out, System.err); @@ -100,8 +101,8 @@ org.opends.server.tools.ConfigureWindowsService.SERVICE_ALREADY_ENABLED: break; default: throw new QuickSetupException( QuickSetupException.Type.WINDOWS_SERVICE_ERROR, throw new ApplicationException( ApplicationException.Type.WINDOWS_SERVICE_ERROR, errorMessage, null); } } @@ -122,10 +123,10 @@ * baseDn. * @param baseDn the dn of the entry that will be created in the LDIF file. * @return the File object pointing to the created temporary file. * @throws QuickSetupException if something goes wrong. * @throws ApplicationException if something goes wrong. */ public File createBaseEntryTempFile(String baseDn) throws QuickSetupException { throws ApplicationException { File ldifFile; try { @@ -134,8 +135,8 @@ } catch (IOException ioe) { String failedMsg = getThrowableMsg("error-creating-temp-file", null, ioe); throw new QuickSetupException(QuickSetupException.Type.FILE_SYSTEM_ERROR, failedMsg, ioe); throw new ApplicationException( ApplicationException.Type.FILE_SYSTEM_ERROR, failedMsg, ioe); } try @@ -156,20 +157,20 @@ writer.writeEntry(entry); writer.close(); } catch (org.opends.server.types.DirectoryException de) { throw new QuickSetupException( QuickSetupException.Type.CONFIGURATION_ERROR, throw new ApplicationException( ApplicationException.Type.CONFIGURATION_ERROR, getThrowableMsg("error-importing-ldif", null, de), de); } catch (org.opends.server.util.LDIFException le) { throw new QuickSetupException( QuickSetupException.Type.CONFIGURATION_ERROR, throw new ApplicationException( ApplicationException.Type.CONFIGURATION_ERROR, getThrowableMsg("error-importing-ldif", null, le), le); } catch (IOException ioe) { throw new QuickSetupException( QuickSetupException.Type.CONFIGURATION_ERROR, throw new ApplicationException( ApplicationException.Type.CONFIGURATION_ERROR, getThrowableMsg("error-importing-ldif", null, ioe), ioe); } catch (Throwable t) { throw new QuickSetupException( QuickSetupException.Type.BUG, getThrowableMsg( throw new ApplicationException( ApplicationException.Type.BUG, getThrowableMsg( "bug-msg", t), t); } return ldifFile; opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/installer/offline/OfflineInstaller.java
@@ -31,7 +31,7 @@ import java.util.ArrayList; import java.util.HashMap; import org.opends.quicksetup.QuickSetupException; import org.opends.quicksetup.ApplicationException; import org.opends.quicksetup.ProgressStep; import org.opends.quicksetup.installer.Installer; import org.opends.quicksetup.installer.InstallProgressStep; @@ -105,7 +105,7 @@ setStatus(InstallProgressStep.FINISHED_SUCCESSFULLY); notifyListeners(null); } catch (QuickSetupException ex) } catch (ApplicationException ex) { setStatus(InstallProgressStep.FINISHED_WITH_ERROR); String html = getFormattedError(ex, true); @@ -114,8 +114,8 @@ catch (Throwable t) { setStatus(InstallProgressStep.FINISHED_WITH_ERROR); QuickSetupException ex = new QuickSetupException( QuickSetupException.Type.BUG, getThrowableMsg("bug-msg", t), t); ApplicationException ex = new ApplicationException( ApplicationException.Type.BUG, getThrowableMsg("bug-msg", t), t); String msg = getFormattedError(ex, true); notifyListeners(msg); } opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/installer/webstart/WebStartInstaller.java
File was deleted opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/ui/GuiApplication.java
@@ -28,12 +28,15 @@ package org.opends.quicksetup.ui; import org.opends.quicksetup.*; import org.opends.quicksetup.util.ServerController; import org.opends.quicksetup.webstart.WebStartDownloader; import javax.swing.*; import java.awt.event.WindowEvent; import java.io.IOException; import java.util.LinkedHashSet; import java.util.Set; import java.util.logging.Level; import java.util.logging.Logger; /** @@ -390,10 +393,10 @@ * process, then maxRatio will be 25. When the download is complete this * method will send a notification to the ProgressUpdateListeners with a ratio * of 25 %. * @throws org.opends.quicksetup.QuickSetupException if something goes wrong * @throws org.opends.quicksetup.ApplicationException if something goes wrong * */ protected void waitForLoader(Integer maxRatio) throws QuickSetupException { protected void waitForLoader(Integer maxRatio) throws ApplicationException { int lastPercentage = -1; WebStartDownloader.Status lastStatus = WebStartDownloader.Status.DOWNLOADING; @@ -455,4 +458,38 @@ public int getExtraDialogHeight() { return 0; } /** * Starts the server to be able to update its configuration but not allowing * it to listen to external connections. * @throws ApplicationException if the server could not be started. */ protected void startServerWithoutConnectionHandlers() throws ApplicationException { try { ServerController control = new ServerController(this); if (getInstallation().getStatus().isServerRunning()) { control.stopServer(); } control.startServerInProcess(true); } catch (IOException e) { String msg = "Failed to determine server state: " + e.getLocalizedMessage(); LOG.log(Level.INFO, msg, e); throw new ApplicationException(ApplicationException.Type.IMPORT_ERROR, msg, e); } catch (org.opends.server.types.InitializationException e) { String msg = "Failed to start server due to initialization error:" + e.getLocalizedMessage(); LOG.log(Level.INFO, msg, e); throw new ApplicationException(ApplicationException.Type.IMPORT_ERROR, msg, e); } catch (org.opends.server.config.ConfigException e) { String msg = "Failed to start server due to configuration error: " + e.getLocalizedMessage(); LOG.log(Level.INFO, msg, e); throw new ApplicationException(ApplicationException.Type.IMPORT_ERROR, msg, e); } } } opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/upgrader/BuildExtractor.java
@@ -124,7 +124,7 @@ } private void expandZipFile(File buildFile) throws ApplicationException, IOException, QuickSetupException { throws ApplicationException, IOException { ZipExtractor extractor = new ZipExtractor(buildFile, 1, 10, // TODO figure out these values Utils.getNumberZipEntries(), this); opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/upgrader/Upgrader.java
@@ -439,7 +439,7 @@ public void run() { try { installation.getBuildId(); } catch (QuickSetupException e) { } catch (ApplicationException e) { LOG.log(Level.INFO, "error", e); } } @@ -557,7 +557,7 @@ if (Utils.isWebStart()) { try { waitForLoader(15); // TODO: ratio } catch (QuickSetupException e) { } catch (ApplicationException e) { LOG.log(Level.SEVERE, "Error downloading WebStart jars", e); throw e; } @@ -868,7 +868,7 @@ private void verifyUpgrade() throws ApplicationException { try { new ServerController(this).startServer(); } catch (QuickSetupException e) { } catch (ApplicationException e) { LOG.log(Level.INFO, "Error starting server: " + e.getLocalizedMessage(), e); } @@ -916,34 +916,6 @@ } } private void startServerWithoutConnectionHandlers() throws ApplicationException { try { ServerController control = new ServerController(this); if (getInstallation().getStatus().isServerRunning()) { control.stopServer(); } control.startServerInProcess(true); } catch (IOException e) { String msg = "Failed to determine server state: " + e.getLocalizedMessage(); LOG.log(Level.INFO, msg, e); throw new ApplicationException(ApplicationException.Type.IMPORT_ERROR, msg, e); } catch (org.opends.server.types.InitializationException e) { String msg = "Failed to start server due to initialization error:" + e.getLocalizedMessage(); LOG.log(Level.INFO, msg, e); throw new ApplicationException(ApplicationException.Type.IMPORT_ERROR, msg, e); } catch (org.opends.server.config.ConfigException e) { String msg = "Failed to start server due to configuration error: " + e.getLocalizedMessage(); LOG.log(Level.INFO, msg, e); throw new ApplicationException(ApplicationException.Type.IMPORT_ERROR, msg, e); } } /** * Applies configuration or schema customizations. @@ -1286,7 +1258,7 @@ try { currentVersion = getInstallation().getSvnRev(); } catch (QuickSetupException e) { } catch (ApplicationException e) { LOG.log(Level.INFO, "error", e); throw ApplicationException.createFileSystemException( "Could not determine current version number: " + @@ -1375,7 +1347,7 @@ String newVersion = null; try { newVersion = getInstallation().getBuildId(); } catch (QuickSetupException e) { } catch (ApplicationException e) { newVersion = getMsg("upgrade-build-id-unknown"); } String[] args = { @@ -1429,7 +1401,7 @@ if (this.currentVersion == null) { try { currentVersion = getInstallation().getSvnRev(); } catch (QuickSetupException e) { } catch (ApplicationException e) { LOG.log(Level.INFO, "error trying to determine current version", e); } } opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/upgrader/ui/UpgraderReviewPanel.java
@@ -33,7 +33,7 @@ import org.opends.quicksetup.upgrader.Upgrader; import org.opends.quicksetup.upgrader.UpgradeUserData; import org.opends.quicksetup.upgrader.Build; import org.opends.quicksetup.QuickSetupException; import org.opends.quicksetup.ApplicationException; import org.opends.quicksetup.UserData; import javax.swing.*; @@ -186,7 +186,7 @@ String oldVersion; try { oldVersion = getApplication().getInstallation().getBuildId(); } catch (QuickSetupException e) { } catch (ApplicationException e) { LOG.log(Level.INFO, "error", e); oldVersion = getMsg("upgrade-build-id-unknown"); } opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/util/ServerController.java
@@ -28,6 +28,7 @@ package org.opends.quicksetup.util; import org.opends.quicksetup.*; import org.opends.quicksetup.installer.InstallerHelper; import javax.naming.NamingException; import java.util.ArrayList; @@ -223,9 +224,9 @@ /** * This methods starts the server. * @throws org.opends.quicksetup.QuickSetupException if something goes wrong. * @throws org.opends.quicksetup.ApplicationException if something goes wrong. */ public void startServer() throws QuickSetupException { public void startServer() throws ApplicationException { startServer(true); } @@ -233,9 +234,9 @@ * This methods starts the server. * @param verify boolean indicating whether this method will attempt to * connect to the server after starting to verify that it is listening. * @throws org.opends.quicksetup.QuickSetupException if something goes wrong. * @throws org.opends.quicksetup.ApplicationException if something goes wrong. */ private void startServer(boolean verify) throws QuickSetupException { private void startServer(boolean verify) throws ApplicationException { application.notifyListeners( application.getFormattedProgress( application.getMsg("progress-starting")) + @@ -284,7 +285,7 @@ } } // Check if something wrong occurred reading the starting of the server QuickSetupException ex = errReader.getException(); ApplicationException ex = errReader.getException(); if (ex == null) { ex = outputReader.getException(); @@ -349,13 +350,15 @@ if (Utils.isWindows()) { throw new QuickSetupException(QuickSetupException.Type.START_ERROR, throw new ApplicationException( ApplicationException.Type.START_ERROR, application.getMsg("error-starting-server-in-windows", arg), null); } else { throw new QuickSetupException(QuickSetupException.Type.START_ERROR, throw new ApplicationException( ApplicationException.Type.START_ERROR, application.getMsg("error-starting-server-in-unix", arg), null); } } @@ -363,7 +366,7 @@ } catch (IOException ioe) { throw new QuickSetupException(QuickSetupException.Type.START_ERROR, throw new ApplicationException(ApplicationException.Type.START_ERROR, application.getThrowableMsg("error-starting-server", ioe), ioe); } } @@ -476,7 +479,7 @@ */ private class StartReader { private QuickSetupException ex; private ApplicationException ex; private boolean isFinished; @@ -533,14 +536,14 @@ { String errorMsg = application.getThrowableMsg(errorTag, ioe); ex = new QuickSetupException(QuickSetupException.Type.START_ERROR, new ApplicationException(ApplicationException.Type.START_ERROR, errorMsg, ioe); } catch (Throwable t) { String errorMsg = application.getThrowableMsg(errorTag, t); ex = new QuickSetupException(QuickSetupException.Type.START_ERROR, new ApplicationException(ApplicationException.Type.START_ERROR, errorMsg, t); } isFinished = true; @@ -550,12 +553,12 @@ } /** * Returns the QuickSetupException that occurred reading the Start error and * output or <CODE>null</CODE> if no exception occurred. * Returns the ApplicationException that occurred reading the Start error * and output or <CODE>null</CODE> if no exception occurred. * @return the exception that occurred reading or <CODE>null</CODE> if * no exception occurred. */ public QuickSetupException getException() public ApplicationException getException() { return ex; } opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/util/ZipExtractor.java
@@ -27,7 +27,7 @@ package org.opends.quicksetup.util; import org.opends.quicksetup.QuickSetupException; import org.opends.quicksetup.ApplicationException; import org.opends.quicksetup.Application; import org.opends.quicksetup.i18n.ResourceProvider; @@ -102,18 +102,18 @@ /** * Performs the zip extraction. * @param destination File where the zip file will be extracted * @throws QuickSetupException if something goes wrong * @throws ApplicationException if something goes wrong */ public void extract(File destination) throws QuickSetupException { public void extract(File destination) throws ApplicationException { extract(Utils.getPath(destination)); } /** * Performs the zip extraction. * @param destination File where the zip file will be extracted * @throws QuickSetupException if something goes wrong * @throws ApplicationException if something goes wrong */ public void extract(String destination) throws QuickSetupException { public void extract(String destination) throws ApplicationException { ZipInputStream zipIn = new ZipInputStream(is); int nEntries = 1; @@ -156,8 +156,8 @@ Utils.getThrowableMsg(ResourceProvider.getInstance(), "error-copying", arg, ioe); throw new QuickSetupException( QuickSetupException.Type.FILE_SYSTEM_ERROR, throw new ApplicationException( ApplicationException.Type.FILE_SYSTEM_ERROR, errorMsg, ioe); } } @@ -199,8 +199,8 @@ String errorMsg = Utils.getThrowableMsg(ResourceProvider.getInstance(), "error-zip-stream", arg, ioe); throw new QuickSetupException(QuickSetupException.Type.FILE_SYSTEM_ERROR, errorMsg, ioe); throw new ApplicationException( ApplicationException.Type.FILE_SYSTEM_ERROR, errorMsg, ioe); } } opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/webstart/WebStartDownloader.java
@@ -37,7 +37,7 @@ import javax.jnlp.UnavailableServiceException; import org.opends.quicksetup.i18n.ResourceProvider; import org.opends.quicksetup.QuickSetupException; import org.opends.quicksetup.ApplicationException; import org.opends.quicksetup.util.Utils; /** @@ -52,7 +52,7 @@ */ public class WebStartDownloader implements DownloadServiceListener, JnlpProperties { private QuickSetupException ex; private ApplicationException ex; private boolean isFinished; @@ -121,12 +121,12 @@ { // This is a bug ex = new QuickSetupException(QuickSetupException.Type.BUG, new ApplicationException(ApplicationException.Type.BUG, getExceptionMsg( "bug-msg", mfe), mfe); } catch (IOException ioe) { StringBuffer buf = new StringBuffer(); StringBuilder buf = new StringBuilder(); String[] jars = getJarUrls(); for (int i = 0; i < jars.length; i++) { @@ -139,13 +139,13 @@ String[] arg = { buf.toString() }; ex = new QuickSetupException(QuickSetupException.Type.DOWNLOAD_ERROR, new ApplicationException(ApplicationException.Type.DOWNLOAD_ERROR, getExceptionMsg("downloading-error", arg, ioe), ioe); } catch (Throwable t) { // This is a bug ex = new QuickSetupException(QuickSetupException.Type.BUG, new ApplicationException(ApplicationException.Type.BUG, getExceptionMsg( "bug-msg", t), t); } @@ -334,12 +334,12 @@ } /** * Returns the QuickSetupException that has occurred during the download or * Returns the ApplicationException that has occurred during the download or * <CODE>null</CODE> if no exception occurred. * @return the QuickSetupException that has occurred during the download or * @return the ApplicationException that has occurred during the download or * <CODE>null</CODE> if no exception occurred. */ public QuickSetupException getException() public ApplicationException getException() { return ex; } @@ -350,9 +350,8 @@ public void downloadFailed(URL url, String version) { ex = new QuickSetupException(QuickSetupException.Type.DOWNLOAD_ERROR, getMsg( "downloading-error", new String[] { url.toString() }), null); new ApplicationException(ApplicationException.Type.DOWNLOAD_ERROR, getMsg("downloading-error", new String[] { url.toString() }), null); } /**