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

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


      {
         manager.deploy("/" + archiveName, archiveURL);
      }
      catch (IOException e)
      {
         throw new DeploymentException("Unable to deploy an archive " + archive.getName(), e);
      }

      ProtocolMetadataParser<TomcatManagedConfiguration> parser = new ProtocolMetadataParser<TomcatManagedConfiguration>(configuration);
      return parser.retrieveContextServletInfo(archiveName);
   }
View Full Code Here


      {
         manager.undeploy("/" + archiveName);
      }
      catch (IOException e)
      {
         throw new DeploymentException("Unable to undeploy an archive " + archive.getName(), e);
      }
   }
View Full Code Here

      HTTPContext httpContext = new HTTPContext(config.getBindAddress(), config.getPort());
          for(ServletHolder servlet : wctx.getServletHandler().getServlets())
              httpContext.add(new Servlet(servlet.getName(), wctx.getContextPath()));
      return new ProtocolMetaData().addContext(httpContext);
    } catch (Exception e) {
      throw new DeploymentException("Could not deploy " + archive.getName(), e);
    }
  }
View Full Code Here

  public void undeploy(Archive<?> archive) throws DeploymentException {
    try {
      stop();
      ctx.delete(config);
    } catch (Exception e) {
      throw new DeploymentException("Error undeploying GWT application", e);
    }
  }
View Full Code Here

            List<String> args = new ArrayList<String>();
            args.add("com.google.appengine.tools.development.DevAppServerMain"); // dev app server

            String sdkDir = (String) addArg(args, "sdk_root", configuration.getSdkDir(), false);
            if (new File(sdkDir).isDirectory() == false)
                throw new DeploymentException("SDK root is not a directory: " + sdkDir);

            String toolsJar = sdkDir + "/lib/appengine-tools-api.jar";
            if (new File(toolsJar).exists() == false)
                throw new DeploymentException("No appengine-tools-api.jar: " + toolsJar);

            System.setProperty("java.class.path", toolsJar);

            addArg(args, "server", configuration.getServer(), true);

            addArg(args, "address", configuration.getAddress(), false);
            addArg(args, "port", configuration.getPort(), false);
            addArg(args, "startOnFirstThread", configuration.isDisableUpdateCheck(), false);
            addArg(args, "disable_update_check", configuration.isStartOnFirstThread());
            boolean isJavaAgentSet = (configuration.getJavaAgent() != null);
            if (isJavaAgentSet) {
                jvm_flag(args, "-noverify");
                jvm_flag(args, "-javaagent:" + configuration.getJavaAgent());
            }

            // add any system properties starting with appengine.test.
            Properties properties = System.getProperties();
            for (String key : properties.stringPropertyNames()) {
                if (key.startsWith(APPENGINE_TEST)) {
                    jvm_flag(args, "-D" + key.substring(APPENGINE_TEST.length()) + "=" + properties.getProperty(key));
                }
            }

            // TODO -- JVM FLAGS
            args.add(getAppLocation().getCanonicalPath());

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

            String serverURL = configuration.getServerTestURL();
            if (serverURL == null)
                serverURL = "http://localhost:" + configuration.getPort() + "/_ah/admin";

            delayArchiveDeploy(serverURL, configuration.getStartupTimeout(), 1000L);

            return getProtocolMetaData(configuration.getAddress(), configuration.getPort(), archive);
        } catch (Exception e) {
            throw new DeploymentException("Cannot deploy to local GAE.", e);
        } finally {
            System.setProperty("java.class.path", classpath);
        }
    }
View Full Code Here

      private DeploymentException deploymentException;

      public MyDeploymentException(String message, Throwable cause)
      {
         super(message);
         this.deploymentException = new DeploymentException("Could not deploy", cause);
      }
View Full Code Here

   public void shouldCatchExceptionInDeploymentContext() throws Exception
   {
      registry.create(container1, serviceLoader).setState(State.STARTED);
      registry.create(container2, serviceLoader).setState(State.STARTED);
     
      when(deployableContainer1.deploy(isA(Archive.class))).thenThrow(new DeploymentException("_TEST_"));
     
      try
      {
         fire(new DeployManagedDeployments());
      }
View Full Code Here

            BundleHandle handle = installBundle(archive);
            deployedBundles.put(archive.getName(), handle);
        } catch (RuntimeException rte) {
            throw rte;
        } catch (Exception ex) {
            throw new DeploymentException("Cannot deploy: " + archive.getName(), ex);
        }
        MBeanServerConnection mbeanServer = mbeanServerInstance.get();
        return new ProtocolMetaData().addContext(new JMXContext(mbeanServer));
    }
View Full Code Here

   }
  
   @Test
   public void shouldSwallowExceptionIfExpected() throws Exception
   {
      TestExceptionDeployThrower.shouldThrow = new DeploymentException("Could not handle ba", new NullPointerException());
      fire(new DeployDeployment(
            container,
            new Deployment(new DeploymentDescription("test", ShrinkWrap.create(JavaArchive.class))
               .setExpectedException(NullPointerException.class))));
   }
View Full Code Here

   }
  
   @Test
   public void shouldCallDeploymentTransformers() throws Exception
   {
      TestExceptionDeployThrower.shouldThrow = new DeploymentException("Could not handle ba", new IllegalArgumentException());
      Mockito.when(serviceLoader.all(DeploymentExceptionTransformer.class)).thenReturn(Arrays.asList(transformer));

      fire(new DeployDeployment(
            container,
            new Deployment(new DeploymentDescription("test", ShrinkWrap.create(JavaArchive.class))
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.