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


                            setServiceClass(serviceClass);
                        }
                    }
                }
            } 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

             * 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

            // 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

    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

            // parserContext for no apparent reason.
            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 SSLContextParametersFactoryBean) {
                SSLContextParametersFactoryBean bean = (SSLContextParametersFactoryBean)value;
               
                builder.addPropertyValue("cipherSuites", bean.getCipherSuites());
                builder.addPropertyValue("cipherSuitesFilter", bean.getCipherSuitesFilter());
                builder.addPropertyValue("secureSocketProtocols", bean.getSecureSocketProtocols());
                builder.addPropertyValue("secureSocketProtocolsFilter", bean.getSecureSocketProtocolsFilter());
                builder.addPropertyValue("keyManagers", bean.getKeyManagers());
                builder.addPropertyValue("trustManagers", bean.getTrustManagers());
                builder.addPropertyValue("secureRandom", bean.getSecureRandom());
               
                builder.addPropertyValue("clientParameters", bean.getClientParameters());
                builder.addPropertyValue("serverParameters", bean.getServerParameters());
            } else {
                throw new BeanDefinitionStoreException("Parsed type is not of the expected type. Expected "
                                                       + SSLContextParametersFactoryBean.class.getName() + " but found "
                                                       + value.getClass().getName());
            }
        }
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

        List<Element> userElts = DomUtils.getChildElementsByTagName(element, ELT_USER);

        if (StringUtils.hasText(userProperties)) {

            if(!CollectionUtils.isEmpty(userElts)) {
                throw new BeanDefinitionStoreException("Use of a properties file and user elements are mutually exclusive");
            }

            BeanDefinition bd = new RootBeanDefinition(PropertiesFactoryBean.class);
            bd.getPropertyValues().addPropertyValue("location", userProperties);
            builder.addConstructorArgValue(bd);

            return;
        }

        if (CollectionUtils.isEmpty(userElts)) {
            throw new BeanDefinitionStoreException("You must supply user definitions, either with <" + ELT_USER + "> child elements or a " +
                "properties file (using the '" + ATT_PROPERTIES + "' attribute)" );
        }

        ManagedList<BeanDefinition> users = new ManagedList<BeanDefinition>();
View Full Code Here

            return id;
        }

        // If top level, use the default name or throw an exception if already used
        if (pc.getRegistry().containsBeanDefinition(BeanIds.USER_DETAILS_SERVICE)) {
            throw new BeanDefinitionStoreException("No id supplied and another " +
                    "bean is already registered as " + BeanIds.USER_DETAILS_SERVICE);
        }

        return BeanIds.USER_DETAILS_SERVICE;
    }
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.