Package org.apache.cocoon

Examples of org.apache.cocoon.ProcessingException


        NodeList list;

        try {
            list = DOMUtil.selectNodeList(this.contextData, this.createPath(path));
        } catch (javax.xml.transform.TransformerException local) {
            throw new ProcessingException("TransformerException: " + local, local);
        }
        if (list != null && list.getLength() > 0) {
            result = true;
            for(int i = 0; i < list.getLength(); i++) {
View Full Code Here


                        SourceParameters parameters,
                        Map                objectModel,
                        SourceResolver     resolver,
                        ComponentManager   manager)
    throws SAXException, ProcessingException, IOException {
        throw new ProcessingException("The context " + this.name + " does not support loading.");
    }
View Full Code Here

                        SourceParameters parameters,
                        Map                objectModel,
                        SourceResolver     resolver,
                        ComponentManager   manager)
    throws SAXException, ProcessingException, IOException {
        throw new ProcessingException("The context " + this.name + " does not support saving.");
    }
View Full Code Here

        if (uri.startsWith("//", position)) {
            position += 2;
            try {
                this.processor = (Processor)this.manager.lookup(Processor.ROLE);
            } catch (ComponentException e) {
                throw new ProcessingException("Cannot get Processor instance", e);
            }
            this.prefix = ""; // start at the root
        } else if (uri.startsWith("/", position)) {
            position ++;
            this.prefix = null;
            this.processor = CocoonComponentManager.getCurrentProcessor();
        } else {
            throw new ProcessingException("Malformed cocoon URI.");
        }

        // create the queryString (if available)
        String queryString = null;
        int queryStringPos = uri.indexOf('?', position);
View Full Code Here

        if (this.needsRefresh) {
            this.refresh();
        }
        // VG: Why exception is not thrown in constructor?
        if (this.exception != null) {
            throw new ProcessingException(this.exception);
        }

        if (this.redirectSource != null) {
            try {
                return this.redirectSource.getInputStream();
            } catch (SourceException se) {
                throw SourceUtil.handle(se);
            }
        }

        try {
            ByteArrayOutputStream os = new ByteArrayOutputStream();
            this.environment.setOutputStream(os);
            try {
                CocoonComponentManager.enterEnvironment(this.environment,
                                                        this.manager,
                                                        this.pipelineProcessor);
                this.processingPipeline.process(this.environment);
            } finally {
                CocoonComponentManager.leaveEnvironment();
            }
            return new ByteArrayInputStream(os.toByteArray());

        } catch (ProcessingException e) {
            throw e;
        } catch (Exception e) {
            throw new ProcessingException("Exception during processing of " + this.systemId, e);
        } finally {
            // Unhide wrapped environment output stream
            this.environment.setOutputStream(null);
            reset();
        }
View Full Code Here

        // get the form from a request attribute
        String formAttribute;
        try {
            formAttribute = parameters.getParameter("attribute-name");
        } catch (ParameterException e) {
            throw new ProcessingException("Missing 'attribute-name' parameter for WoodyTemplateTransformer.");
        }
        Request request = ObjectModelHelper.getRequest(objectModel);
        form = (Form)request.getAttribute(formAttribute);
        if (form == null) {
            throw new ProcessingException("WoodyTemplateTransformer cannot find a form in the request attribute named " + formAttribute);
        }
    }
View Full Code Here

        }

        /* Process the current source URL in relation to the configured one */
        HttpURL src = (super.source == null ? null : new HttpURL(super.source));
        if (this.url != null) src = (src == null ? this.url : new HttpURL(this.url, src));
        if (src == null) throw new ProcessingException("No URL specified");
        if (src.isRelativeURI()) {
            throw new ProcessingException("Invalid URL \"" + src.toString() + "\"");
        }

        /* Configure the method with the resolved URL */
        HostConfiguration hc = new HostConfiguration();
        hc.setHost(src);
View Full Code Here

        try {
            InputSource inputSource = new InputSource(response);
            parser = (SAXParser) this.manager.lookup(SAXParser.ROLE);
            parser.parse(inputSource, super.xmlConsumer);
        } catch (ComponentException ex) {
            throw new ProcessingException("Unable to get parser", ex);
        } finally {
            this.manager.release((Component) parser);
            this.method.releaseConnection();
            connection.close();
        }
View Full Code Here

        ts.nrtotal++;
        while (ts.nw!=0) {
            try {
                wait();
            } catch (InterruptedException local) {
                throw new ProcessingException("Interrupted", local);
            }
        }
        ts.nr++;
    }
View Full Code Here

         ts.nwtotal++;
         while (ts.nrtotal+ts.nw != 0) {
            try {
                wait();
            } catch (InterruptedException local) {
                throw new ProcessingException("Interrupted", local);
            }
        }
        ts.nw=1;
     }
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.