Examples of ResourceNotFoundException


Examples of org.apache.cocoon.ResourceNotFoundException

                    new InputSource(new StringReader(w.toString()));
            xmlInput.setSystemId(super.source);
            parser.parse(xmlInput, this.xmlConsumer);
        } catch (IOException e) {
            getLogger().warn("VelocityGenerator.generate()", e);
            throw new ResourceNotFoundException("Could not get Resource for VelocityGenerator", e);
        } catch (SAXParseException e) {
            int line = e.getLineNumber();
            int column = e.getColumnNumber();
            if (line <= 0) {
                line = Integer.MAX_VALUE;
View Full Code Here

Examples of org.apache.cocoon.ResourceNotFoundException

        HttpConnection connection = new HttpConnection(this.method.getHostConfiguration());
        HttpState state = new HttpState();
        this.method.setFollowRedirects(true);
        int status = this.method.execute(state, connection);
        if (status == 404) {
            throw new ResourceNotFoundException("Unable to access \"" + this.method.getURI()
                    + "\" (HTTP 404 Error)");
        } else if ((status < 200) || (status > 299)) {
            throw new IOException("Unable to access HTTP resource at \""
                    + this.method.getURI().toString() + "\" (status=" + status + ")");
        }
View Full Code Here

Examples of org.apache.cocoon.ResourceNotFoundException

        } catch (XMLDBException e) {
            throw new ProcessingException("Could not get collection " + base + ": " + e.errorCode, e);
        }

        if(this.collection == null)
            throw new ResourceNotFoundException("Collection " + base + " does not exist");
    }
View Full Code Here

Examples of org.apache.cocoon.ResourceNotFoundException

            throw new ProcessingException("Could not retrieve source '"+super.source+"'", se);
        }

        String systemId = inputSource.getURI();
        if (!systemId.startsWith("file:")) {
          throw new ResourceNotFoundException(systemId + " does not denote a directory");
        }

        // This relies on systemId being of the form "file://..."
        this.directory = new File(new URL(systemId).getFile());
        if (!directory.isDirectory()) {
            throw new ResourceNotFoundException(directory + " is not a directory.");
        }
    }
View Full Code Here

Examples of org.apache.cocoon.ResourceNotFoundException

            } else {
                DOMStreamer streamer = new DOMStreamer(this.contentHandler,this.lexicalHandler);
                streamer.stream(doc);
            }
        } catch (IOException e){
            throw new ResourceNotFoundException("Could not get resource "
                + this.inputSource.getURI(), e);
        } catch (SAXException e){
            throw e;
        } catch (Exception e){
            throw new ProcessingException("Exception in HTMLGenerator.generate()",e);
View Full Code Here

Examples of org.apache.cocoon.ResourceNotFoundException

            }

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

            Response response = ObjectModelHelper.getResponse(objectModel);
            Request request = ObjectModelHelper.getRequest(objectModel);

            if (this.modifiedSince(set, request, response)) {
                this.resource = set.getBinaryStream(1);
                if (this.typeColumn != 0) {
                    this.mimeType = set.getString(this.typeColumn);
                }

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

            this.doCommit = true;
        } catch (Exception e) {
            this.doCommit = false;

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

Examples of org.apache.cocoon.ResourceNotFoundException

            this.doCommit = false;
        } catch (Exception e) {
            this.doCommit = false;

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

Examples of org.apache.cocoon.ResourceNotFoundException

            parser = (SAXParser)(this.manager.lookup(SAXParser.ROLE));
            parser.parse(xmlInput, this.xmlConsumer);
        } catch (SourceException se) {
            throw SourceUtil.handle(se);
        } catch (FileNotFoundException e) {
            throw new ResourceNotFoundException(
                "Could not load script " + this.inputSource.getURI(), e);
        } catch (BSFException e) {
            throw new ProcessingException(
                    "Exception in ScriptGenerator.generate()", e);
        } catch (Exception e) {
View Full Code Here

Examples of org.apache.felix.framework.resolver.ResourceNotFoundException

                throw new ClassNotFoundException(
                    name + " not found by " + this.getBundle());
            }
            else
            {
                throw new ResourceNotFoundException(
                    name + " not found by " + this.getBundle());
            }
        }

        return result;
View Full Code Here

Examples of org.apache.felix.framework.resolver.ResourceNotFoundException

            // requested class and imported packages are atomic.
            if (isClass)
            {
                throw new ClassNotFoundException(name);
            }
            throw new ResourceNotFoundException(name);
        }

        // Check if the package is required.
        List<BundleRevision> providers = m_requiredPkgs.get(pkgName);
        if (providers != null)
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.