Package org.springframework.context

Examples of org.springframework.context.ApplicationContextException


        try {
            VelocityConfig velocityConfig = getApplicationContext().getBean(VelocityConfig.class);
            return velocityConfig.getVelocityEngine();
        }
        catch (NoSuchBeanDefinitionException ex) {
            throw new ApplicationContextException("please define a VelocityConfig", ex);
        }
    }
View Full Code Here


                resources.add(cpr);
            } 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);
                } else {
                    LogUtils.log(LOG, Level.INFO, "USER_CFG_FILE_NOT_SPECIFIED_MSG", cfgFile);
                }
            }
        }
View Full Code Here

        logger.debug("Loading templates '" + templates + "'");
      }
      return templates;
    }
    catch (TransformerConfigurationException ex) {
      throw new ApplicationContextException("Can't load stylesheet from '" + getUrl() + "'", ex);
    }
    finally {
      closeSourceIfNecessary(stylesheetSource);
    }
  }
View Full Code Here

    try {
      Resource resource = getApplicationContext().getResource(url);
      return new StreamSource(resource.getInputStream(), resource.getURI().toASCIIString());
    }
    catch (IOException ex) {
      throw new ApplicationContextException("Can't load XSLT stylesheet from '" + url + "'", ex);
    }
  }
View Full Code Here

    // get definitions factory
    this.definitionsFactory =
        (DefinitionsFactory) getServletContext().getAttribute(TilesUtilImpl.DEFINITIONS_FACTORY);
    if (this.definitionsFactory == null) {
      throw new ApplicationContextException("Tiles definitions factory not found: TilesConfigurer not defined?");
    }
  }
View Full Code Here

          logger.debug("Mapped view class [" + className + "] to mapping key [" + discriminator + "]");
        }
        this.formatMappings.put(discriminator, ClassUtils.forName(className));
      }
      catch (ClassNotFoundException ex) {
        throw new ApplicationContextException(
            "Class [" + className + "] mapped to format [" + discriminator + "] cannot be found", ex);
      }
    }
  }
View Full Code Here

    this.report = loadReport();

    // Load sub reports if required, and check data source parameters.
    if (this.subReportUrls != null) {
      if (this.subReportDataKeys != null && this.subReportDataKeys.length > 0 && this.reportDataKey == null) {
        throw new ApplicationContextException(
            "'reportDataKey' for main report is required when specifying a value for 'subReportDataKeys'");
      }
      this.subReports = new HashMap(this.subReportUrls.size());
      for (Enumeration urls = this.subReportUrls.propertyNames(); urls.hasMoreElements();) {
        String key = (String) urls.nextElement();
View Full Code Here

        throw new IllegalArgumentException(
            "Report filename [" + fileName + "] must end in either .jasper or .jrxml");
      }
    }
    catch (IOException ex) {
      throw new ApplicationContextException(
          "Could not load JasperReports report from " + resource, ex);
    }
    catch (JRException ex) {
      throw new ApplicationContextException(
          "Could not parse JasperReports report from " + resource, ex);
    }
  }
View Full Code Here

    }
    try {
      getTemplates();
    }
    catch (TransformerConfigurationException ex) {
      throw new ApplicationContextException("Cannot load stylesheet for XSLT view '" + getBeanName() + "'", ex);
    }
  }
View Full Code Here

      String urlPath = url.toString();
      String systemId = urlPath.substring(0, urlPath.lastIndexOf('/') + 1);
      return new StreamSource(url.openStream(), systemId);
    }
    catch (IOException ex) {
      throw new ApplicationContextException("Can't load XSLT stylesheet from " + stylesheetLocation, ex);
    }
  }
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.