Package org.apache.cocoon

Examples of org.apache.cocoon.ResourceNotFoundException


        debug( "catalog location:" + catalogueLocation );
        Source source = resolver.resolve( catalogueLocation );
        String systemId = source.getSystemId();
        if ( !systemId.startsWith( FILE ) ) {
            throw new ResourceNotFoundException( systemId + " does not denote a directory" );
        }
        debug( "catalog directory:" + systemId );
        dirConf.setValue( systemId );

        configuration.addChild( dirConf );
View Full Code Here


                input = this.connection.getInputStream();
                this.connection = null; // make sure a new connection is created next time
            }
            return input;
        }catch(FileNotFoundException e){
            throw new ResourceNotFoundException("Resource not found "
                                                + this.systemId);
        }
    }
View Full Code Here

            }

            PreparedStatement statement = con.prepareStatement(getQuery());
            statement.setString(1, this.source);
            ResultSet set = statement.executeQuery();
            if (set.next() == false) throw new ResourceNotFoundException("There is no resource with that key");

            Response response = (Response) objectModel.get(Constants.RESPONSE_OBJECT);
            Request request = (Request) objectModel.get(Constants.REQUEST_OBJECT);

            if (this.modifiedSince(set, request, response)) {
                this.resource = set.getBlob(1);

                if (this.resource == null) {
                    throw new ResourceNotFoundException("There is no image with that key");
                }
            }

            this.doCommit = true;
        } catch (Exception e) {
            getLogger().warn("Could not get resource from Database", e);

            this.doCommit = false;

            throw new ResourceNotFoundException("DatabaseReader error:", e);
        }
    }
View Full Code Here

        } catch (Exception e) {
            getLogger().warn("Could not get resource from Database", e);

            this.doCommit = false;

            throw new ResourceNotFoundException("DatabaseReader error:", e);
        }
    }
View Full Code Here

                input = this.connection.getInputStream();
                this.connection = null; // make sure a new connection is created next time
            }
            return input;
        } catch(FileNotFoundException e) {
            throw new ResourceNotFoundException("Resource not found "
                                                + this.systemId, e);
        }
    }
View Full Code Here

            if (invokeNodes(children, env, context)) {
                return true;
            } else if (this.isLast) {
                String msg = "No pipeline matched request: " + env.getURIPrefix() + '/' + env.getURI();
                getLogger().info(msg);
                throw new ResourceNotFoundException(msg);
            } else {
                return false;
            }

        } catch (ConnectionResetException cre) {
View Full Code Here

        final String res = url.substring(url.lastIndexOf('/') + 1);

        try {
            Collection collection = DatabaseManager.getCollection(col);
            if (collection == null) {
                throw new ResourceNotFoundException("Document " + url + " not found");
            }

            XMLResource xmlResource = (XMLResource) collection.getResource(res);
            if (xmlResource == null) {
                throw new ResourceNotFoundException("Document " + url + " not found");
            }

            if (query != null) {
                // Query resource
                if (log.isDebugEnabled()) {
View Full Code Here

        AttributesImpl attributes = new AttributesImpl();

        try {
            Collection collection = DatabaseManager.getCollection(url);
            if (collection == null) {
                throw new ResourceNotFoundException("Collection " + url +
                        " not found");
            }

            if (query != null) {
                // Query collection
View Full Code Here

        debug("catalog location:" + location);
        Source source = resolver.resolve(location);
        try {
            String systemId = source.getSystemId();
            if (!systemId.startsWith(FILE)) {
                throw new ResourceNotFoundException(
                    systemId + " does not denote a directory"
                );
            }
            debug("catalog directory:" + systemId);
            dirConf.setValue(systemId);
View Full Code Here

            }
            parser = (Parser)this.manager.lookup(Parser.ROLE);
            parser.parse(this.inputSource, super.xmlConsumer);
        } catch (IOException e) {
            getLogger().error("StreamGenerator.generate()", e);
            throw new ResourceNotFoundException("StreamGenerator could not find resource", e);
        } catch (SAXException e) {
            getLogger().error("StreamGenerator.generate()", e);
            throw(e);
        } catch (Exception e) {
            getLogger().error("Could not get parser", e);
View Full Code Here

TOP

Related Classes of org.apache.cocoon.ResourceNotFoundException

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.