org.springframework.beans.BeanInstantiationException

Here are the examples of the java api org.springframework.beans.BeanInstantiationException taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

2 Examples 7

19 Source : AbstractInjectionFailureAnalyzer.java
with Apache License 2.0
from yuanmabiji

private String getDescription(BeanInstantiationException ex) {
    if (ex.getConstructingMethod() != null) {
        return String.format("Method %s in %s", ex.getConstructingMethod().getName(), ex.getConstructingMethod().getDeclaringClreplaced().getName());
    }
    if (ex.getConstructor() != null) {
        return String.format("Constructor in %s", ClreplacedUtils.getUserClreplaced(ex.getConstructor().getDeclaringClreplaced()).getName());
    }
    return ex.getBeanClreplaced().getName();
}

19 Source : AbstractInjectionFailureAnalyzer.java
with Apache License 2.0
from yuanmabiji

private String getDescription(Throwable rootFailure) {
    UnsatisfiedDependencyException unsatisfiedDependency = findMostNestedCause(rootFailure, UnsatisfiedDependencyException.clreplaced);
    if (unsatisfiedDependency != null) {
        return getDescription(unsatisfiedDependency);
    }
    BeanInstantiationException beanInstantiationException = findMostNestedCause(rootFailure, BeanInstantiationException.clreplaced);
    if (beanInstantiationException != null) {
        return getDescription(beanInstantiationException);
    }
    return null;
}