Package org.springframework.beans.factory

Examples of org.springframework.beans.factory.BeanDefinitionStoreException


    protected Object parseUsingJaxb(Element element, ParserContext parserContext, Binder<Node> binder) {
        try {
            return binder.unmarshal(element);
        } catch (JAXBException e) {
            throw new BeanDefinitionStoreException("Failed to parse JAXB element", e);
        }
    }
View Full Code Here


            // now lets parse the routes with JAXB
            Binder<Node> binder;
            try {
                binder = getJaxbContext().createBinder();
            } catch (JAXBException e) {
                throw new BeanDefinitionStoreException("Failed to create the JAXB binder", e);
            }
            Object value = parseUsingJaxb(element, parserContext, binder);

            if (value instanceof CamelRouteContextFactoryBean) {
                CamelRouteContextFactoryBean factoryBean = (CamelRouteContextFactoryBean)value;
View Full Code Here

            // now lets parse the routes with JAXB
            Binder<Node> binder;
            try {
                binder = getJaxbContext().createBinder();
            } catch (JAXBException e) {
                throw new BeanDefinitionStoreException("Failed to create the JAXB binder", e);
            }
            Object value = parseUsingJaxb(element, parserContext, binder);
           
            if (value instanceof CamelContextFactoryBean) {
                // set the property value with the JAXB parsed value
View Full Code Here

                                             
                    this.setProviders(createBeans(classes.get(Provider.class)));
                    this.setServiceBeans(createBeans(classes.get(Path.class)));
                }
            } catch (IOException ex) {
                throw new BeanDefinitionStoreException("I/O failure during classpath scanning", ex);
            } catch (ClassNotFoundException ex) {
                throw new BeanCreationException("Failed to create bean from classfile", ex);
            }
           
            if (bus == null) {
View Full Code Here

        BufferedReader reader = null;   
        try {   
            reader = new BufferedReader(new InputStreamReader(in));     
            String line = reader.readLine();    
            if (line == null) {     
                throw new BeanDefinitionStoreException("Empty file found for: " + uri);     
            }   
            line = line.trim();     
            Class answer = null;    
            try {   
                answer = loadClass(line);   
            }   
            catch (ClassNotFoundException e) {  
                throw new BeanDefinitionStoreException("Could not find class: " + line, e);     
            }   
            try {   
                return (ElementProcessor) answer.newInstance();     
            }   
            catch (Exception e) {   
                throw new BeanDefinitionStoreException("Failed to instantiate bean of type: " + answer.getName() + ". Reason: " + e, e);    
            }   
        }   
        catch (IOException e) {     
            throw new BeanDefinitionStoreException("Failed to load file for URI: " + uri + ". Reason: " + e, e);    
        }   
        finally {   
            try {   
                reader.close();     
            }   
View Full Code Here

        Document document = element.getOwnerDocument();

        Element root = (Element) element.getParentNode();
        String id = element.getAttribute("id");
        if (id == null || id.length() == 0) {
            throw new BeanDefinitionStoreException("A <component> must have an id attribute");
        }

        Element registration = addBeanElement(root, "org.servicemix.jbi.container.ActivationSpec");
        addPropertyElement(registration, "id", id);
        Element componentProperty = addPropertyElement(registration, "component");
View Full Code Here

    protected Object parseUsingJaxb(Element element, ParserContext parserContext, Binder<Node> binder) {
        try {
            return binder.unmarshal(element);
        } catch (JAXBException e) {
            throw new BeanDefinitionStoreException("Failed to parse JAXB element", e);
        }
    }
View Full Code Here

            // now lets parse the routes with JAXB
            Binder<Node> binder;
            try {
                binder = getJaxbContext().createBinder();
            } catch (JAXBException e) {
                throw new BeanDefinitionStoreException("Failed to create the JAXB binder", e);
            }
            Object value = parseUsingJaxb(element, parserContext, binder);

            if (value instanceof CamelRouteContextFactoryBean) {
                CamelRouteContextFactoryBean factoryBean = (CamelRouteContextFactoryBean) value;
View Full Code Here

            // now lets parse the routes with JAXB
            Binder<Node> binder;
            try {
                binder = getJaxbContext().createBinder();
            } catch (JAXBException e) {
                throw new BeanDefinitionStoreException("Failed to create the JAXB binder", e);
            }
            Object value = parseUsingJaxb(element, parserContext, binder);

            if (value instanceof CamelContextFactoryBean) {
                // set the property value with the JAXB parsed value
View Full Code Here

  public void setBeanFactory(BeanFactory beanFactory) throws BeansException {
    super.setBeanFactory(beanFactory);

    // 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");
    }
  }
View Full Code Here

TOP

Related Classes of org.springframework.beans.factory.BeanDefinitionStoreException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.