BeanDefinitionStoreException class
The error thrown when a bean definition cannot be registered: an invalid name, or a name that is taken.
An empty name or one starting with & is invalid, and so is a name
already used as an alias of a bean that no longer exists. A taken name
is
reported by the subclass BeanDefinitionOverrideException.
// `&` is reserved for asking for a factory bean itself.
factory.registerBeanDefinition(
BeanDefinition<Clock>(name: '&clock', create: (_) => Clock()),
); // throws: invalid bean name
Spring (Java):
// Spring throws it for invalid definitions, e.g. unreadable XML:
new XmlBeanDefinitionReader(factory).loadBeanDefinitions("bad.xml");
- Inheritance
-
- Object
- BeansException
- BeanDefinitionStoreException
Constructors
- BeanDefinitionStoreException(String message)
-
The registration failed as
messagedescribes.const
Properties
- cause → Object?
-
The error that caused this one, if any: what a constructor threw, or
the container error of a nested bean.
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- message → String
-
A human-readable description of the problem.
finalinherited
- mostSpecificCause → Object
-
rootCause, or this exception when it has no cause. Spring:
getMostSpecificCause().no setterinherited - rootCause → Object?
-
The innermost cause: cause followed through nested container
errors, or
nullwithout a cause. Usually the error that really went wrong. Spring:getRootCause().no setterinherited - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited