Package org.apache.cocoon.pipeline

Examples of org.apache.cocoon.pipeline.ProcessingException


            InputStream inputStream = urlConnection.getInputStream();
            XMLUtils.toSax(inputStream, contentHandler);
        } catch (PipelineException e) {
            throw e;
        } catch (Exception e) {
            throw new ProcessingException("Can't parse url connection " + urlConnection.getURL(), e);
        } finally {
            URLConnectionUtils.closeQuietly(urlConnection);
        }
    }
View Full Code Here


                public InputSource resolveEntity(String publicId, String systemId) throws SAXException, IOException {
                    return new InputSource(new ByteArrayInputStream("".getBytes()));
                }
            });
        } catch (SAXException e) {
            throw new ProcessingException("Cannot create and prepare an XMLReader.", e);
        }

        return xmlReader;
    }
View Full Code Here

                    XMLUtils.toSax(new String(this.bytes, this.encoding), XMLGenerator.this.getSAXConsumer());
                }
            } catch (PipelineException e) {
                throw e;
            } catch (UnsupportedEncodingException e) {
                throw new ProcessingException("The encoding " + this.encoding + " is not supported.", e);
            } catch (Exception e) {
                throw new ProcessingException("Can't parse byte array " + this.bytes, e);
            }
        }
View Full Code Here

                XMLUtils.toSax(new FileInputStream(this.file), XMLGenerator.this.getSAXConsumer());
            } catch (PipelineException e) {
                throw e;
            } catch (Exception e) {
                throw new ProcessingException("Can't read or parse file " + this.file.getAbsolutePath(), e);
            }
        }
View Full Code Here

                XMLUtils.toSax(this.inputStream, XMLGenerator.this.getSAXConsumer());
            } catch (PipelineException e) {
                throw e;

            } catch (Exception e) {
                throw new ProcessingException("Can't read or parse file " + this.inputStream, e);
            }
        }
View Full Code Here

            }

            try {
                this.saxBuffer.toSAX(XMLGenerator.this.getSAXConsumer());
            } catch (SAXException e) {
                throw new ProcessingException("Can't stream " + this + " into the content handler.", e);
            }
        }
View Full Code Here

                XMLUtils.toSax(new ByteArrayInputStream(this.xmlString.getBytes()), XMLGenerator.this.getSAXConsumer());
            } catch (PipelineException e) {
                throw e;
            } catch (Exception e) {
                throw new ProcessingException("Can't parse the XML string.", e);
            }
        }
View Full Code Here

        try {
            this.getSAXConsumer().startDocument();
            this.toSAX(throwable, this.getSAXConsumer());
            this.getSAXConsumer().endDocument();
        } catch (SAXException e) {
            throw new ProcessingException("Failed to generate exception document.", e);
        }
    }
View Full Code Here

         *
         * @see org.apache.cocoon.pipeline.component.Starter#execute()
         */
        public void execute() {
            if (this.source == null) {
                throw new ProcessingException(this.getClass().getSimpleName() + " has no source.");
            }

            if (XMLGenerator.this.logger.isDebugEnabled()) {
                XMLGenerator.this.logger.debug("Using the URL " + this.source + " to produce SAX events.");
            }

            try {
                XMLUtils.toSax(this.source.openConnection(), XMLGenerator.this.getSAXConsumer());
            } catch (IOException e) {
                throw new ProcessingException("Can't open connection to " + this.source, e);
            }
        }
View Full Code Here

            }

        } catch (IOException e) {
            String message = "FileReader cannot read from '" + this.source + "'";
            this.logger.error(message, e);
            throw new ProcessingException(message, e);
        } finally {
            URLConnectionUtils.closeQuietly(connection);
        }
    }
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.