Package org.apache.cactus.util

Examples of org.apache.cactus.util.ChainedRuntimeException


            return (AbstractServletConfigWrapper) constructor.newInstance(args);
        }
        catch (Throwable t)
        {
            throw new ChainedRuntimeException(
                "Failed to create ServletConfigWrapper", t);
        }
    }
View Full Code Here


            result = callGetResult(theRequest);
        }
        catch (ParsingException e)
        {
            String url = this.configuration.getRedirectorURL(theRequest);
            throw new ChainedRuntimeException("Failed to get the test "
                + "results at [" + url + "]", e);
        }

        // Check if the returned result object returned contains an error or
        // not. If yes, we need to raise an exception so that the JUnit
View Full Code Here

            return (AbstractPageContextWrapper) constructor.newInstance(args);
        }
        catch (Throwable t)
        {
            throw new ChainedRuntimeException(
                "Failed to create PageContextWrapper", t);
        }
    }
View Full Code Here

        // from the Cactus configuration file.
        String contextURL = System.getProperty(CACTUS_CONTEXT_URL_PROPERTY);

        if (contextURL == null)
        {
            throw new ChainedRuntimeException("Missing Cactus property ["
                + CACTUS_CONTEXT_URL_PROPERTY + "]");
        }

        return contextURL;
    }
View Full Code Here

                config = new PropertyResourceBundle(
                    new FileInputStream(configOverride));
            }
            catch (IOException e)
            {
                throw new ChainedRuntimeException(
                    "Cannot read cactus configuration file ["
                    + configOverride + "]", e);
            }
        }
View Full Code Here

                bundle = new PropertyResourceBundle(
                    new FileInputStream(logConfig));
            }
            catch (IOException e)
            {
                throw new ChainedRuntimeException("Failed to load logging "
                    + "configuration file [" + logConfig + "]");
            }
            addSystemProperties(bundle, isReinitialization);
        }
    }
View Full Code Here

            {
                value = URLDecoder.decode(value);
            }
            catch (Exception e)
            {
                throw new ChainedRuntimeException("Error URL decoding ["
                    + value + "]", e);
            }
        }

        return value;
View Full Code Here

        {
            parameters = this.parametersGet;
        }
        else
        {
            throw new ChainedRuntimeException("The method need to be either "
                + "\"POST\" or \"GET\"");
        }

        // If there is already a parameter of the same name, add the
        // new value to the Vector. If not, create a Vector an add it to the
View Full Code Here

     */
    public HttpSessionCookie getSessionCookie()
    {
        if (getConfiguration() == null)
        {
            throw new ChainedRuntimeException("setConfiguration() should have "
                + "been called prior to calling getSessionCookie()");
        }
       
        HttpClientConnectionHelper helper =
            new HttpClientConnectionHelper(
                ((WebConfiguration) getConfiguration()).getRedirectorURL(this));

        WebRequestImpl obtainSessionIdRequest = new WebRequestImpl(
            (WebConfiguration) getConfiguration());
           
       
        //Not sure whether I should be adding the service parameter to
        //this request (this) or to the obtainSessionIdRequest
        //seems obvious that it should be the obtainSessionIdRequest
        RequestDirectives directives =
            new RequestDirectives(obtainSessionIdRequest);
        directives.setService(ServiceEnumeration.CREATE_SESSION_SERVICE);

        HttpURLConnection resultConnection;
        try
        {
            resultConnection =
                helper.connect(obtainSessionIdRequest, getConfiguration());
        }
        catch (Throwable e)
        {
            throw new ChainedRuntimeException("Failed to connect to ["
                + ((WebConfiguration) getConfiguration()).getRedirectorURL(this)
                + "]", e);
        }

        WebResponse response;
        try
        {
            response = (WebResponse) new WebResponseObjectFactory(
                resultConnection).getResponseObject(
                    WebResponse.class.getName(),
                    obtainSessionIdRequest);
        }
        catch (ClientException e)
        {
            throw new ChainedRuntimeException("Failed to connect to ["
                + ((WebConfiguration) getConfiguration()).getRedirectorURL(this)
                + "]", e);
        }

        Cookie cookie = response.getCookieIgnoreCase("jsessionid");
View Full Code Here

            {
                this.content = IoUtil.getText(this.connection.getInputStream());
            }
            catch (IOException e)
            {
                throw new ChainedRuntimeException(e);
            }
        }

        return this.content;
    }
View Full Code Here

TOP

Related Classes of org.apache.cactus.util.ChainedRuntimeException

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.