Package org.apache.avalon.framework.parameters

Examples of org.apache.avalon.framework.parameters.ParameterException


                } catch (IOException e) {
                    // Ignored
                }
            }
        } catch (IOException e) {
            throw new ParameterException("Unable to set directory", e);
        }

        String databaseName = params.getParameter("datafile", "cocoon.dat");
        String indexName = params.getParameter("m_indexFile", "cocoon.idx");
        m_Order = params.getParameterAsInteger("order", 301);
View Full Code Here


        {
            return Class.forName( className ).newInstance();
        }
        catch ( final Exception e )
        {
            throw new ParameterException(
                "Unable to instantiate: " + className, e
            );
        }
    }
View Full Code Here

                } catch (IOException e) {
                    // Ignored
                }
            }
        } catch (IOException e) {
            throw new ParameterException("Unable to set directory", e);
        }

        String databaseName = params.getParameter("datafile", "cocoon.dat");
        String indexName = params.getParameter("m_indexFile", "cocoon.idx");
        m_Order = params.getParameterAsInteger("order", 301);
View Full Code Here

     */
    public void parameterize(Parameters parameters) throws ParameterException {
        this.preemptiveLoaderURI = parameters.getParameter("preemptive-loader-url", null);
        if ( null != this.preemptiveLoaderURI
             && this.preemptiveLoaderURI.indexOf("://") == -1) {
            throw new ParameterException("The preemptive-loader-url must be absolute: " + this.preemptiveLoaderURI);
        }
    }
View Full Code Here

                "org.apache.cocoon.components.classloader.ClassLoaderManagerImpl");
        if (classLoaderClass != null) {
            try {
                this.classLoaderManager = (ClassLoaderManager) ClassUtils.newInstance(classLoaderClass);
            } catch (Exception e) {
                throw new ParameterException("Unable to load class loader: " + classLoaderClass, e);
            }
        }
    }
View Full Code Here

            // Will use specific class
            getLogger().debug("Using factory " + factoryName);
            try {
                this.tfactoryClass = ClassUtils.loadClass(factoryName);
            } catch(ClassNotFoundException cnfe) {
                throw new ParameterException("Cannot load TransformerFactory class", cnfe);
            }

            if (! TransformerFactory.class.isAssignableFrom(tfactoryClass)) {
                throw new ParameterException("Class " + factoryName + " isn't a TransformerFactory");
            }
        }
    }
View Full Code Here

        String compilerClass = params.getParameter("compiler");
        try {
            this.compilerClass = ClassUtils.loadClass(compilerClass);
        } catch (ClassNotFoundException e) {
            throw new ParameterException("Unable to load compiler: " + compilerClass, e);
        }
        this.deleteSources = params.getParameterAsBoolean("delete-sources", false);
    }
View Full Code Here

            if (className != null) {
                this.codeFormatter = ClassUtils.loadClass(className);
            }
        } catch (Exception e) {
            getLogger().error("Error with \"code-formatter\" parameter", e);
            throw new ParameterException("Unable to load code formatter: " + className, e);
        }
    }
View Full Code Here

     */
    public void parameterize(Parameters params) throws ParameterException {
        this.maxobjects = params.getParameterAsInteger("maxobjects", 100);
        this.persistent = params.getParameterAsBoolean("use-persistent-cache", false);
        if ((this.maxobjects < 1)) {
            throw new ParameterException("MRUMemoryStore maxobjects must be at least 1!");
        }

        this.cache = new Hashtable((int)(this.maxobjects * 1.2));
        this.mrulist = new LinkedList();
        this.storeJanitor.register(this);
View Full Code Here

                } catch (IOException e) {
                    // Legacy: Always was ignored
                }
            }
        } catch (IOException e) {
            throw new ParameterException("Unable to set directory", e);
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.avalon.framework.parameters.ParameterException

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.