Package org.rhq.server.control

Examples of org.rhq.server.control.RHQControlException


                        rValue = RHQControl.EXIT_CODE_INVALID_ARGUMENT;
                    }
                }
            }
        } catch (Exception e) {
            throw new RHQControlException("Failed to stop services", e);
        }
        return rValue;
    }
View Full Code Here


            }

            updateWindowsAgentService(agentDir);

        } catch (Exception e) {
            throw new RHQControlException("An error occurred while executing the upgrade command", e);
        } finally {
            try {
                if (isServerInstalled()) {
                    log.info("\n\n========== UPGRADE SUMMARY ==========");
                    listVersions(commandLine);
View Full Code Here

                        rValue = RHQControl.EXIT_CODE_NOT_INSTALLED;
                    }
                }
            }
        } catch (Exception e) {
            throw new RHQControlException("Failed to start services", e);
        }
        return rValue;
    }
View Full Code Here

        File defaultConfigFile = new File(confDir, "agent-configuration.xml");
        defaultConfigFile.delete();
        try {
            StreamUtil.copy(new FileReader(newConfigFile), new FileWriter(defaultConfigFile));
        } catch (IOException e) {
            throw new RHQControlException(("Failed to replace " + defaultConfigFile + " with " + newConfigFile));
        }
    }
View Full Code Here

                    }
                } else {
                    throw new IllegalArgumentException(option + " is not a supported option");
                }
            } catch (Exception e) {
                throw new RHQControlException("Failed to execute console command", e);
            }
        }
        return rValue;
    }
View Full Code Here

                        rValue = RHQControl.EXIT_CODE_INVALID_ARGUMENT;
                    }
                }
            }
        } catch (Exception e) {
            throw new RHQControlException("Failed to stop services", e);
        }
        return rValue;
    }
View Full Code Here

                    }
                }
            }

        } catch (Exception e) {
            throw new RHQControlException("An error occurred while executing the install command", e);

        } finally {
            if (!start && (startedStorage || startedServer)) {
                Stop stopCommand = new Stop();
                if (startedServer) {
View Full Code Here

                            + " option will be ignored.");
                    }
                }
            }
        } catch (Exception e) {
            throw new RHQControlException("Failed to check statuses", e);
        }
        return rValue;
    }
View Full Code Here

        org.apache.commons.exec.CommandLine commandLine = getCommandLine("rhq-agent-wrapper", "status");
        int rValue = ExecutorAssist.execute(agentBinDir, commandLine);
        if(!isWindows() && rValue > 1 && rValue != 3) {
            // Return codes 0 and agent not running are accepted, but anything else above 0 isn't
            throw new RHQControlException("rhq-agent-wrapper exited with return value " + rValue);
        }
        return rValue;
    }
View Full Code Here

TOP

Related Classes of org.rhq.server.control.RHQControlException

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.