Package org.springframework.beans

Examples of org.springframework.beans.FatalBeanException


            if (logger != null) {
                try {                                                      
                    pd.getWriteMethod().invoke(bean, new Object[] { logger });
                } catch (Throwable e) {
                    throw new FatalBeanException("Problem injecting logger.  " + e.getMessage(), e);
                }
            }
        }
    }
View Full Code Here


                factory.setArguments(new Object[] { loggerName });
                factory.afterPropertiesSet();
               
                result = factory.getObject();
            } catch (Throwable e) {
                throw new FatalBeanException("Problem injecting logger.  " + e.getMessage(), e);
            }
        }
       
        return result;
    }
View Full Code Here

     *
     * @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.");
        }
    }
View Full Code Here

            }

            this.validatorResources = new ValidatorResources(inputStreams);
        }
        catch (IOException e) {
            throw new FatalBeanException("Unable to read validation configuration due to IOException.", e);
        }
        catch (SAXException e) {
            throw new FatalBeanException("Unable to parse validation configuration XML", e);
        }
    }
View Full Code Here

       
        if (referenceObj != null) {
            try {                                                      
                pd.getWriteMethod().invoke(bean, new Object[] { referenceObj });
            } catch (Throwable e) {
                throw new FatalBeanException("Problem injecting reference:  " + e.getMessage(), e);
            }
        }
    }
View Full Code Here

       
        if (propertyObj != null) {
            try {                                                      
                pd.getWriteMethod().invoke(bean, new Object[] { propertyObj });
            } catch (Throwable e) {
                throw new FatalBeanException("Problem injecting property:  " + e.getMessage(), e);
            }
        }
    }
View Full Code Here

                        Object nameObj = componentName;                   
                        if (nameObj != null) {
                            try {                                                      
                                pd.getWriteMethod().invoke(bean, new Object[] { nameObj });
                            } catch (Throwable e) {
                                throw new FatalBeanException("Problem injecting reference:  " + e.getMessage(), e);
                            }
                        }
                    } else {
                        throw new IllegalStateException("ComponentName annotation is supported only on java.lang.String field type.");
                    }
View Full Code Here

            } else {
                try {
                    Object obj = ClassLoaderUtils.loadClass(val, getClass()).newInstance();
                    bean.addConstructorArg(obj);
                } catch (Exception e) {
                    throw new FatalBeanException("Could not load class: " + val, e);
                }
            }
        }
    }
View Full Code Here

            } else {
                try {
                    bean.addPropertyValue(IMPLEMENTOR,
                                          ClassLoaderUtils.loadClass(val, getClass()).newInstance());
                } catch (Exception e) {
                    throw new FatalBeanException("Could not load class: " + val, e);
                }
            }
        }
    }
View Full Code Here

            } else {
                try {
                    Object obj = ClassLoaderUtils.loadClass(val, getClass()).newInstance();
                    bean.addConstructorArg(obj);
                } catch (Exception e) {
                    throw new FatalBeanException("Could not load class: " + val, e);
                }
            }
        }
    }
View Full Code Here

TOP

Related Classes of org.springframework.beans.FatalBeanException

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.