List of usage examples for org.springframework.beans BeansException BeansException
public BeansException(@Nullable String msg, @Nullable Throwable cause)
From source file:com.alfresco.orm.repository.RepositoryBeanPostProcessor.java
public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException { Class clazz = bean.getClass(); List<Method> repositoryMethod = ReflectionUtil.setterMethodForAnnotation(clazz, AlfrescoRepositoryBean.class); for (Method method : repositoryMethod) { try {//from w w w.ja va 2 s. c o m method.invoke(bean, AlfrescoRespositoryProxyFactoryBean.getAlfrescoRespositoryProxyFactoryBean() .getObject(method.getParameterTypes()[0])); } catch (IllegalArgumentException e) { throw new BeansException(e.getMessage(), e) { }; } catch (IllegalAccessException e) { throw new BeansException(e.getMessage(), e) { }; } catch (InvocationTargetException e) { throw new BeansException(e.getMessage(), e) { }; } catch (InstantiationException e) { throw new BeansException(e.getMessage(), e) { }; } } return bean; }