Package org.apache.airavata.xbaya

Examples of org.apache.airavata.xbaya.XBayaRuntimeException


                    } catch (XBayaException e) {
                        logger.error(e.getMessage(), e);
                        // An appropriate message has been set in the exception.
                        EmbeddedGFacInvoker.this.notifier.invocationFailed(e.getMessage(), e);
                        EmbeddedGFacInvoker.this.failerSent = true;
                        throw new XBayaRuntimeException(e);
                    } catch (RuntimeException e) {
                        logger.error(e.getMessage(), e);
                        String message = "Error in invoking a service: " + EmbeddedGFacInvoker.this.serviceInformation;
                        EmbeddedGFacInvoker.this.notifier.invocationFailed(message, e);
                        EmbeddedGFacInvoker.this.failerSent = true;
View Full Code Here


            public void actionPerformed(ActionEvent e) {
                try {
                    ExperimentMenu.this.registryAccesser.deleteOGCEWorkflow(ExperimentMenu.this.engine.getWorkflow()
                            .getQname());
                } catch (RegistryException e1) {
                    throw new XBayaRuntimeException(e1);
                }
            }
        });
    }
View Full Code Here

                            break;
                        }
                    }

                    if (null == inputPartName) {
                        throw new XBayaRuntimeException("Could not find a partname in message :" + inputMessage
                                + " for binding :" + wsdlBindingOperation);
                    }

                    body.setAttributeValue(PARTS, inputPartName);
View Full Code Here

        }
        try {
            URL jarURL = new URL(jarURLString);
            return jarURL;
        } catch (MalformedURLException e) {
            throw new XBayaRuntimeException(e);
        }
    }
View Full Code Here

    private JarFile maybeGetJarFile(URL url) {
        String path;
        try {
            path = URLDecoder.decode(url.getPath(), "UTF-8");
        } catch (UnsupportedEncodingException e) {
            throw new XBayaRuntimeException(e);
        }
        logger.info("path: " + path);
        if (path.endsWith("/")) {
            // url = file:/a/b/c/
            // It's a local directory
            return null;
        } else if ("file".equals(url.getProtocol())) {
            // url = file:/a/b/c.jar
            // Jar file
            try {
                JarFile jarFile = new JarFile(path);
                return jarFile;
            } catch (IOException e) {
                throw new XBayaRuntimeException(e);
            }
        } else {
            // url = http://example.com/a/b/c.jar
            // A Jar file
            try {
                if (this.tmpJarDirectory == null) {
                    Date date = new Date();
                    SimpleDateFormat format = new SimpleDateFormat("yyyyMMdd-HHmmss-S");
                    String time = format.format(date);
                    String fileName = ".xbaya-jars-" + time;
                    String tmpdir = System.getProperty("java.io.tmpdir");
                    this.tmpJarDirectory = new File(tmpdir, fileName);
                    this.tmpJarDirectory.mkdir();
                }

                int i = path.lastIndexOf('/');
                File file = new File(this.tmpJarDirectory, path.substring(i + 1));
                logger.info("file: " + file);
                InputStream stream = url.openStream();
                IOUtil.writeToFile(stream, file);
                JarFile jarFile = new JarFile(file);
                return jarFile;
            } catch (IOException e) {
                throw new XBayaRuntimeException(e);
            }
        }
    }
View Full Code Here

                    init();
                }
            });
        } catch (InterruptedException e) {
            // Shouldn't happen.
            throw new XBayaRuntimeException(e);
        } catch (InvocationTargetException e) {
            // Shouldn't happen.
          //It happened
          /* exception occurs when xbaya is opened twice from the jvm
           * org.apache.airavata.xbaya.XBayaRuntimeException: java.lang.reflect.InvocationTargetException
        at org.apache.airavata.xbaya.gui.XBayaGUI.<init>(XBayaGUI.java:148)
        at org.apache.airavata.xbaya.XBayaEngine.<init>(XBayaEngine.java:106)
        at org.apache.airavata.xbaya.XBaya.<init>(XBaya.java:51)
        at org.ogce.paramchem.XBayaLauncher.run(XBayaLauncher.java:44)
        at java.lang.Thread.run(Thread.java:662)
      Caused by: java.lang.reflect.InvocationTargetException
        at java.awt.EventQueue.invokeAndWait(EventQueue.java:1042)
        at javax.swing.SwingUtilities.invokeAndWait(SwingUtilities.java:1326)
        at org.apache.airavata.xbaya.gui.XBayaGUI.<init>(XBayaGUI.java:138)
        ... 4 more
           */
            throw new XBayaRuntimeException(e);
        }
       
        // Following suppsed to jump in the middle to save unsaved workflows when exiting xbaya
        // but its not working because the UI is already disposed it seems :(
//        Runtime.getRuntime().addShutdownHook(new Thread(){
View Full Code Here

            Class<?> runnerClass = this.loader.loadClass(JythonOneTimeRunnerImpl.class.getName(), true);
            JythonOneTimeRunner runner = (JythonOneTimeRunner) runnerClass.newInstance();
            runner.run(script, arguments);

        } catch (ClassNotFoundException e) {
            throw new XBayaRuntimeException(ErrorMessages.UNEXPECTED_ERROR, e);
        } catch (InstantiationException e) {
            throw new XBayaRuntimeException(ErrorMessages.UNEXPECTED_ERROR, e);
        } catch (IllegalAccessException e) {
            throw new XBayaRuntimeException(ErrorMessages.UNEXPECTED_ERROR, e);
        } finally {
            loader.cleanUp();
        }
    }
View Full Code Here

        if (fromPort == wsPort) {
          toPort.copyType(wsPort);
        } else if (toPort == wsPort) {
          fromPort.copyType(wsPort);
        } else {
          throw new XBayaRuntimeException();
        }
      }
    }

  }
View Full Code Here

            if (xmlNamespace.getName().equals(messageQname.getNamespaceURI())) {
                return xmlNamespace.getPrefix();
            }
        }

        throw new XBayaRuntimeException("Cannot locate the Namespace  for Qname:" + messageQname + " in the BPEL");
    }
View Full Code Here

   * @param node
   * @return null if not the same
   */
  public static String isSameLabeledInput(Node node) {
    if (!isAllInputsConnected(node)) {
      throw new XBayaRuntimeException("Node inputs not connected" + node);
    }
    if (!isAllInputsLabeled(node)) {
      throw new XBayaRuntimeException(
          "Some or all of the node inputs not labeled" + node);
    }
    List<DataPort> inputPorts = node.getInputPorts();
    String label = inputPorts.get(0).getEdge(0).getLabel();
    for (DataPort dataPort : inputPorts) {
View Full Code Here

TOP

Related Classes of org.apache.airavata.xbaya.XBayaRuntimeException

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.