Package org.apache.cocoon

Examples of org.apache.cocoon.ProcessingException


        } catch (SAXException e) {
            getLogger().error("VelocityGenerator.generate()", e);
            throw e;
        } catch (ComponentException e) {
            getLogger().error("Could not get parser", e);
            throw new ProcessingException("Exception in VelocityGenerator.generate()", e);
        } catch (ProcessingException e) {
            throw e;
        } catch (Exception e) {
            getLogger().error("Could not get parser", e);
            throw new ProcessingException("Exception in VelocityGenerator.generate()", e);
        } finally {
            this.manager.release((Component) parser);
        }
    }
View Full Code Here


        SAXParser parser = null;
        try {
            parser = (SAXParser) manager.lookup( SAXParser.ROLE );
            this.buildParameterXML(root, parser);
        } catch (ComponentException ce) {
            throw new ProcessingException("Unable to lookup parser.", ce);
        } finally {
            manager.release( (Component)parser );
        }
        this.buildAttributesXML(root);
        this.buildMiscXML(root);
View Full Code Here

     * Get the XML from the request object
     */
    public DocumentFragment getXML(String path)
    throws ProcessingException {
        if (path == null || path.charAt(0) != '/') {
            throw new ProcessingException("Not a valid XPath: " + path);
        }
        path = this.createPath(path);
        DocumentFragment result = null;
        NodeList list;

        try {
            list = DOMUtil.selectNodeList(this.contextData, path);
        } catch (javax.xml.transform.TransformerException localException) {
            throw new ProcessingException("Exception: " + localException, localException);
        }
        if (list != null && list.getLength() > 0) {
            result = DOMUtil.getOwnerDocument(contextData).createDocumentFragment();
            for(int i = 0; i < list.getLength(); i++) {

View Full Code Here

    /**
     * Setting of xml is not possible for the request context
     */
    public void setXML(String path, DocumentFragment fragment)
    throws ProcessingException {
        throw new ProcessingException("RequestSessionContext: Setting of xml not allowed");
    }
View Full Code Here

    /**
     * Setting of xml is not possible for the request context
     */
    public void setValueOfNode(String path, String value)
    throws ProcessingException {
        throw new ProcessingException("RequestSessionContext: Setting of xml not allowed");
    }
View Full Code Here

    /**
     * Append a document fragment is not possible for the request context.
     */
    public void appendXML(String path, DocumentFragment fragment)
    throws ProcessingException {
        throw new ProcessingException("RequestSessionContext: Appending of xml not allowed");
    }
View Full Code Here

    /**
     * Removing is not possible for the request context.
     */
    public void removeXML(String path)
    throws ProcessingException {
        throw new ProcessingException("RequestSessionContext: Removing of xml not allowed");
    }
View Full Code Here

        Node node = null;

        try {
            node = DOMUtil.getSingleNode(this.contextData, path);
        } catch (javax.xml.transform.TransformerException localException) {
            throw new ProcessingException("Exception: " + localException, localException);
        }
        return node;
    }
View Full Code Here

        NodeList list = null;

        try {
            list = DOMUtil.selectNodeList(this.contextData, path);
        } catch (javax.xml.transform.TransformerException localException) {
            throw new ProcessingException("Exception: " + localException, localException);
        }
        return list;
    }
View Full Code Here

    /**
     * Set the value of a node. The node is copied before insertion.
     */
    public void setNode(String path, Node node)
    throws ProcessingException {
        throw new ProcessingException("RequestSessionContext: Setting of XML not allowed");
    }
View Full Code Here

TOP

Related Classes of org.apache.cocoon.ProcessingException

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.