Package org.codehaus.plexus.component.configurator

Examples of org.codehaus.plexus.component.configurator.ComponentConfigurationException


                catch ( ExpressionEvaluationException e )
                {
                    String msg =
                        "Error evaluating the expression '" + expression + "' for configuration value '"
                            + configuration.getName() + "'";
                    throw new ComponentConfigurationException( configuration, msg, e );
                }
            }

            if ( value == null && ( config == null || config.getChildCount() <= 0 ) )
            {
View Full Code Here


        if ( name == null )
        {
            String msg = "Converter: java.util.Properties. Trying to convert the configuration element: '" + element
                + "', missing child element 'name'.";

            throw new ComponentConfigurationException( msg );
        }

        String value = property.getChild( "value" ).getValue( "" );

        properties.put( name, value );
View Full Code Here

                    String val = params[j].getValue();
                    parameters.put( name, val );
                }
                catch ( PlexusConfigurationException ex )
                {
                    throw new ComponentConfigurationException( ex );
                }
            }
            map.put( type, parameters );
        }
        chain.toolchains = map;
View Full Code Here

                for (final URL url : buildURLs(classpathElements)) {
                    containerRealm.addURL(url);
                }
            }
        } catch (final ExpressionEvaluationException e) {
            throw new ComponentConfigurationException(
                    "There was a problem evaluating: ${project.compileClasspathElements}", e);
        }
    }
View Full Code Here

        for (final String classpathElement : classpathElements) {
            try {
                final URL url = new File(classpathElement).toURI().toURL();
                urls.add(url);
            } catch (final MalformedURLException e) {
                throw new ComponentConfigurationException("Unable to access project dependency: " + classpathElement, e);
            }
        }
        return urls;
    }
View Full Code Here

            catch ( ClassNotFoundException e )
            {
                String msg = "ClassNotFoundException: Class name which was explicitly given in configuration using"
                    + " 'implementation' attribute: '" + implementation + "' cannot be loaded";

                throw new ComponentConfigurationException( msg, e );
            }
            catch ( UnsupportedClassVersionError e )
            {
                String msg = "UnsupportedClassVersionError: Class name which was explicitly given in configuration"
                    + " using 'implementation' attribute: '" + implementation + "' cannot be loaded";

                throw new ComponentConfigurationException( msg, e );
            }
            catch ( LinkageError e )
            {
                String msg = "LinkageError: Class name which was explicitly given in configuration using"
                    + " 'implementation' attribute: '" + implementation + "' cannot be loaded";

                throw new ComponentConfigurationException( msg, e );
            }
        }

        return retValue;
    }
View Full Code Here

        {
            retValue = classLoader.loadClass( classname );
        }
        catch ( ClassNotFoundException e )
        {
            throw new ComponentConfigurationException( "Error loading class '" + classname + "'", e );
        }

        return retValue;
    }
View Full Code Here

            return retValue;
        }
        catch ( IllegalAccessException e )
        {
            throw new ComponentConfigurationException( "Class '" + clazz.getName() + "' cannot be instantiated", e );
        }
        catch ( InstantiationException e )
        {
            throw new ComponentConfigurationException( "Class '" + clazz.getName() + "' cannot be instantiated", e );
        }
    }
View Full Code Here

        {
            if ( !type.isAssignableFrom( v.getClass() ) )
            {
                String msg = "Cannot assign configuration entry '" + configuration.getName() + "' to '" + type +
                    "' from '" + configuration.getValue( null ) + "', which is of type " + v.getClass();
                throw new ComponentConfigurationException( configuration, msg );
            }
        }
        return v;
    }
View Full Code Here

            }
            catch ( ExpressionEvaluationException e )
            {
                String msg = "Error evaluating the expression '" + value + "' for configuration value '" +
                    configuration.getName() + "'";
                throw new ComponentConfigurationException( configuration, msg, e );
            }
        }
        if ( v == null )
        {
            value = configuration.getAttribute( "default-value", null );
            if ( value != null && value.length() > 0 )
            {
                try
                {
                    v = expressionEvaluator.evaluate( value );
                }
                catch ( ExpressionEvaluationException e )
                {
                    String msg = "Error evaluating the expression '" + value + "' for configuration value '" +
                        configuration.getName() + "'";
                    throw new ComponentConfigurationException( configuration, msg, e );
                }
            }
        }
        return v;
    }
View Full Code Here

TOP

Related Classes of org.codehaus.plexus.component.configurator.ComponentConfigurationException

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.