Package org.jboss.arquillian.container.spi

Examples of org.jboss.arquillian.container.spi.ConfigurationException


    }

    public void setup(AppEngineToolsConfiguration configuration) {
        final String sdkDir = configuration.getSdkDir();
        if (sdkDir == null)
            throw new ConfigurationException("AppEngine SDK root is null.");

        final String userId = configuration.getUserId();
        if (userId == null)
            throw new ConfigurationException("Null userId.");

        final String password = configuration.getPassword();
        if (password == null)
            throw new ConfigurationException("Null password.");

        SdkInfo.setSdkRoot(new File(sdkDir));

        this.configuration = configuration;
    }
View Full Code Here


    }

    @Override
    public void validate() throws ConfigurationException {
        if (username != null && password == null) {
            throw new ConfigurationException("username has been set, but no password given");
        }
    }
View Full Code Here

                props.load(input);
                for (String key : props.stringPropertyNames()) {
                    frameworkConfiguration.put(key, props.getProperty(key));
                }
            } catch (IOException ex) {
                throw new ConfigurationException("Cannot read: " + file.getAbsolutePath());
            }
        }

        // Get the {@link FrameworkFactory}
        Iterator<FrameworkFactory> factories = ServiceLoader.load(FrameworkFactory.class).iterator();
View Full Code Here

   {
      int httpResponseCode = hconn.getResponseCode();
      // Supposes that <= 199 is not bad, but is it? See http://en.wikipedia.org/wiki/List_of_HTTP_status_codes
      if (httpResponseCode >= 400 && httpResponseCode < 500)
      {
         throw new ConfigurationException("Unable to connect to Tomcat manager. "
               + "The server command (" + command + ") failed with responseCode ("
               + httpResponseCode + ") and responseMessage (" + hconn.getResponseMessage() + ").\n\n"
               + "Please make sure that you provided correct credentials to an user which is able to access Tomcat manager application.\n"
               + "These credentials can be specified in the Arquillian container configuration as \"user\" and \"pass\" properties.\n"
               + "The user must have appripriate role specified in tomcat-users.xml file.\n");
View Full Code Here

   @Override
   public void validate() throws ConfigurationException
   {
      if (Strings.isNullOrEmpty(classifier))
      {
         throw new ConfigurationException("Classifier should not be null or empty");
      }
   }
View Full Code Here

    private URI getAppURI() {
        URI uri = null;
        try {
            uri = new URI(configuration.get().getBaseURI());
        } catch (URISyntaxException e) {
            throw new ConfigurationException("Parameter \"baseURI\" does not represent a valid URI", e);
        }

        return uri;
    }
View Full Code Here

    @Override
    public void validate() throws ConfigurationException {

        if (getBaseURI() == null) {
            throw new ConfigurationException("Parameter \"baseURI\" must not be null nor empty");
        }
        else {
            try {
                new URI(getBaseURI());
            } catch (URISyntaxException e) {
                throw new ConfigurationException("Parameter \"baseURI\" does not represent a valid URI", e);
            }
        }

        if (getContextRootRemap() != null) {
            try {
                new JSONObject(getContextRootRemap());
            } catch (JSONException e) {
                throw new ConfigurationException("Parameter \"contextRootRemap\" does not represent a valid JSON object", e);
            }
        }
    }
View Full Code Here

      // Verify that the jndi.properties file exists, if specified
      if (jndiProperties != null)
      {
         if (!new File(jndiProperties).canRead())
         {
            throw new ConfigurationException("Cannot locate the jndi.properties file " + jndiProperties);
         }
      }
      // Verify that the openejb.xml resource exists, if specified
      if (openEjbXml != null)
      {
         if (!new File(openEjbXml).canRead())
         {
            throw new ConfigurationException("Cannot locate OpenEJB Configuration file " + openEjbXml);
         }
      }
   }
View Full Code Here

    }

    @Override
    public void validate() throws ConfigurationException {
        if (username != null && password == null) {
            throw new ConfigurationException("username has been set, but no password given");
        }
    }
View Full Code Here

         this.setJmxUri(createJmxUri());
         this.setManagerUrl(createManagerUrl());
      }
      catch (URISyntaxException ex)
      {
         throw new ConfigurationException("JMX URI is not valid, please provide ", ex);
      }
      catch (MalformedURLException e)
      {
         throw new ConfigurationException("JMX URI is not valid", e);
      }
   }
View Full Code Here

TOP

Related Classes of org.jboss.arquillian.container.spi.ConfigurationException

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.