Spring Framework FatalBeanException - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Spring Framework FatalBeanException class.

This code example shows how to use the following methods:
 
	public void testAlwaysTrueForThrowable() { 
		RollbackRuleAttribute rr = new RollbackRuleAttribute(java.lang.Throwable.class.getName());
		assertTrue(rr.getDepth(new MyRuntimeException("")) > 0);
		assertTrue(rr.getDepth(new IOException()) > 0);
		assertTrue(rr.getDepth(new FatalBeanException(null,null)) > 0);
		assertTrue(rr.getDepth(new RuntimeException()) > 0);
	} 
 
	public void testCtorArgMustBeAThrowableClassWithNonThrowableType() { 
		try { 
			new RollbackRuleAttribute(StringBuffer.class);
			fail("Cannot construct a RollbackRuleAttribute with a non-Throwable type");
		} 
		catch (IllegalArgumentException expected) {
		} 
	} 
 
	public void testCtorArgMustBeAThrowableClassWithNullThrowableType() { 
		try { 
6
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
	 * Create a new {@code ApplicationContextException} 
	 * with the specified detail message and no root cause. 
	 * @param msg the detail message 
	 */ 
	public ApplicationContextException(String msg) { 
		super(msg); 
	} 
 
	/** 
	 * Create a new {@code ApplicationContextException} 
	 * with the specified detail message and the given root cause. 
	 * @param msg the detail message 
	 * @param cause the root cause 
	 */ 
	public ApplicationContextException(String msg, Throwable cause) { 
		super(msg, cause); 
	} 
 
} 
6
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
        try { 
            this.context = (OmeroContext) applicationContext;
            //this.store = new OMEROMetadataStore(new ServiceFactory(context)); 
            //this.reader = null; // new OMEROWrapper(); WORKAROUND for NPE 
        } catch (Exception e) {
            throw new FatalBeanException("Error creating ImportProcessor", e);
        } 
    } 
 
    public Process process(long id) {
        try { 
            log.warn("NO-OP"); 
            // this.library = new ImportLibrary(store, reader); 
            // for (ImportContainer c : library.getFilesAndDatasets()) { 
            // library.setDataset(c.getDataset()); 
            // String filename = c.file.getAbsolutePath(); 
            // library.open(filename); 
            // Needs synchronization with importer library 
            // library.calculateImageCount(filename); 
            // long pixId = library.importMetadata(filename); 
5
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
     * 
     * @throws org.springframework.beans.FatalBeanException if <code>setValidationConfigLocations()</code> has not been called. 
     */ 
    public void afterPropertiesSet() throws Exception {
        if (this.validatorResources == null) {
            throw new FatalBeanException("Unable to locate validation configuration. Property [validationLocations] is required.");
        } 
    } 
 
    /** 
     * Sets the locations of the validation configuration files from which to load validation rules. Creates an instance 
     * of <code>ValidatorResources</code> from the specified configuration files. 
     * 
     * @see org.springframework.core.io.Resource 
     * @see ValidatorResources 
     */ 
    public void setValidationConfigLocations(Resource[] validationConfigLocations) {
 
        if (DefaultValidatorFactory.log.isInfoEnabled()) {
            DefaultValidatorFactory.log.info("Loading validation configurations from [" + StringUtils.arrayToCommaDelimitedString(validationConfigLocations) + "]");
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
				componentReport.setPostProcessStatus(postProcessStatus);
				report.setUpdated();
			} 
		} catch (Throwable t) {
			ApsSystemUtils.logThrowable(t, this, "executePostInitProcesses", "Error while executing post processes");
			throw new FatalBeanException("Error while executing post processes", t);
		} finally { 
			if (null != report && report.isUpdated()) {
				this.saveReport(report);
			} 
		} 
	} 
	 
	protected SystemInstallationReport.Status executePostProcesses(List<IPostProcess> postProcesses) throws ApsSystemException {
		if (null == postProcesses || postProcesses.isEmpty()) {
			return SystemInstallationReport.Status.NOT_AVAILABLE; 
		} 
		for (int i = 0; i < postProcesses.size(); i++) {
			IPostProcess postProcess = postProcesses.get(i);
			try { 
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
                    log.debug("Initializing bean [" + name + "]...");
                } 
 
                ((Initializable) object).init();
            } catch (Exception e) {
                throw new FatalBeanException("Error initializing bean [" + name + "]", e);
            } 
        } 
        return object;
    } 
 
 
    /** 
     * Does nothing - merely returns the object argument immediately. 
     */ 
    public Object postProcessAfterInitialization(Object object, String name) throws BeansException {
        // Does nothing after initialization 
        return object;
    } 
 
3
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
    } else if ("sun".equals(aTimer)) {
       try { 
        Class clazz = Class.forName("etm.core.timer.SunHighResTimer. Please try 'jdk15' or 'default' instead.");
        builder.addConstructorArg(clazz.newInstance());
      } catch (Exception e) {
        throw new FatalBeanException("SunHighResTimer is not available for this platform.", e);
      } 
    } else if ("default".equals(aTimer)) {
      builder.addConstructorArg(new DefaultTimer());
    } else if ("bestAvailable".equals(aTimer)) {
      builder.addConstructorArg(EtmMonitorFactory.bestAvailableTimer());
    } else { 
      RootBeanDefinition timerBeanDefinition = new RootBeanDefinition();
      timerBeanDefinition.setBeanClassName(aTimer);
      builder.addConstructorArg(timerBeanDefinition);
    } 
  } 
} 
3
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
        } 
        else { 
            Class beanClass = bean.getClass();
            Method namedPCLAdder = getNamedPCLAdder(beanClass);
            if (namedPCLAdder == null)
                throw new FatalBeanException("Could not find the bean method"
                        + "/npublic void addPropertyChangeListener(String, PropertyChangeListener);/nin bean '" + bean
                        + "'"); 
            try { 
                namedPCLAdder.invoke(bean, new Object[] {propertyName, listener});
            } 
            catch (InvocationTargetException e) {
                throw new FatalBeanException("Due to an InvocationTargetException we failed to add "
                        + "a named PropertyChangeListener to bean '" + bean + "'", e);
            } 
            catch (IllegalAccessException e) {
                throw new FatalBeanException("Due to an IllegalAccessException we failed to add "
                        + "a named PropertyChangeListener to bean '" + bean + "'", e);
            } 
        } 
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
        return memoizerDirectory;
    } 
 
	public void setApplicationEventPublisher(ApplicationEventPublisher pub) {
	    if (this.pub != null) {
	        throw new FatalBeanException("Publisher already set.");
	    } 
	    this.pub = pub;
	} 
 
    public void setFilePathResolver(FilePathResolver resolver)
    { 
        this.resolver = resolver;
    } 
 
	/** 
	 * Creates a PixelBuffer for a given pixels set. 
	 * 
	 * @param pixels Pixels set to create a pixel buffer for. 
	 * @return Allocated pixel buffer ready to be used. 
1
CodeRank
Experience pair programming with AI  Get Codota for Java