Package com.google.inject

Examples of com.google.inject.CreationException


        if (value != null && value.contains("%contextRoot%")){
          properties.put(key, value.replace(("%contextRoot%"),contextRoot));
        }
      }
    } catch (IOException e) {
      throw new CreationException(Arrays.asList(
          new Message("Unable to load properties: " + propertyFile)));
    } finally {
      IOUtils.closeQuietly(is);
    }
    return properties;
View Full Code Here


                    initProperties.put(entry.getKey(),
                            value.replace((CONTEXT_ROOT_PLACEHOLDER), getContextRoot()));
                }
            }
        } catch (IOException e) {
            throw new CreationException(Arrays.asList(
                    new Message("Unable to load properties from location: " + overrideProperty
                            + ". " + e.getMessage())
            ));
        }
View Full Code Here

    @Override
    protected void configure() {
        try {
            Message.addExtensionFactory(AxMessage2.class);
        } catch (MessageException e) {
            throw new CreationException(null);
        }

        try {
            Message.addExtensionFactory(HybridOauthMessage.class);
        } catch (MessageException e) {
            throw new CreationException(null);
        }

        bind(ConsumerAssociationStore.class)
                .toInstance(associationStore);
View Full Code Here

    InputStream is = null;
    try {
      is = ResourceLoader.openResource(propertyFile);
      properties.load(is);
    } catch (IOException e) {
      throw new CreationException(Arrays.asList(
          new Message("Unable to load properties: " + propertyFile)));
    } finally {
      IOUtils.closeQuietly( is );
    }
View Full Code Here

  protected void configure() {

    try {
      Message.addExtensionFactory(AxMessage2.class);
    } catch (MessageException e) {
      throw new CreationException(null);
    }

    try {
      Message.addExtensionFactory(HybridOauthMessage.class);
    } catch (MessageException e) {
      throw new CreationException(null);
    }

    bind(ConsumerAssociationStore.class)
        .to(InMemoryConsumerAssociationStore.class)
        .in(Scopes.SINGLETON);
View Full Code Here

  protected void configure() {

    try {
      Message.addExtensionFactory(AxMessage2.class);
    } catch (MessageException e) {
      throw new CreationException(null);
    }

    try {
      Message.addExtensionFactory(HybridOauthMessage.class);
    } catch (MessageException e) {
      throw new CreationException(null);
    }

    bind(ConsumerAssociationStore.class)
        .to(InMemoryConsumerAssociationStore.class)
        .in(Scopes.SINGLETON);
View Full Code Here

  public void throwCreationExceptionIfErrorsExist() {
    if (!hasErrors()) {
      return;
    }

    throw new CreationException(getMessages());
  }
View Full Code Here

    InputStream is = null;
    try {
      is = ResourceLoader.openResource(propertyFile);
      properties.load(is);
    } catch (IOException e) {
      throw new CreationException(Arrays.asList(
          new Message("Unable to load properties: " + propertyFile)));
    } finally {
      IOUtils.closeQuietly( is );
    }
    return properties;
View Full Code Here

          buf.append("\n");
          buf.append("\nResolve above errors before continuing.");
          buf.append("\nComplete stack trace follows:");
        }
        log.error(buf.toString(), first.getCause());
        throw new CreationException(Collections.singleton(first));
      }

      cfgInjector = createCfgInjector();
      sysInjector = createSysInjector();
      sshInjector = createSshInjector();
View Full Code Here

            if (is != null) {
                properties = new Properties();
                properties.load(is);
            }
        } catch (IOException e) {
            throw new CreationException(Arrays.asList(new Message("Unable to load properties: " + propertyFile)));
        } finally {
            IOUtils.closeQuietly(is);
        }

        return properties;
View Full Code Here

TOP

Related Classes of com.google.inject.CreationException

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.