Package org.apache.cocoon.pipeline

Examples of org.apache.cocoon.pipeline.ProcessingException


    @Override
    public void setConfiguration(Map<String, ? extends Object> configuration) {
        try {
            this.service = new URL((String) configuration.get("service"));
        } catch (MalformedURLException e) {
            throw new ProcessingException(("Can't create an URL for " + configuration.get("service") + "."), e);
        }
    }
View Full Code Here


        try {
            XMLUtils.toOutputStream(this.getUrlConnection().getOutputStream(), saxBuffer);
            URLConnectionUtils.toSax(this.getUrlConnection(), this.getXMLConsumer());
        } catch (IOException e) {
            throw new ProcessingException("Can't stream SaxBuffer into the output stream of the URL "
                    + this.getUrlConnection().getURL());
        } finally {
            URLConnectionUtils.closeQuietly(this.getUrlConnection());
        }
View Full Code Here

    private URLConnection getUrlConnection() {
        if (this.servletConnection == null) {
            try {
                this.servletConnection = this.service.openConnection();
            } catch (IOException e) {
                throw new ProcessingException("Can't use connected servlet service: " + this.service, e);
            }
        }

        return this.servletConnection;
    }
View Full Code Here

    @Override
    public void setConfiguration(Map<String, ? extends Object> configuration) {
        try {
            this.service = new URL((String) configuration.get("service"));
        } catch (MalformedURLException e) {
            throw new ProcessingException(("Can't create an URL for " + configuration.get("service") + "."), e);
        }
    }
View Full Code Here

                    return;
                } catch (IOException e) {
                    String message = "Can't read from URL " + sourceAtt;
                    this.logger.error(message, e);
                    throw new ProcessingException(message, e);
                }
            } else {
                String message = "The <include> element must contain a 'src' attribute that contains a URL.";
                this.logger.error(message);
                throw new ProcessingException(message);
            }
        } else {
            super.startElement(uri, localName, name, atts);
        }
    }
View Full Code Here

            return source;
        } catch (MalformedURLException e) {
            String message = "Can't parse URL " + sourceAtt;
            this.logger.error(message, e);
            throw new ProcessingException(message, e);
        }
    }
View Full Code Here

    @Override
    public void setup(Map<String, Object> inputParameters) {
        try {
            this.transformerHandler = SAX_TRANSFORMER_FACTORY.newTransformerHandler();
        } catch (TransformerConfigurationException e) {
            throw new ProcessingException("Can't setup transformer handler for the serializer.", e);
        }
        this.transformerHandler.getTransformer().setOutputProperties(this.format);
        this.setContentHandler(this.transformerHandler);
        this.setLexicalHandler(this.transformerHandler);
View Full Code Here

TOP

Related Classes of org.apache.cocoon.pipeline.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.