Package org.nasutekds.quicksetup

Examples of org.nasutekds.quicksetup.ApplicationException


        }
      }
    } catch (ApplicationException ae) {
      throw ae;
    } catch (Exception e) {
      throw new ApplicationException(
          ReturnCode.FILE_SYSTEM_ACCESS_ERROR,
              INFO_ERROR_BACKUP_FILESYSTEM.get(),
              e);
    }
  }
View Full Code Here


        fm.copy(f, filesBackupDirectory);
      }
    } catch (ApplicationException ae) {
      throw ae;
    } catch (Exception e) {
      throw new ApplicationException(
          ReturnCode.FILE_SYSTEM_ACCESS_ERROR,
              INFO_ERROR_BACKUP_FILESYSTEM.get(),
              e);
    }
  }
View Full Code Here

    try {
      ExternalTools et = new ExternalTools(getInstallation());
      OperationOutput output = et.backup(getUpgradeBackupDirectory());
      int ret = output.getReturnCode();
      if (ret != 0) {
        throw new ApplicationException(
            ReturnCode.TOOL_ERROR,
                INFO_ERROR_BACKUP_DB_TOOL_RETURN_CODE.get(
                        Integer.toString(ret)),
                null);

      }
    } catch (ApplicationException ae) {
      throw ae;
    } catch (Exception e) {
      throw new ApplicationException(
          ReturnCode.TOOL_ERROR,
              INFO_ERROR_BACKUP_DB.get(), e);
    }
  }
View Full Code Here

        LOG.log(Level.FINEST, "fromProductName=" + fromProductName);
        LOG.log(Level.FINEST, "toProductName=" + toProductName);
        if ((fromProductName != null) &&
                (toProductName != null) &&
                fromProductName.equals(toProductName)) {
          throw new ApplicationException(ReturnCode.APPLICATION_ERROR,
                  INFO_UPGRADE_ORACLE_SAME_VERSION.get(
                  toVersion.toString()), null);
        }
      }
      if (getInstallation().getStatus().isServerRunning()) {
        new ServerController(getInstallation()).stopServer(true);
      }

      this.historicalOperationId =
              writeInitialHistoricalRecord(fromVersion, toVersion);

      insureUpgradability();
    } catch (ApplicationException ae) {
      throw ae;
    } catch (Exception e) {
      throw new ApplicationException(
          ReturnCode.FILE_SYSTEM_ACCESS_ERROR,
              INFO_ERROR_INITIALIZING_UPGRADE.get(), e);
    }
  }
View Full Code Here

      ipsc.startServer();
    } catch (Throwable t) {
      Message msg = INFO_ERROR_STARTING_SERVER_WITH_NO_CONNECTION_HANDLERS.get(
              (t.getMessage() == null) ? t.toString() : t.getMessage());
      LOG.log(Level.INFO, msg.toString(), t);
      throw new ApplicationException(
          ReturnCode.IMPORT_ERROR, msg, t);
    }
  }
View Full Code Here

          WebStartDownloader.this.ex = ex;
        } catch (MalformedURLException mfe)
        {
          // This is a bug
          ex =
              new ApplicationException(ReturnCode.BUG,
                      getThrowableMsg(INFO_BUG_MSG.get(),mfe), mfe);
        } catch (IOException ioe)
        {
          StringBuilder buf = new StringBuilder();
          String[] jars = getJarUrls();
          for (int i = 0; i < jars.length; i++)
          {
            if (i != 0)
            {
              buf.append(",");
            }
            buf.append(jars[i]);
          }
          ex =
              new ApplicationException(
              ReturnCode.DOWNLOAD_ERROR,
              getThrowableMsg(
                      INFO_DOWNLOADING_ERROR.get(buf.toString()), ioe), ioe);
        } catch (Throwable t)
        {
          // This is a bug
          ex =
              new ApplicationException(ReturnCode.BUG,
                      getThrowableMsg(INFO_BUG_MSG.get(), t), t);
        }
      }
    });
    t.start();
