Package org.apache.cocoon.components.elementprocessor

Examples of org.apache.cocoon.components.elementprocessor.CannotCreateElementProcessorException


            if (rval instanceof LocaleAware) {
                   ((LocaleAware)rval).setLocale(locale);
            }
        } catch (ClassCastException e) {
            e.printStackTrace();
            throw new CannotCreateElementProcessorException(
                "Progenitor is not an instance of Class");
        }
        return rval;
    }
View Full Code Here


    public ElementProcessor createElementProcessor(final String name)
        throws CannotCreateElementProcessorException {
        Object progenitor = lookupElementProcessorProgenitor(name);

        if (progenitor == null) {
            CannotCreateElementProcessorException exception =
                new CannotCreateElementProcessorException(
                    "Cannot find progenitor for that name");
            exception.setElementName(name);
            throw exception;
        }
        ElementProcessor processor = null;

        try {
View Full Code Here

            rval = (ElementProcessor)progenitor.newInstance();
            if (rval instanceof AbstractLogEnabled) {
               ((AbstractLogEnabled)rval).enableLogging(getLogger());
            }
        } catch (ExceptionInInitializerError e) {
            throw new CannotCreateElementProcessorException(
                    "an exception (" + e + ") occurred in initializing the associated ElementProcessor class");
        } catch (SecurityException e) {
            throw new CannotCreateElementProcessorException(
                "a security exception was caught while creating the associated ElementProcessor");
        } catch (InstantiationException e) {
            throw new CannotCreateElementProcessorException(
                "associated ElementProcessor is an interface or abstract class or has no zero-parameter constructor");
        } catch (IllegalAccessException e) {
            throw new CannotCreateElementProcessorException(
                "cannot access ElementProcessor class or its zero-parameter constructor");
        } catch (ClassCastException e) {
            throw new CannotCreateElementProcessorException(
                "object created does not implement ElementProcessor");
        } catch (Exception e) {
            throw new CannotCreateElementProcessorException(
                "exception (" + e
                + ") occured while creating new instance of ElementProcessor");
        }
        if (rval == null) {
            throw new CannotCreateElementProcessorException(
                "somehow generated a null ElementProcessor");
        }
        return rval;
    }
View Full Code Here

            rval = (ElementProcessor) progenitor.newInstance(new Object[0]);
            if (rval instanceof AbstractLogEnabled) {
               ((AbstractLogEnabled)rval).enableLogging(getLogger());
            }
        } catch (ExceptionInInitializerError e) {
            throw new CannotCreateElementProcessorException(
                "an exception (" + e
                + ")occurred in initializing the associated ElementProcessor class");
        } catch (IllegalArgumentException e) {
            throw new CannotCreateElementProcessorException(
                "the ElementProcessor constructor apparently needs parameters");
        } catch (InstantiationException e) {
            throw new CannotCreateElementProcessorException(
                "associated ElementProcessor is an interface or abstract class");
        } catch (IllegalAccessException e) {
            throw new CannotCreateElementProcessorException(
                "cannot access ElementProcessor class or its zero-parameter constructor");
        } catch (InvocationTargetException e) {
            throw new CannotCreateElementProcessorException(
                "ElementProcessor constructor threw an exception ["
                + e.toString() + "]");
        } catch (ClassCastException e) {
            throw new CannotCreateElementProcessorException(
                "object created does not implement ElementProcessor");
        }
        if (rval == null) {
            throw new CannotCreateElementProcessorException(
                "somehow generated a null ElementProcessor");
        }
        return rval;
    }
View Full Code Here

            if (rval instanceof LocaleAware) {
                   ((LocaleAware)rval).setLocale(locale);
            }
        } catch (ClassCastException e) {
            e.printStackTrace();
            throw new CannotCreateElementProcessorException(
                "Progenitor is not an instance of Class");
        }
        return rval;
    }
