Package org.springframework.context

Examples of org.springframework.context.ApplicationContextException


    try {
      // Check that we can get the template, even if we might subsequently get it again.
      getTemplate(this.layoutUrl);
    }
    catch (ResourceNotFoundException ex) {
      throw new ApplicationContextException("Cannot find Velocity template for URL [" + this.layoutUrl +
          "]: Did you specify the correct resource loader path?", ex);
    }
    catch (Exception ex) {
      throw new ApplicationContextException(
          "Could not load Velocity template for URL [" + this.layoutUrl + "]", ex);
    }
  }
View Full Code Here


      logger.debug("ContextLoaderPlugIn for Struts ActionServlet '" + getServletName() +
          "', module '" + getModulePrefix() + "' will try to create custom WebApplicationContext " +
          "context of class '" + getContextClass().getName() + "', using parent context [" + parent + "]");
    }
    if (!ConfigurableWebApplicationContext.class.isAssignableFrom(getContextClass())) {
      throw new ApplicationContextException(
          "Fatal initialization error in ContextLoaderPlugIn for Struts ActionServlet '" + getServletName() +
          "', module '" + getModulePrefix() + "': custom WebApplicationContext class [" +
          getContextClass().getName() + "] is not of type ConfigurableWebApplicationContext");
    }
View Full Code Here

      logger.debug("Portlet with name '" + getPortletName() +
          "' will try to create custom ApplicationContext context of class '" +
          getContextClass().getName() + "'" + ", using parent context [" + parent + "]");
    }
    if (!ConfigurablePortletApplicationContext.class.isAssignableFrom(getContextClass())) {
      throw new ApplicationContextException("Fatal initialization error in portlet with name '" + getPortletName() +
          "': custom ApplicationContext class [" + getContextClass().getName() +
          "] is not of type ConfigurablePortletApplicationContext");
    }

    ConfigurablePortletApplicationContext pac =
View Full Code Here

      logger.debug("Servlet with name '" + getServletName() +
          "' will try to create custom WebApplicationContext context of class '" +
          getContextClass().getName() + "'" + ", using parent context [" + parent + "]");
    }
    if (!ConfigurableWebApplicationContext.class.isAssignableFrom(getContextClass())) {
      throw new ApplicationContextException(
          "Fatal initialization error in servlet with name '" + getServletName() +
          "': custom WebApplicationContext class [" + getContextClass().getName() +
          "] is not of type ConfigurableWebApplicationContext");
    }
View Full Code Here

      return finallyInvoked;
    }

    public void doTest() throws Exception {
      try {
        throw new ApplicationContextException("foo");
      }
      catch (Exception ex) {
        catchInvoked = true;
        throw ex;
      }
View Full Code Here

      logger.debug("Portlet with name '" + getPortletName() +
          "' will try to create custom ApplicationContext context of class '" +
          getContextClass().getName() + "'" + ", using parent context [" + parent + "]");
    }
    if (!ConfigurablePortletApplicationContext.class.isAssignableFrom(getContextClass())) {
      throw new ApplicationContextException("Fatal initialization error in portlet with name '" + getPortletName() +
          "': custom ApplicationContext class [" + getContextClass().getName() +
          "] is not of type ConfigurablePortletApplicationContext");
    }

    ConfigurablePortletApplicationContext pac =
View Full Code Here

        URL xmlUrl = testClass.getResource(resourceName);
        if (xmlUrl != null) {
            xml.loadBeanDefinitions(new UrlResource(xmlUrl));
        } else if (ctxAnno != null) {
            // is this the appropriate exception here?
            throw new ApplicationContextException("Could not find context file named " + resourceName);
        }
    }
View Full Code Here

                LogUtils.log(LOG, Level.INFO, "USER_CFG_FILE_IN_USE", cfgFile);
            } else {
                if (!usingDefault) {
                    LogUtils.log(LOG, Level.WARNING, "USER_CFG_FILE_NOT_LOADED", cfgFile);
                    String message = (new Message("USER_CFG_FILE_NOT_LOADED", LOG, cfgFile)).toString();
                    throw new ApplicationContextException(message);
                }
            }
        }
           
        if (null != cfgFileURLs) {
View Full Code Here

    URL xmlUrl = testClass.getResource(resourceName);
    if ( xmlUrl != null ) {
      xml.loadBeanDefinitions(new UrlResource(xmlUrl));
    } else if ( ctxAnno != null) {
      // is this the appropriate exception here?
      throw new ApplicationContextException("Could not find context file named " + resourceName);
    }
  }
View Full Code Here

                LogUtils.log(LOG, Level.INFO, "USER_CFG_FILE_IN_USE", cfgFile);
            } else {
                if (!usingDefault) {
                    LogUtils.log(LOG, Level.WARNING, "USER_CFG_FILE_NOT_LOADED", cfgFile);
                    String message = (new Message("USER_CFG_FILE_NOT_LOADED", LOG, cfgFile)).toString();
                    throw new ApplicationContextException(message);
                }
            }
        }
           
        if (null != cfgFileURLs) {
View Full Code Here

TOP

Related Classes of org.springframework.context.ApplicationContextException

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.