Package org.objectweb.celtix.configuration

Examples of org.objectweb.celtix.configuration.ConfigurationException


        if (o instanceof Element) {
            Element el = (Element)o;
            QName type = new QName(el.getNamespaceURI(), el.getLocalName());
            TypeSchema ts = new TypeSchemaHelper(true).get(type.getNamespaceURI());
            if (null == ts) {
                throw new ConfigurationException(new Message("JAXB_PROPERTY_EDITOR_EXC", LOG, type));
            }
            try {
                return ts.unmarshal(type, el);
            } catch (JAXBException ex) {
                Message msg = new Message("JAXB_PROPERTY_EDITOR_EXC", LOG, type);
                throw new ConfigurationException(msg, ex);
            }
        }

        return o;
    }
View Full Code Here


            }

            try {
                cl = Class.forName(className);
            } catch (ClassCastException ex) {
                throw new ConfigurationException(new Message("COULD_NOT_REGISTER_PROPERTY_EDITOR_EXC", LOG,
                                                             className), ex);
            } catch (ClassNotFoundException ex) {
                throw new ConfigurationException(new Message("COULD_NOT_REGISTER_PROPERTY_EDITOR_EXC", LOG,
                                                             className), ex);
            }

            if (cl == String.class) {
                continue;
View Full Code Here

    }

    public Configuration buildConfiguration(String namespaceUri, String id, Configuration parent) {
        ConfigurationMetadata model = getModel(namespaceUri);
        if (null == model) {
            throw new ConfigurationException(new Message("UNKNOWN_NAMESPACE_EXC", BUNDLE, namespaceUri));
        }
        /*
        if (parent != null && !isValidChildConfiguration(model, parent)) {
            throw new ConfigurationException(new Message("INVALID_CHILD_CONFIGURATION",
                                                         BUNDLE, namespaceUri,
                                                         parent.getModel().getNamespaceURI()));
        }
        */
        if (parent == null && !isValidTopConfiguration(model, parent)) {
            throw new ConfigurationException(new Message("INVALID_TOP_CONFIGURATION",
                                                         BUNDLE, namespaceUri));
        }

        Configuration c = new CeltixConfigurationImpl(model, id, parent);
        if (null == parent) {
View Full Code Here

        if (o instanceof Element) {
            Element el = (Element)o;
            QName type = new QName(el.getNamespaceURI(), el.getLocalName());
            TypeSchema ts = new TypeSchemaHelper(true).get(type.getNamespaceURI());
            if (null == ts) {
                throw new ConfigurationException(new Message("JAXB_PROPERTY_EDITOR_EXC", LOG, type));
            }
            try {
                return ts.unmarshal(type, el);
            } catch (JAXBException ex) {
                Message msg = new Message("JAXB_PROPERTY_EDITOR_EXC", LOG, type);
                throw new ConfigurationException(msg, ex);
            }
        }

        return o;
    }
View Full Code Here

        if (o instanceof Element) {
            Element el = (Element)o;
            QName type = new QName(el.getNamespaceURI(), el.getLocalName());
            TypeSchema ts = new TypeSchemaHelper(true).get(type.getNamespaceURI());
            if (null == ts) {
                throw new ConfigurationException(new Message("JAXB_PROPERTY_EDITOR_EXC", LOG, type));
            }
            try {
                return ts.unmarshal(type, el);
            } catch (JAXBException ex) {
                Message msg = new Message("JAXB_PROPERTY_EDITOR_EXC", LOG, type);
                throw new ConfigurationException(msg, ex);
            }
        }

        return o;
    }      
View Full Code Here

    public InputSource resolveEntity(String publicId, String systemId) throws IOException {
        if (systemId != null && systemId.equals(DTD_SYSTEM_ID)) {
            InputStream is = ResourceManagerImpl.instance().getResourceAsStream(getDtdFile());
            if (is == null) {
                throw new ConfigurationException(new Message("COULD_NOT_RESOLVE_BEANS_DTD_EXC", LOG,
                                                             DTD_SYSTEM_ID));
            }
            InputSource source = new InputSource(is);
            source.setPublicId(publicId);
            source.setSystemId(systemId);
View Full Code Here

            }
            m = beanObject.getClass().getMethod(methodName, new Class[] {});
            return m.invoke(beanObject);

        } catch (Exception ex) {
            throw new ConfigurationException(new Message("BEAN_INCOVATION_EXC", LOG), ex);
        }
    }
View Full Code Here

            m.invoke(beanObject, value);
            return true;

        } catch (Exception ex) {
            ex.printStackTrace();
            throw new ConfigurationException(new Message("BEAN_INCOVATION_EXC", LOG), ex);
        }
    }
View Full Code Here

            } catch (NoSuchBeanDefinitionException ex) {
                if (LOG.isLoggable(Level.FINE)) {
                    LOG.fine("Could not find definition for bean with id " + beanName);
                }
            } catch (BeansException ex) {
                throw new ConfigurationException(new Message("BEAN_CREATION_EXC", LOG, beanName), ex);
            }
        }

        if (null == bean && LOG.isLoggable(Level.INFO)) {
            LOG.info("Could not find matching bean definition for component " + ref.getName());
View Full Code Here

            provider.init(configuration);
            return provider;
        } catch (ConfigurationException ex) {
            throw ex;
        } catch (Exception ex) {
            throw new ConfigurationException(new Message("DEFAULT_PROVIDER_INSTANTIATION_EXC", LOG), ex);
        }
    }
View Full Code Here

TOP

Related Classes of org.objectweb.celtix.configuration.ConfigurationException

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.