Package net.sourceforge.stripes.exception

Examples of net.sourceforge.stripes.exception.StripesServletException


     * @param bean the ActionBean to test to see if getContext() works correctly
     * @throws StripesServletException if getContext() returns null
     */
    protected void assertGetContextWorks(final ActionBean bean) throws StripesServletException {
        if (bean.getContext() == null) {
            throw new StripesServletException("Ahem. Stripes has just resolved and instantiated " +
                    "the ActionBean class " + bean.getClass().getName() + " and set the ActionBeanContext " +
                    "on it. However calling getContext() isn't returning the context back! Since " +
                    "this is required for several parts of Stripes to function correctly you should " +
                    "now stop and implement setContext()/getContext() correctly. Thank you.");
        }
View Full Code Here


        Map<String,Method> mappings = this.eventMappings.get(bean);
        Method handler = mappings.get(eventName);

        // If we could not find a handler then we should blow up quickly
        if (handler == null) {
            throw new StripesServletException(
                    "Could not find handler method for event name [" + eventName + "] on class [" +
                    bean.getName() + "].  Known handler mappings are: " + mappings);
        }

        return handler;
View Full Code Here

            Method handler = handlers.get(DEFAULT_HANDLER_KEY);
            if (handler != null) return handler;
        }

        // If we get this far, there is no sensible default!  Kaboom!
        throw new StripesServletException("No default handler could be found for ActionBean of " +
            "type: " + bean.getName());
    }
View Full Code Here

        }
        catch (RuntimeException e) {
            throw e;
        }
        catch (Exception e) {
            throw new StripesServletException(
                    "Unhandled exception trying to force initialization of StripesFilter", e);
        }

        // Blow up if no StripesFilter instance could be acquired or created
        if (getStripesFilter() == null) {
            String msg = "There is no StripesFilter instance available in the servlet context, "
                    + "and DynamicMappingFilter was unable to initialize one. See previous log "
                    + "messages for more information.";
            log.error(msg);
            throw new StripesServletException(msg);
        }
    }
View Full Code Here

                    }
                }

                // Insist that we have a handler
                if (handler == null) {
                    throw new StripesServletException(
                            "No handler method found for request with  ActionBean [" +
                            bean.getClass().getName() + "] and eventName [ " + eventName + "]");
                }

                log.debug("Resolved event: ", context.getEventName(), "; will invoke: ",
View Full Code Here

            context.setRequest(request);
            context.setResponse(response);
            return context;
        }
        catch (Exception e) {
            throw new StripesServletException("Could not instantiate configured " +
            "ActionBeanContext class: " + this.contextClass, e);
        }
    }
View Full Code Here

        }
        catch (Exception e) {
            log.fatal(e,
                    "Could not instantiate specified Configuration. Class name specified was ",
                    "[", clazz.getName(), "].");
            throw new StripesServletException("Could not instantiate specified Configuration. "
                    + "Class name specified was [" + clazz.getName() + "].", e);
        }

        this.configuration.setBootstrapPropertyResolver(bootstrap);
        this.configuration.init();
View Full Code Here

            context.setRequest(request);
            context.setResponse(response);
            return context;
        }
        catch (Exception e) {
            throw new StripesServletException("Could not instantiate configured " +
            "ActionBeanContext class: " + this.contextClass, e);
        }
    }
View Full Code Here

        }
        catch (Exception e) {
            log.fatal(e,
                    "Could not instantiate specified Configuration. Class name specified was ",
                    "[", clazz.getName(), "].");
            throw new StripesServletException("Could not instantiate specified Configuration. "
                    + "Class name specified was [" + clazz.getName() + "].", e);
        }
    }
View Full Code Here

        }
        catch (RuntimeException e) {
            throw e;
        }
        catch (Exception e) {
            throw new StripesServletException(
                    "Unhandled exception trying to force initialization of StripesFilter", e);
        }

        // Blow up if no StripesFilter instance could be acquired or created
        if (getStripesFilter() == null) {
            String msg = "There is no StripesFilter instance available in the servlet context, "
                    + "and DynamicMappingFilter was unable to initialize one. See previous log "
                    + "messages for more information.";
            log.error(msg);
            throw new StripesServletException(msg);
        }
    }
View Full Code Here

TOP

Related Classes of net.sourceforge.stripes.exception.StripesServletException

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.