Package org.apache.cocoon

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


        col = source;

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

            collectionToSAX(collection);
            collection.close();
View Full Code Here

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

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

            }

        } 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(
                    "BSFException in ScriptGenerator.generate()", e);
        } catch (Exception e) {
View Full Code Here

        } else if (exception.equals("validation")) {
            throw new ProcessingException(new ValidationException());
        } else if (exception.equals("application")) {
            throw new ProcessingException(new ApplicationException(Integer.parseInt(request.getParameter(PAR_CODE))));
        } else if (exception.equals("resourceNotFound")) {
            throw new ProcessingException(new ResourceNotFoundException(""));
        } else if (exception.equals("nullPointer")) {
            throw new NullPointerException();
        } else if (exception.equals("error")) {
            throw new Error("Error");
        } else {
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

     */
    public InputStream getInputStream() throws IOException, ProcessingException {
        try {
            return new FileInputStream(this.file);
        } catch (FileNotFoundException e) {
            throw new ResourceNotFoundException("Resource not found "
                                                + getSystemId(), e);
        }
    }
View Full Code Here

                }
                compiledScript = entry.getScript(cx, this.scope, false, this);
                return compiledScript;
            }
        } else {
            throw new ResourceNotFoundException(fileName + ": not found");
        }
    }
View Full Code Here

                return compiledScript;
            } finally {
                is.close();
            }
        } else {
            throw new ResourceNotFoundException(src.getURI() + ": not found");
        }
    }
View Full Code Here

                        parameters.put(arg.name, parameters, arg.value);
                    }
                    cocoon.setParameters(parameters);
                    Object fun = ScriptableObject.getProperty(thrScope, funName);
                    if (fun == Scriptable.NOT_FOUND) {
                        throw new ResourceNotFoundException("Function \"javascript:" + funName + "()\" not found");
                    }
                    ScriptRuntime.call(context, fun, thrScope, funArgs, thrScope);
                } catch (JavaScriptException ex) {
                    EvaluatorException ee = Context.reportRuntimeError(
                                                                       ToolErrorReporter.getMessage("msg.uncaughtJSException",
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.