View Full Code Here

      }
      else
      {
        setupFile = Installation.UNIX_SETUP_FILE_NAME;
      }
      throw new ApplicationException(
        ReturnCode.DOWNLOAD_ERROR,
        getThrowableMsg(INFO_DOWNLOADING_ERROR_NO_SERVICE_FOUND.get(
            Utils.JNLP_SERVICE_NAME, setupFile),
            e), e);
    }
View Full Code Here

   * {@inheritDoc}
   */
  public void downloadFailed(URL url, String version)
  {
    ex =
        new ApplicationException(
        ReturnCode.DOWNLOAD_ERROR,
                INFO_DOWNLOADING_ERROR.get(url.toString()), null);
  }
View Full Code Here

                    directive.getMessage());
            reason.append(directive.getMessage());
            reason.append(EOL);
          }
        }
        throw new ApplicationException(
            ReturnCode.APPLICATION_ERROR,
                INFO_UPGRADE_ORACLE_UNSUPPORTED.get(
                        currentBuildInfo.toString(),
                        newBuildInfo.toString(),
                        reason.toMessage()),
                null);
      } else {
        if (ui != null) {
          String lineBreak = ui.isCLI() ?
              Constants.LINE_SEPARATOR : Constants.HTML_LINE_BREAK;
          for (VersionIssueNotifier.Directive directive : issues) {
            Message title;
            Message summary;
            Message details;
            Message defaultAction;
            UserInteraction.MessageType msgType;
            switch (directive.getType()) {
              case ACTION:
                title = INFO_GENERAL_ACTION_REQUIRED.get();
                summary = INFO_UPGRADE_ORACLE_ACTION.get();
                details = new MessageBuilder(directive.getMessage())
                        .append(lineBreak)
                        .append(lineBreak)
                        .append(INFO_ORACLE_ACTION_PROMPT.get())
                        .toMessage();
                msgType = UserInteraction.MessageType.WARNING;
                defaultAction = cancel;
                break;
              case INFO:
                title = INFO_GENERAL_INFO.get();
                summary = INFO_UPGRADE_ORACLE_INFO.get();
                details = new MessageBuilder(directive.getMessage())
                        .append(lineBreak)
                        .append(lineBreak)
                        .append(INFO_ORACLE_INFO_PROMPT.get())
                        .toMessage();
                msgType = UserInteraction.MessageType.INFORMATION;
                defaultAction = cont;
                break;
              case WARNING:
                title = INFO_GENERAL_WARNING.get();
                summary = INFO_UPGRADE_ORACLE_WARNING.get();
                details = new MessageBuilder(directive.getMessage())
                        .append(lineBreak)
                        .append(lineBreak)
                        .append(INFO_ORACLE_INFO_PROMPT.get())
                        .toMessage();
                msgType = UserInteraction.MessageType.WARNING;
                defaultAction = cont;
                break;
              default:
                LOG.log(Level.INFO, "Unexpected issue type " +
                        directive.getType());
                title = Message.EMPTY;
                summary = Message.EMPTY;
                details = directive.getMessage();
                msgType = UserInteraction.MessageType.WARNING;
                defaultAction = cont;
            }
            if (cancel.equals(ui.confirm(
                    summary,
                    details,
                    title,
                    msgType,
                    new Message[]{cont, cancel},
                    defaultAction))) {
              throw new ApplicationException(
                  ReturnCode.CANCELED,
                      INFO_UPGRADE_CANCELED.get(), null);
            }
          }
        } else {
          throw new ApplicationException(
              ReturnCode.APPLICATION_ERROR,
              INFO_ORACLE_NO_SILENT.get(), null);
        }
      }
    }
View Full Code Here

        fm.move(f, filesBackupDirectory, filter);
      }
    } catch (ApplicationException ae) {
      throw ae;
    } catch (Exception e) {
      throw new ApplicationException(
              ReturnCode.FILE_SYSTEM_ACCESS_ERROR,
              INFO_ERROR_BACKUP_FILESYSTEM.get(),
              e);
    }
  }
View Full Code Here

TOP

Related Classes of org.nasutekds.quicksetup.ApplicationException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.