Spring Framework BeanDefinitionStoreException - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Spring Framework BeanDefinitionStoreException class.

This code example shows how to use the following methods:
		InputSource is = new InputSource(new StringReader(documentContent));
		try { 
			return this.reader.doLoadDocument(is, getResource());
		} 
		catch (Exception ex) {
			throw new BeanDefinitionStoreException("Failed to read XML document", ex);
		} 
	} 
 
} 
6
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:
 
		// Check whether the target bean is defined as prototype. 
		if (!beanFactory.isPrototype(getTargetBeanName())) {
			throw new BeanDefinitionStoreException(
					"Cannot use prototype-based TargetSource against non-prototype bean with name '" + 
					getTargetBeanName() + "': instances would not be independent");
		} 
	} 
 
	/** 
	 * Subclasses should call this method to create a new prototype instance. 
	 * @throws BeansException if bean creation failed 
	 */ 
	protected Object newPrototypeInstance() throws BeansException {
		if (logger.isDebugEnabled()) {
			logger.debug("Creating new instance of bean '" + getTargetBeanName() + "'");
		} 
		return getBeanFactory().getBean(getTargetBeanName());
	} 
 
6
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:
				else { 
					return null; 
				} 
			} 
			catch (BackingStoreException ex) {
				throw new BeanDefinitionStoreException("Cannot access specified node path [" + path + "]", ex);
			} 
		} 
		else { 
			return preferences.get(key, null);
		} 
	} 
 
} 
5
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:
		} 
		catch (TypeMismatchNamingException ex) {
			throw new BeanNotOfRequiredTypeException(name, ex.getRequiredType(), ex.getActualType());
		} 
		catch (NamingException ex) {
			throw new BeanDefinitionStoreException("JNDI environment", name, "JNDI lookup failed", ex);
		} 
	} 
 
	@Override 
	public <T> T getBean(Class<T> requiredType) throws BeansException {
		return getBean(requiredType.getSimpleName(), requiredType);
	} 
 
	@Override 
	public Object getBean(String name, Object... args) throws BeansException {
		if (args != null) {
			throw new UnsupportedOperationException(
					"SimpleJndiBeanFactory does not support explicit bean creation arguments"); 
		} 
5
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:
                               ParserContext ctx)
        throws BeanDefinitionStoreException {
        String id = super.resolveId(elem, definition, ctx);        
         
        if (StringUtils.isEmpty(id)) {
            throw new BeanDefinitionStoreException("The bean id is needed.");
        }        
        return id;
    } 
 
    @Override 
    protected boolean hasBusProperty() { 
        return true; 
    } 
 
    @SuppressWarnings("unchecked") 
    protected Map<String, Object> getPropertyMap(BeanDefinitionBuilder bean, boolean lazyInstantiation) {
        PropertyValue propertyValue = bean.getBeanDefinition().getPropertyValues().getPropertyValue("properties");
         
        Map<String, Object> map = null;
5
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:
		String value = super.resolvePlaceholder(placeholder, props, systemPropertiesMode); 
		if(value == null) { 
			try { 
				value = resolveJdbcPlaceholder(placeholder); 
			}catch(RuntimeException e) { 
				throw new BeanDefinitionStoreException("resolve placeholder by jdbc sql error,placeholder="+placeholder,e); 
			} 
		} 
		return value; 
	} 
 
	private String resolveJdbcPlaceholder(String placeholder) { 
		SqlRowSet rs = new JdbcTemplate(dataSource).queryForRowSet(sql,new Object[]{placeholder}); 
		int columnCount = rs.getMetaData().getColumnCount(); 
		Assert.isTrue(columnCount == 1 || columnCount == 2,"error resultSet columnCount,sql example: select config_value,[default_value] from app_config where config_key=?,[default_value] is option"); 
		if(!rs.next())  
			return null; 
		 
		switch(columnCount) { 
		case 1: 
4
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:
	public void registerBeanDefinition(String beanName, BeanDefinition beanDefinition)
			throws BeanDefinitionStoreException {
		Object oldBeanDefinition = beanDefinitionMap.get(beanName);
		if (oldBeanDefinition != null) {
			if (!allowBeanDefinitionOverriding) {
				throw new BeanDefinitionStoreException("Overrides bean '" + oldBeanDefinition + "'");
			} 
		} 
		else { 
			beanDefinitionNames.add(beanName);
		} 
		beanDefinitionMap.put(beanName, beanDefinition);
	} 
 
	@Override 
	public void registerAlias(String beanName, String alias) throws BeanDefinitionStoreException {
		try { 
			super.registerAlias(beanName, alias);
		} 
		catch (IllegalArgumentException e) {
4
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:
		catch (SAXException ex) {
			throw new XmlBeanDefinitionStoreException(resource.getDescription(),
					"XML document from " + resource + " is invalid", ex);
		} 
		catch (ParserConfigurationException ex) {
			throw new BeanDefinitionStoreException(resource.getDescription(),
					"Parser configuration exception parsing XML from " + resource, ex);
		} 
		catch (IOException ex) {
			throw new BeanDefinitionStoreException(resource.getDescription(),
					"IOException parsing XML document from " + resource, ex);
		} 
		catch (Throwable ex) {
			throw new BeanDefinitionStoreException(resource.getDescription(),
					"Unexpected exception parsing XML document from " + resource, ex);
		} 
	} 
 
	/** 
	 * Actually load the specified document using the configured DocumentLoader. 
4
CodeRank
Connect your IDE to all the code out there  Get Codota for Java