List of usage examples for org.springframework.beans.factory BeanCreationException toString
@Override
public String toString()
From source file:at.ac.univie.isc.asio.insight.EventBusEmitter.java
/** * Attempt to resolve a possibly scoped correlation from the provide. Fall back to system * correlation if resolving fails (e.g. not in a request context). *//* ww w . ja v a 2s .c om*/ private Correlation correlation() { try { final Correlation scoped = correlationProvider.get(); log.trace("found scoped correlation - {}", scoped); return scoped; } catch (final BeanCreationException e) { log.trace("no scoped correlation found - falling back to system"); return SYSTEM_CORRELATION; } catch (final Exception e) { log.warn("unexpected error when resolving scoped correlation : {}", e.toString()); return SYSTEM_CORRELATION; } }
From source file:org.springframework.beans.factory.xml.XmlBeanFactoryTests.java
@Test public void testRelatedCausesFromConstructorResolution() { DefaultListableBeanFactory xbf = new DefaultListableBeanFactory(); new XmlBeanDefinitionReader(xbf).loadBeanDefinitions(CONSTRUCTOR_ARG_CONTEXT); try {//from w w w.j av a 2 s . c om xbf.getBean("rod2Accessor"); } catch (BeanCreationException ex) { assertTrue(ex.toString().indexOf("touchy") != -1); ex.printStackTrace(); assertNull(ex.getRelatedCauses()); } }