package org.springframework.beans.factory;
Exception thrown when a BeanFactory encounters an error when
attempting to create a bean from a bean definition.
- Author(s):
- Juergen Hoeller
Create a new BeanCreationException.
- Parameters:
msg the detail message
Create a new BeanCreationException.
- Parameters:
msg the detail messagecause the root cause
Create a new BeanCreationException.
- Parameters:
beanName the name of the bean requestedmsg the detail message
Create a new BeanCreationException.
- Parameters:
beanName the name of the bean requestedmsg the detail messagecause the root cause
super("Error creating bean with name '" + beanName + "': " + msg, cause); Create a new BeanCreationException.
- Parameters:
resourceDescription description of the resource
that the bean definition came frombeanName the name of the bean requestedmsg the detail message
this(resourceDescription, beanName, msg, null);
Create a new BeanCreationException.
- Parameters:
resourceDescription description of the resource
that the bean definition came frombeanName the name of the bean requestedmsg the detail messagecause the root cause
super("Error creating bean with name '" + beanName + "'" + (resourceDescription != null ? " defined in " + resourceDescription : "") +
Return the name of the bean requested, if any.
Return the description of the resource that the bean
definition came from, if any.
Add a related cause to this bean creation exception,
not being a direct cause of the failure but having occured
earlier in the creation of the same bean instance.
- Parameters:
ex the related cause to add
Return the related causes, if any.
- Returns:
- the array of related causes, or
null if none
sb.append("\nRelated cause: ");