Package org.jboss.arquillian.container.spi.client.container

Examples of org.jboss.arquillian.container.spi.client.container.DeploymentException


        try {
            runCmd(undeployCmd, "undeploy", "./", null, configuration.getUndeployTimeout());
            runCmd(removeDeploymentArchive, "remove", "./", null, configuration.getRemoveTimeout());
        } catch (InterruptedException e) {
            throw new DeploymentException("Cannot undeploy from AppScale.", e);
        }
    }
View Full Code Here


      {
         return ManagementViewParser.parse(deploymentName, profileService);
      }
      catch (Exception e)
      {
         throw new DeploymentException("Could not extract deployment metadata", e);
      }
   }
View Full Code Here

            }
         }
      }
      catch (Exception e)
      {
         throw new DeploymentException("Could not deploy " + deploymentName, e);
      }
      if (failure != null)
      {
         throw new DeploymentException("Failed to deploy " + deploymentName, failure);
      }
   }
View Full Code Here

            failedUndeployments.add(name);
         }
      }
      catch (Exception e)
      {
         throw new DeploymentException("Could not undeploy " + name, e);
      }
   }
View Full Code Here

        prepareArchive(archive);

        try {
            appLocation = export(archive);
        } catch (Exception e) {
            throw new DeploymentException("Cannot export archive " + archive.getName() + ".", e);
        }

        return doDeploy(archive);
    }
View Full Code Here

    }

    protected ProtocolMetaData doDeploy(Archive<?> archive) throws DeploymentException {
        String sdkDir = configuration.getSdkDir();
        if (new File(sdkDir).isDirectory() == false)
            throw new DeploymentException("SDK root is not a directory: " + sdkDir);

        String app;
        try {
            app = getAppLocation().getCanonicalPath();
        } catch (IOException e) {
            throw new DeploymentException("Cannot get app location.", e);
        }

        try {
            log.info(archive.toString(true));

            List<String> args = new ArrayList<String>();

            addArg(args, "email", configuration.getEmail(), false);
            addArg(args, "host", configuration.getHost(), true);
            addArg(args, "compile_encoding", configuration.getEncoding(), true);
            addArg(args, "proxy", configuration.getProxy(), true);
            addArg(args, "passin", configuration.isPassIn());
            if (configuration.isPassIn() == false)
                addArg(args, "disable_prompt", configuration.isPrompt());
            addArg(args, "enable_jar_splitting", configuration.isSplitJars());
            addArg(args, "retain_upload_dir", configuration.isKeepTempUploadDir());
            args.add("update");
            args.add(app);

            invokeAppEngine(sdkDir, "com.google.appengine.tools.admin.AppCfg", args.toArray(new String[args.size()]));

            String host = configuration.getHost();
            if (host == null) {
                host = readAppId(archive) + ".appspot.com";
            }

            String serverURL = configuration.getServerURL();
            if (serverURL == null) {
                serverURL = "http://" + host;
            }

            delayArchiveDeploy(serverURL + "/index.html", configuration.getStartupTimeout(), 60 * 1000L);

            return getProtocolMetaData(host, 80, archive);
        } catch (Exception e) {
            List<String> args = Arrays.asList("rollback", app);
            try {
                invokeAppEngine(sdkDir, "com.google.appengine.tools.admin.AppCfg", args.toArray(new String[args.size()]));
            } catch (Exception ignored) {
            }
            throw new DeploymentException("Cannot deploy to local GAE.", e);
        }
    }
View Full Code Here

                    status = listener.getStatus();
                } while (status == null); // guard against spurious wakeup
            }

            if (status != Status.OK) {
                throw new DeploymentException("Cannot deploy via GAE tools: " + status);
            }

            String id;
            if (module != null) {
                id = app.getApiVersion() + DOT + module + DOT + app.getAppId();
            } else {
                id = app.getVersion() + DOT + app.getAppId();
            }

            String server = configuration.getServer();
            if (server == null) {
                server = "appspot.com";
            }

            return getProtocolMetaData(id + "." + server, configuration.getPort(), archive);
        } catch (DeploymentException e) {
            throw e;
        } catch (AppEngineConfigException e) {
            if (e.getCause() instanceof SAXParseException) {
                String msg = e.getCause().getMessage();

                // have to check what the message says to distinguish a file-not-found
                // problem from some other xml problem.
                if (msg.contains("Failed to read schema document") && msg.contains("backends.xsd")) {
                    throw new IllegalArgumentException("Deploying a project with backends requires App Engine SDK 1.5.0 or greater.", e);
                } else {
                    throw e;
                }
            } else {
                throw e;
            }
        } catch (Exception e) {
            if (e instanceof InterruptedException) {
                Thread.currentThread().interrupt();
            }
            throw new DeploymentException("Cannot deploy via GAE tools.", e);
        }
    }
View Full Code Here

                throw new IllegalStateException("Cannot resolve test bundle - see framework log");

        } catch (RuntimeException rte) {
            throw rte;
        } catch (Exception ex) {
            throw new DeploymentException("Cannot deploy: " + archive, ex);
        }

        return new ProtocolMetaData().addContext(new JMXContext(mbeanServer));
    }
View Full Code Here

         Server server = serverManager.getServer(configuration.getProfileName());
         return ManagementViewParser.parse(archive.getName(), server.getServerConnection());
      }
      catch (Exception e)
      {
         throw new DeploymentException("Could not extract deployment metadata", e);
      }
   }
View Full Code Here

         File deploymentPlan = ShrinkWrapUtil.createDeploymentPlan(deployment);
         progress = deploymentManager.distribute(deploymentManager.getTargets(), deployment, deploymentPlan);
      }
      catch (IOException e)
      {
         throw new DeploymentException("Failed to deploy " + deployment.getName(), e);
      }

      DeploymentStatus status = progress.getDeploymentStatus();
      waitForCompletion(status);
      if (status.getState() == StateType.FAILED)
      {
         throw new DeploymentException("Failed to deploy " + deployment.getName() + ": " + status.getMessage());
      }

      // Start the modules whose IDs are returned by the "distribute" operation.:
      TargetModuleID[] moduleIDs = progress.getResultTargetModuleIDs();
      progress = deploymentManager.start(moduleIDs);
View Full Code Here

TOP

Related Classes of org.jboss.arquillian.container.spi.client.container.DeploymentException

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.