View Full Code Here

    public ElementProcessor createElementProcessor(final String name)
        throws CannotCreateElementProcessorException {
        Object progenitor = lookupElementProcessorProgenitor(name);

        if (progenitor == null) {
            CannotCreateElementProcessorException exception =
                new CannotCreateElementProcessorException(
                    "Cannot find progenitor for that name");
            exception.setElementName(name);
            throw exception;
        }
        ElementProcessor processor = null;

        try {
View Full Code Here

            rval = (ElementProcessor)progenitor.newInstance();
            if (rval instanceof AbstractLogEnabled) {
               ((AbstractLogEnabled)rval).enableLogging(getLogger());
            }
        } catch (ExceptionInInitializerError e) {
            throw new CannotCreateElementProcessorException(
                    "an exception (" + e + ") occurred in initializing the associated ElementProcessor class");
        } catch (SecurityException e) {
            throw new CannotCreateElementProcessorException(
                "a security exception was caught while creating the associated ElementProcessor");
        } catch (InstantiationException e) {
            throw new CannotCreateElementProcessorException(
                "associated ElementProcessor is an interface or abstract class or has no zero-parameter constructor");
        } catch (IllegalAccessException e) {
            throw new CannotCreateElementProcessorException(
                "cannot access ElementProcessor class or its zero-parameter constructor");
        } catch (ClassCastException e) {
            throw new CannotCreateElementProcessorException(
                "object created does not implement ElementProcessor");
        } catch (Exception e) {
            throw new CannotCreateElementProcessorException(
                "exception (" + e
                + ") occured while creating new instance of ElementProcessor");
        }
        if (rval == null) {
            throw new CannotCreateElementProcessorException(
                "somehow generated a null ElementProcessor");
        }
        return rval;
    }
View Full Code Here

            rval = (ElementProcessor) progenitor.newInstance(new Object[0]);
            if (rval instanceof AbstractLogEnabled) {
               ((AbstractLogEnabled)rval).enableLogging(getLogger());
            }
        } catch (ExceptionInInitializerError e) {
            throw new CannotCreateElementProcessorException(
                "an exception (" + e
                + ")occurred in initializing the associated ElementProcessor class");
        } catch (IllegalArgumentException e) {
            throw new CannotCreateElementProcessorException(
                "the ElementProcessor constructor apparently needs parameters");
        } catch (InstantiationException e) {
            throw new CannotCreateElementProcessorException(
                "associated ElementProcessor is an interface or abstract class");
        } catch (IllegalAccessException e) {
            throw new CannotCreateElementProcessorException(
                "cannot access ElementProcessor class or its zero-parameter constructor");
        } catch (InvocationTargetException e) {
            throw new CannotCreateElementProcessorException(
                "ElementProcessor constructor threw an exception ["
                + e.toString() + "]");
        } catch (ClassCastException e) {
            throw new CannotCreateElementProcessorException(
                "object created does not implement ElementProcessor");
        }
        if (rval == null) {
            throw new CannotCreateElementProcessorException(
                "somehow generated a null ElementProcessor");
        }
        return rval;
    }
View Full Code Here

    public ElementProcessor createElementProcessor(final String name)
        throws CannotCreateElementProcessorException {
        Object progenitor = lookupElementProcessorProgenitor(name);

        if (progenitor == null) {
            CannotCreateElementProcessorException exception =
                new CannotCreateElementProcessorException(
                    "Cannot find progenitor for that name");
            exception.setElementName(name);
            throw exception;
        }
        ElementProcessor processor = null;

        try {
View Full Code Here

            rval = (ElementProcessor)progenitor.newInstance();
            if (rval instanceof AbstractLogEnabled) {
               ((AbstractLogEnabled)rval).enableLogging(getLogger());
            }
        } catch (ExceptionInInitializerError e) {
            throw new CannotCreateElementProcessorException(
                    "an exception (" + e + ") occurred in initializing the associated ElementProcessor class");
        } catch (SecurityException e) {
            throw new CannotCreateElementProcessorException(
                "a security exception was caught while creating the associated ElementProcessor");
        } catch (InstantiationException e) {
            throw new CannotCreateElementProcessorException(
                "associated ElementProcessor is an interface or abstract class or has no zero-parameter constructor");
        } catch (IllegalAccessException e) {
            throw new CannotCreateElementProcessorException(
                "cannot access ElementProcessor class or its zero-parameter constructor");
        } catch (ClassCastException e) {
            throw new CannotCreateElementProcessorException(
                "object created does not implement ElementProcessor");
        } catch (Exception e) {
            throw new CannotCreateElementProcessorException(
                "exception (" + e
                + ") occured while creating new instance of ElementProcessor");
        }
        if (rval == null) {
            throw new CannotCreateElementProcessorException(
                "somehow generated a null ElementProcessor");
        }
        return rval;
    }
View Full Code Here

TOP

Related Classes of org.apache.cocoon.components.elementprocessor.CannotCreateElementProcessorException

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.