Package org.globus.workspace.client_core

Examples of org.globus.workspace.client_core.ExecutionProblem


            fw = new FileWriter(metadataFile);
            fw.write("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
            fw.write(metadata);
            fw.flush();
        } catch (IOException e) {
            throw new ExecutionProblem(e.getMessage(), e);
        } finally {
            if (fw != null) {
                try {
                    fw.close();
                } catch (IOException e) {
                    throw new ExecutionProblem(e.getMessage(), e);
                }
            }
        }

        return metadataFile.getAbsolutePath();
View Full Code Here


            fw = new FileWriter(reqFile);
            fw.write("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
            fw.write(metadata);
            fw.flush();
        } catch (IOException e) {
            throw new ExecutionProblem(e.getMessage(), e);
        } finally {
            if (fw != null) {
                try {
                    fw.close();
                } catch (IOException e) {
                    throw new ExecutionProblem(e.getMessage(), e);
                }
            }
        }

        return reqFile.getAbsolutePath();
View Full Code Here

            FileUtils.writeStringToFile(data, f.getAbsolutePath());

            return f.getAbsolutePath();

        } catch (Exception e) {
            throw new ExecutionProblem("Problem turning the cluster " +
                    "information into text that the context agents " +
                    "on the VMs can consume: " + e.getMessage(), e);
        }
    }
View Full Code Here

            throw new IllegalArgumentException("prefix may not be null or empty");
        }

        final String[] subdirs = topdir.list(new dirFilter());
        if (subdirs == null) {
            throw new ExecutionProblem("Problem examining history dir '" +
                    topdir.getAbsolutePath() + "'");
        }

        print.debugln("history subdirs length: " + subdirs.length);
View Full Code Here

        // (for development only, to attach a remote debugger etc)
        if (CLIUtils.containsDebuggerHang(args)) {
            try {
                CLIUtils.hangForInput(cli.getPr());
            } catch (IOException e) {
                throw new ExecutionProblem("", e);
            }
        }

        CommonPrint.logArgs(args, cli.getPr());
View Full Code Here

                        "there is no port type to call done/launch with");
            }
        } catch (BaseFaultType e) {
            final String err =
                    CommonStrings.faultStringOrCommonCause(e, "ensemble");
            throw new ExecutionProblem(err, e);
        }

        if (this.pr.enabled()) {
            if (this.pr.useThis()) {
                final String msg = " done.";
View Full Code Here


    public void runImpl() throws ParameterProblem, ExecutionProblem {

        if (this.rpQuery == null) {
            throw new ExecutionProblem("validation was not run?");
        }
       
        if (this.args.dryrun) {

            if (this.pr.enabled()) {
View Full Code Here

        String shortName = null;
        final File epr = new File(eprPath);
        final String dirName = epr.getParentFile().getName();

        if (dirName.startsWith(HistoryUtil.historyClusterDirPrefix)) {
            throw new ExecutionProblem("Cluster handles are not supported, " +
                    "use the \"--" + Opts.STATUS_CHECK_OPT_STRING +
                    "\" option by itself instead.");
        }

        if (dirName.startsWith(HistoryUtil.historyDirPrefix)) {

            print.debugln("Surmising from EPR parent directory that " +
                          "short name is '" + dirName +
                          "' (used for printing only)");

            shortName = dirName;
        }

        print.infoln("Querying for '" + dirName + "' information:");
        print.infoln("  - Workspace handle (EPR): '" + eprPath + "'");

        final FutureTask task =
                new FutureTask(
                        new QueryTask(eprPath, idAuthz, shortName,
                                      print));
       
        this.executor.submit(task);

        try {
            final Integer retCode = (Integer) task.get();
            if (retCode.intValue() != BaseClient.SUCCESS_EXIT_CODE) {
                throw new ExitNow(retCode.intValue());
            }
        } catch (InterruptedException e) {
            throw new ExecutionProblem(e.getMessage(), e);
        } catch (ExecutionException e) {
            throw new ExecutionProblem(e.getMessage(), e);
        }
    }
View Full Code Here

        final File ipIdDir = new File(epr.getParentFile(), "id-ip-dir");
        final String ipIdDirPath = ipIdDir.getAbsolutePath();
        print.debugln("Surmising from context EPR parent directory that " +
                          "id-ip-dir is: " + ipIdDirPath);
        if (!ipIdDir.exists()) {
            throw new ExecutionProblem("Could not find the 'id-ip-dir' for this handle, " +
                    "was it a virtual cluster launched with the context broker?");
        }

        final FutureTask task =
                new FutureTask(
                        new PrintContextStatusTask(eprPath, brokerIdAuthz, shortName,
                                             ipIdDirPath, print));

        this.executor.submit(task);

        try {
            final Integer retCode = (Integer) task.get();
            if (retCode.intValue() != BaseClient.SUCCESS_EXIT_CODE) {
                throw new ExitNow(retCode.intValue());
            }
        } catch (InterruptedException e) {
            throw new ExecutionProblem(e.getMessage(), e);
        } catch (ExecutionException e) {
            throw new ExecutionProblem(e.getMessage(), e);
        }
    }
View Full Code Here

            final Integer retCode = (Integer) task.get();
            if (retCode.intValue() != BaseClient.SUCCESS_EXIT_CODE) {
                throw new ExitNow(retCode.intValue());
            }
        } catch (InterruptedException e) {
            throw new ExecutionProblem(e.getMessage(), e);
        } catch (ExecutionException e) {
            throw new ExecutionProblem(e.getMessage(), e);
        }
    }
View Full Code Here

TOP

Related Classes of org.globus.workspace.client_core.ExecutionProblem

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.