List of usage examples for org.springframework.beans.factory NoSuchBeanDefinitionException getLocalizedMessage
public String getLocalizedMessage()
From source file:cross.ObjectFactory.java
@Override public <T> T instantiate(final Class<T> c) { if (context != null) { try {// w ww .ja va 2s .c o m T t = context.getBean(c); log.info("Retrieved bean {} from context!", t.getClass().getName()); return t; } catch (NoSuchBeanDefinitionException nsbde) { log.debug("Could not create bean {} from context! Reason:\n {}", c.getName(), nsbde.getLocalizedMessage()); } catch (BeansException be) { log.debug("Could not create bean {} from context! Reason:\n {}", c.getName(), be.getLocalizedMessage()); } } log.info("Using regular configuration mechanism on instance of type " + c.getName()); return configureType(instantiateType(c), this.cfg); }