List of usage examples for org.springframework.beans.factory NoSuchBeanDefinitionException toString
public String toString()
From source file:com.google.enterprise.connector.persist.MigrateStore.java
/** * Returns the named PersistentStore instance. *//*from w w w . j a v a 2 s . c o m*/ private PersistentStore getPersistentStoreByName(String name) { try { PersistentStore store = (PersistentStore) Context.getInstance().getApplicationContext().getBean(name, PersistentStore.class); if (store == null) { System.err.println("No PersistentStore named " + name + " was found."); } return store; } catch (NoSuchBeanDefinitionException e) { System.err.println("No PersistentStore named " + name + " was found."); } catch (BeansException e) { System.err.println("Spring failure - can't instantiate " + name + ": (" + e.toString() + ")"); } return null; }