Package com.dtolabs.rundeck.core

Examples of com.dtolabs.rundeck.core.CoreException


                    propValue=lookup.getProperty(CENTRALDISPATCHER_CLS_PROP);
                }
                centralDispatcherMgr = CentralDispatcherMgrFactory.create(propValue, this).getCentralDispatcher();
            } catch (CentralDispatcherException e) {
                System.err.println("unable to load central dispatcher class: "+e.getMessage());
                throw new CoreException(e);
            }
        }

        //plugin manager service inited first.  any pluggable services will then be
        //able to try to load providers via the plugin manager
View Full Code Here


        }

        final String projectsBaseDir = null == projects_base_dir ? getProjectsBaseDir(getBaseDir())
                                     : projects_base_dir;
        if (null == projectsBaseDir) {
            throw new CoreException("projects base dir could not be determined.");
        }
        logger.debug("creating new Framework instance."
                     + "  rdeck_base_dir=" + getBaseDir()
                     + ", projects_base_dir=" + projectsBaseDir
        );
View Full Code Here

        if (null != nodesFile) {
            try {
                unfiltered = FileResourceModelSource.parseFile(nodesFile, this, project);
            } catch (ResourceModelSourceException e) {
                throw new CoreException(e);
            } catch (ConfigurationException e) {
                throw new CoreException(e);
            }
        } else {
            unfiltered = getFrameworkProjectMgr().getFrameworkProject(project).getNodeSet();
        }
        if(0==unfiltered.getNodeNames().size()) {
View Full Code Here

            return wrapDispatcherResult(framework.getExecutionService().dispatchToNodes(context, item));
        } catch (DispatcherException e) {
            return wrapDispatcherException(e);
        } catch (ExecutionServiceException e) {
            //internal error if failure using node dispatchers
            throw new CoreException(e);
        }
    }
View Full Code Here

                        String osName = System.getProperty("os.name");
                        if (!file.renameTo(newDestFile)) {
                            if (osName.toLowerCase().indexOf("windows") > -1 && newDestFile.exists()) {
                                //first remove the destFile
                                if (! newDestFile.delete()) {
                                    throw new CoreException(
                                        "Unable to remove dest file on windows: " +  newDestFile.getAbsolutePath());
                                }
                                if (!file.renameTo(newDestFile)) {
                                    throw new CoreException(
                                        "Unable to move file to dest file on windows: " + file + ", "
                                        + newDestFile.getAbsolutePath());
                                }
                            } else {
                                throw new CoreException(
                                    "Unable to move file to dest file: " + file + ", " + newDestFile.getAbsolutePath());
                            }
                        }
                } finally {
                    lock.release();
                    channel.close();
                }
            }
        } catch (IOException e) {
            System.err.println("IOException: " + e.getMessage());
            e.printStackTrace(System.err);
            throw new CoreException("Unable to rename file: " + e.getMessage(), e);
        }
    }
View Full Code Here

            throws IOException {

        if (sourceLocation.isDirectory()) {
            if (!targetLocation.isDirectory()) {
                if(!targetLocation.mkdirs()) {
                    throw new CoreException("Failed to create target directory: " + targetLocation);
                }
            }

            String[] children = sourceLocation.list();
            for (int i = 0; i < children.length; i++) {
View Full Code Here

        }
        final NodeExecutor nodeExecutor;
        try {
            nodeExecutor = framework.getNodeExecutorForNodeAndProject(node, context.getFrameworkProject());
        } catch (ExecutionServiceException e) {
            throw new CoreException(e);
        }

        //create node context for node and substitute data references in command
        final ExecutionContextImpl nodeContext = new ExecutionContextImpl.Builder(context).nodeContextData(node).build();
View Full Code Here

        URI uri;
        try {
            uri = new URI(requestUrl);
        } catch (URISyntaxException e) {
            throw new CoreException(e.getMessage());
        }

        requestURL = null;
        try {
            requestURL = uri.toURL();
        } catch (MalformedURLException e) {
            throw new CoreException(e.getMessage());
        }
        logger.debug("creating connection object to URL: " + requestUrl);

        httpc = new HttpClient();
        if (null != System.getProperty("http.proxyPort") && null != System.getProperty("http.proxyHost")) {
View Full Code Here

            hc.setMethodType(method);
        }
        try {
            hc.makeRequest();
        } catch (IOException e) {
            throw new CoreException("Error making server request to " + jcUrl + ": " + e.getMessage(), e);
        } catch (HttpClientException e) {
            throw new CoreException("Error making server request to " + jcUrl + ": " + e.getMessage(), e);
        }
        return hc;
    }
View Full Code Here

                                 uploadFile.getName(),
                                 uploadFile)
                };
                return new MultipartRequestEntity(parts, method.getParams());
            } catch (FileNotFoundException e) {
                throw new CoreException(
                    "Could not upload file in request to server: " + uploadFile.getAbsolutePath(), e);
            }
        } else {
            return null;
        }
View Full Code Here

TOP

Related Classes of com.dtolabs.rundeck.core.CoreException

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.