Package org.apache.excalibur.source

Examples of org.apache.excalibur.source.SourceException


            try {
                nat.rollback();
            } catch (Exception rbe) {
                getLogger().error("Rollback failed for setting a source property", rbe);
            }
            throw new SourceException("Could not set source property", se);
        }
    }
View Full Code Here


        try {
            parser = (DOMParser) this.manager.lookup(DOMParser.ROLE);
            doc = parser.parseDocument(src);
        } catch (Exception e) {
            throw new SourceException("Could not parse property", e);
        } finally {
            this.manager.release((Component) parser);
        }

        return new SourceProperty(doc.getDocumentElement());
View Full Code Here

                SourceProperty srcProperty = new SourceProperty(doc.getDocumentElement());

                sourceproperties.addElement(srcProperty);
            }
        } catch (Exception e) {
            throw new SourceException("Could not parse property "+xml, e);
        } finally {
            this.manager.release((Component) parser);
        }

        SourceProperty[] sourcepropertiesArray = new SourceProperty[sourceproperties.size()];
View Full Code Here

                content.store(slideToken,
                              this.config.getFilesPath()+this.path,
                              revisionDescriptor, null);
            }
        } catch (SlideException se) {
            throw new SourceException("Could not remove property", se);
        }
    }
View Full Code Here

                                                        this.path);

            return this.revisionDescriptors.hasRevisions();

        } catch (SlideException se) {
            throw new SourceException("Could not retrieve revision descriptor",
                                      se);
        }
    }
View Full Code Here

            this.revisionDescriptor = content.retrieve(slideToken,
                                                       revisionDescriptors,
                                                       new NodeRevisionNumber(this.sourcerevision));

        } catch (SlideException se) {
            throw new SourceException("Could not retrieve revision descriptor",
                                      se);
        }
    }
View Full Code Here

                                                        this.path);

            return this.revisionDescriptors.getLatestRevision().toString();

        } catch (SlideException se) {
            throw new SourceException("Could not retrieve revision descriptor",
                                      se);
        }
    }
View Full Code Here

            return new ByteArrayInputStream(os.toByteArray());

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

        try {
            source = resolver.resolveURI(sourceUri);
            dest = resolver.resolveURI(destUri);
           
            if(!(dest instanceof ModifiableSource))
                throw new SourceException("Destination '"+ dest.getURI() + "' is not modifiable.");
           
            copy(source, (ModifiableSource) dest, useBuffer);           
        }
        finally {
            if(source != null)
View Full Code Here

        if (this.needsRefresh) {
            this.refresh();
        }
        // VG: Why exception is not thrown in constructor?
        if (this.exception != null) {
            throw new SourceException("Cannot get input stream for " + getURI(), this.exception);
        }

        if (this.redirectSource != null) {
            return this.redirectSource.getInputStream();
        }

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

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

TOP

Related Classes of org.apache.excalibur.source.SourceException

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.