spring-framework / org.springframework.beans / FatalBeanException

FatalBeanException

open class FatalBeanException : BeansException

Thrown on an unrecoverable problem encountered in the beans packages or sub-packages, e.g. bad class or field.

Author
Rod Johnson

Constructors

<init>

FatalBeanException(msg: String)

Create a new FatalBeanException with the specified message.

FatalBeanException(msg: String, cause: Throwable)

Create a new FatalBeanException with the specified message and root cause.

Inheritors

ApplicationContextException

open class ApplicationContextException : FatalBeanException

Exception thrown during application context initialization.

BeanDefinitionValidationException

open class BeanDefinitionValidationException : FatalBeanException

Exception thrown when the validation of a bean definition failed.

BeanExpressionException

open class BeanExpressionException : FatalBeanException

Exception that indicates an expression evaluation attempt having failed.

BeanInitializationException

open class BeanInitializationException : FatalBeanException

Exception that a bean implementation is suggested to throw if its own factory-aware initialization code fails. BeansExceptions thrown by bean factory methods themselves should simply be propagated as-is.

Note that afterPropertiesSet() or a custom "init-method" can throw any exception.

BeanInstantiationException

open class BeanInstantiationException : FatalBeanException

Exception thrown when instantiation of a bean failed. Carries the offending bean class.

CannotLoadBeanClassException

open class CannotLoadBeanClassException : FatalBeanException

Exception thrown when the BeanFactory cannot load the specified class of a given bean.

FactoryBeanNotInitializedException

open class FactoryBeanNotInitializedException : FatalBeanException

Exception to be thrown from a FactoryBean's getObject() method if the bean is not fully initialized yet, for example because it is involved in a circular reference.

Note: A circular reference with a FactoryBean cannot be solved by eagerly caching singleton instances like with normal beans. The reason is that every FactoryBean needs to be fully initialized before it can return the created bean, while only specific normal beans need to be initialized - that is, if a collaborating bean actually invokes them on initialization instead of just storing the reference.