Package org.apache.excalibur.source

Examples of org.apache.excalibur.source.SourceNotFoundException


                getLogger().debug("Executing statement " + select);
            }

            ResultSet rs = stmt.executeQuery(select);
            if (!rs.next()) {
                throw new SourceNotFoundException("Source not found.");
            }

            int colType = rs.getMetaData().getColumnType(1);
            switch(colType) {
                case Types.BLOB :
View Full Code Here


        }
        catch ( IOException e )
        {
            if ( e instanceof FileNotFoundException )
            {
                throw new SourceNotFoundException( e.getMessage() );
            }
            else
            {
                final String message =
                    "Failure during delete";
View Full Code Here

        {
            return new FileInputStream(m_file);
        }
        catch (FileNotFoundException fnfe)
        {
            throw new SourceNotFoundException(m_uri + " doesn't exist.", fnfe);
        }
    }
View Full Code Here

     */
    public void delete() throws SourceException
    {
        if (!m_file.exists())
        {
            throw new SourceNotFoundException("Cannot delete non-existing file " + m_file.toString());
        }
       
        if (!m_file.delete())
        {
            throw new SourceException("Could not delete " + m_file.toString() + " (unknown reason)");
View Full Code Here

        throws IOException, SourceException
    {

        InputStream in = m_location.openStream();
        if ( in == null )
          throw new SourceNotFoundException( "Source '"+m_location+"' was not found" );
        return in;
    }
View Full Code Here

                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);
View Full Code Here

                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);
View Full Code Here

                }
            }
        } catch (ServiceException e) {
            throw new ProcessingException("Can't lookup source resolver", e);
        } catch (MalformedURLException e) {
            throw new SourceNotFoundException("Invalid resource URL: " + sourceURL, e);
        } finally {
            if (source != null) {
                resolver.release(source);
            }
            this.manager.release(resolver);
View Full Code Here

                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);
View Full Code Here

        {
            return part.getInputStream();
        }
        catch (Exception ex)
        {
            throw new SourceNotFoundException("The part source can not be found.");
        }
    }
View Full Code Here

TOP

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

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.