|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.lang.Throwable java.lang.Exception java.lang.RuntimeException org.springframework.core.NestedRuntimeException org.springframework.beans.BeansException org.springframework.beans.FatalBeanException org.springframework.beans.factory.BeanCreationException
public class BeanCreationException
Exception thrown when a BeanFactory encounters an error when attempting to create a bean from a bean definition.
Constructor Summary | |
---|---|
BeanCreationException(String msg)
Create a new BeanCreationException. |
|
BeanCreationException(String beanName,
String msg)
Create a new BeanCreationException. |
|
BeanCreationException(String resourceDescription,
String beanName,
String msg)
Create a new BeanCreationException. |
|
BeanCreationException(String resourceDescription,
String beanName,
String msg,
Throwable cause)
Create a new BeanCreationException. |
|
BeanCreationException(String beanName,
String msg,
Throwable cause)
Create a new BeanCreationException. |
|
BeanCreationException(String msg,
Throwable cause)
Create a new BeanCreationException. |
Method Summary | |
---|---|
void |
addRelatedCause(Throwable ex)
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. |
boolean |
contains(Class exClass)
Check whether this exception contains an exception of the given type: either it is of the given class itself or it contains a nested cause of the given type. |
String |
getBeanName()
Return the name of the bean requested, if any. |
Throwable[] |
getRelatedCauses()
Return the related causes, if any. |
String |
getResourceDescription()
Return the description of the resource that the bean definition came from, if any. |
void |
printStackTrace(PrintStream ps)
|
void |
printStackTrace(PrintWriter pw)
|
String |
toString()
|
Methods inherited from class org.springframework.beans.BeansException |
---|
equals, hashCode |
Methods inherited from class org.springframework.core.NestedRuntimeException |
---|
getMessage, getMostSpecificCause, getRootCause |
Methods inherited from class java.lang.Throwable |
---|
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, setStackTrace |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public BeanCreationException(String msg)
msg
- the detail messagepublic BeanCreationException(String msg, Throwable cause)
msg
- the detail messagecause
- the root causepublic BeanCreationException(String beanName, String msg)
beanName
- the name of the bean requestedmsg
- the detail messagepublic BeanCreationException(String beanName, String msg, Throwable cause)
beanName
- the name of the bean requestedmsg
- the detail messagecause
- the root causepublic BeanCreationException(String resourceDescription, String beanName, String msg)
resourceDescription
- description of the resource
that the bean definition came frombeanName
- the name of the bean requestedmsg
- the detail messagepublic BeanCreationException(String resourceDescription, String beanName, String msg, Throwable cause)
resourceDescription
- description of the resource
that the bean definition came frombeanName
- the name of the bean requestedmsg
- the detail messagecause
- the root causeMethod Detail |
---|
public String getBeanName()
public String getResourceDescription()
public void addRelatedCause(Throwable ex)
ex
- the related cause to addpublic Throwable[] getRelatedCauses()
null
if nonepublic String toString()
toString
in class Throwable
public void printStackTrace(PrintStream ps)
printStackTrace
in class Throwable
public void printStackTrace(PrintWriter pw)
printStackTrace
in class Throwable
public boolean contains(Class exClass)
NestedRuntimeException
contains
in class NestedRuntimeException
exClass
- the exception type to look for
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |