/** */ @Override protected int executeCommand() throws CommandException, CommandValidationException { throw new CommandException("Not implemented"); } }
if (logger.isLoggable(Level.FINER)) logger.finer("Got exception: " + ex); throw new CommandException( Strings.get("Sync.dirFailed", sr.dir, ex.toString()), ex); } catch (JAXBException jex) { if (logger.isLoggable(Level.FINER)) logger.finer("Got exception: " + jex); throw new CommandException( Strings.get("Sync.dirFailed", sr.dir, jex.toString()), jex); } catch (CommandException cex) { Throwable cause = cex.getCause(); if (logger.isLoggable(Level.FINER)) { logger.finer("Got exception: " + cex); throw new CommandException( Strings.get("Sync.dirFailed", sr.dir, cex.getMessage()), cex); } finally {
if (ce.getCause() instanceof java.net.ConnectException) { logger.severe(ce.getMessage()); try { CLIUtil.displayClosestMatch(command, logger.severe(ce.getMessage()); rc = ERROR; } finally {
throw new CommandException(Strings.get("internal.error", "nodeDirChild was null. The Base Class is supposed to " + "guarantee that this won't happen")); if (ce.getLocalizedMessage() != null) { msg = msg + ": " + ce.getLocalizedMessage(); _rendezvousOccurred = false; throw new CommandException(msg, ce);
throw new CommandException(ce.getMessage());
throw new CommandException(strings.get("UseForceOption")); initDomain(); } catch (CommandException e) { if (e.getCause() != null && (e.getCause() instanceof java.io.IOException)) { throw new CommandException(strings.get("DomainIsNotStopped", domainName));
@Override public void prepareConnection(final HttpURLConnection urlConnection) throws IOException { try { if (useSse()) { urlConnection.addRequestProperty("Accept", MEDIATYPE_SSE); } else { urlConnection.addRequestProperty("Accept", MEDIATYPE_JSON + "; q=0.8, " + MEDIATYPE_MULTIPART + "; q=0.9"); } } catch (CommandException cex) { throw new IOException(cex.getLocalizedMessage(), cex); } // add any user-specified headers for (Header h : requestHeaders) { urlConnection.addRequestProperty(h.getName(), h.getValue()); } //Write data ParamsWithPayload pwp; if (doUpload) { urlConnection.setChunkedStreamingMode(0); pwp = new ParamsWithPayload(outboundPayload, params); } else { pwp = new ParamsWithPayload(null, params); } ProprietaryWriter writer = ProprietaryWriterFactory.getWriter(pwp); if (logger.isLoggable(Level.FINER)) { logger.log(Level.FINER, "Writer to use {0}", writer.getClass().getName()); } writer.writeTo(pwp, urlConnection); }
private void downloadPayloadFromManaged(String jobId) { if (jobId == null) { return; } try { RemoteRestAdminCommand command = new RemoteRestAdminCommand("_get-payload", this.host, this.port, this.secure, this.user, this.password, this.logger, this.scope, this.authToken, this.prohibitDirectoryUploads,notify); ParameterMap params = new ParameterMap(); params.add("DEFAULT", jobId); command.executeCommand(params); } catch (CommandException ex) { logger.log(Level.WARNING, strings.getString("remote.sse.canNotGetPayload", "Cannot retrieve payload. {0}"), ex.getMessage()); } }
return SUCCESS; } catch(CommandException ce) { if ( ce.getCause() instanceof ConnectException) {
if (ce.getCause() instanceof java.net.ConnectException) { logger.severe(ce.getMessage()); try { CLIUtil.displayClosestMatch(command, logger.severe(ce.getMessage()); rc = ERROR;
throw new CommandException( strings.get("CouldNotCreateDomain", domainName), e); logger.info(ce.getLocalizedMessage()); throw new CommandException( strings.get("CouldNotCreateDomain", domainName), ce); throw new CommandException( strings.get("CouldNotCreateDomain", domainName), e);
throw new CommandException(ce.getMessage());
String msg = e.getLocalizedMessage(); logger.warning(msg); report.setActionExitCode(ExitCode.FAILURE);
validate(); } catch (CommandException ce) { report.setMessage(ce.getMessage()); report.setActionExitCode(ActionReport.ExitCode.FAILURE); return;
/** * Make sure the command name is legitimate and * won't allow any URL spoofing attacks. */ private void checkName() throws CommandException { if (!name.matches(COMMAND_NAME_REGEXP)) { throw new CommandException("Illegal command name: " + name); //todo: XXX - I18N } }
if (ce.getCause() instanceof java.net.ConnectException) { logger.severe(ce.getMessage()); try { CLIUtil.displayClosestMatch(command, logger.severe(ce.getMessage()); return ERROR;
} catch (DomainException e) { logger.fine(e.getLocalizedMessage()); throw new CommandException( strings.get("CouldNotCreateDomain", domainName), e); logger.info(ce.getLocalizedMessage()); throw new CommandException( strings.get("CouldNotCreateDomain", domainName), ce); } catch (Exception e) { logger.fine(e.getLocalizedMessage()); throw new CommandException( strings.get("CouldNotCreateDomain", domainName), e);
String msg = e.getLocalizedMessage(); logger.warning(msg); report.setActionExitCode(ExitCode.FAILURE);
/** * Make sure the command name is legitimate and * won't allow any URL spoofing attacks. */ private void checkName() throws CommandException { if (!name.matches(COMMAND_NAME_REGEXP)) { throw new CommandException("Illegal command name: " + name); //todo: XXX - I18N } }
if (ce.getCause() instanceof java.net.ConnectException) { logger.severe(ce.getMessage()); try { CLIUtil.displayClosestMatch(command, logger.severe(ce.getMessage());