Package org.apache.avalon.framework.parameters

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


            // release the store, if we don't need it anymore
            m_manager.release(m_store);
            m_store = null;
        } else if (null == m_store) {
            final String message = "XSLTProcessor: use-store is set to true, " + "but unable to aquire the Store.";
            throw new ParameterException(message);
        }
    }
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 MRUBucketMap((int)(this.maxobjects * 1.2));
        this.storeJanitor.register(this);
    }
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

                } catch (IOException e) {
                    // Legacy: Always was ignored
                }
            }
        } catch (IOException e) {
            throw new ParameterException("Unable to set directory", e);
        }
    }
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

        String classLoaderClass = params.getParameter("class-loader",null);
        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

    public void parameterize(Parameters parameters) throws ParameterException {
        String storeName = parameters.getParameter("store", Store.TRANSIENT_STORE);
        try {
            this.store = (Store)this.manager.lookup(storeName);
        } catch (ComponentException ce) {
            throw new ParameterException("Unable to lookup store: " + storeName, ce);
        }
    }
View Full Code Here

                } catch (IOException e) {
                    // Ignored
                }
            }
        } catch (ContextException ce) {
            throw new ParameterException("Unable to get directory information from context.", ce);
        } catch (IOException e) {
            throw new ParameterException("Unable to set directory", e);
        }

        // get store configuration
        final String databaseName = params.getParameter("datafile", "cocoon.dat");
        final String indexName = params.getParameter("m_indexFile", "cocoon.idx");
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

        }
       
        try {
            this.cache = (Cache)this.manager.lookup(cacheRole);
        } catch (ComponentException ce) {
            throw new ParameterException("Unable to lookup cache: " + cacheRole, ce);
        }
    }
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.