Package org.springframework.beans.factory

Examples of org.springframework.beans.factory.BeanDefinitionStoreException


             * Unmarshaller unmarshaller =
             * getJaxbContext().createUnmarshaller(); return
             * unmarshaller.unmarshal(element);
             */
        } catch (JAXBException e) {
            throw new BeanDefinitionStoreException("Failed to parse JAXB element: " + e, e);
        }
    }
View Full Code Here


             * Unmarshaller unmarshaller =
             * getJaxbContext().createUnmarshaller(); return
             * unmarshaller.unmarshal(element);
             */
        } catch (JAXBException e) {
            throw new BeanDefinitionStoreException("Failed to parse JAXB element: " + e, e);
        }
    }
View Full Code Here

                               AbstractBeanDefinition definition,
                               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;
    }
View Full Code Here

            {
               visitor.visitBeanDefinition(bd);
            }
            catch (BeanDefinitionStoreException ex)
            {
               throw new BeanDefinitionStoreException(bd.getResourceDescription(), beanNames[i], ex.getMessage());
            }
         }
      }
   }
View Full Code Here

                  {
                     beanFactory.setParentBeanFactory((BeanFactory) Util.lookup(parentBeanFactoryName, BeanFactory.class));
                  }
                  catch (Exception e)
                  {
                     throw new BeanDefinitionStoreException("Failure during parent bean factory JNDI lookup: " + parentBeanFactoryName, e);
                  }
               }
               Matcher inst = parse(nodeValue, INSTANTIATION_ELEMENT);
               if (inst.find())
               {
View Full Code Here

         * DispatcherServlet has been stored into the ServetContext as an
         * attribute as advertised by SafeDispatcherServlet. we rely on knowing
         * the particular exception that the underlying DispatcherServlet throws
         * under these circumstances;
         */
        BeanDefinitionStoreException bdse = (BeanDefinitionStoreException) this.mockContext
            .getAttribute(SafeDispatcherServlet.CAUGHT_THROWABLE_KEY);
        assertNotNull(bdse);

    }
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.apache.servicemix.jbi.container.ActivationSpec");
        addPropertyElement(registration, "id", id);
        Element componentProperty = addPropertyElement(registration, "component");
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

    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

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.