Package net.sourceforge.stripes.exception

Examples of net.sourceforge.stripes.exception.StripesRuntimeException


            propertyDescriptors.put(clazz, map);

            return pds;
        }
        catch (IntrospectionException ie) {
            throw new StripesRuntimeException("Could not examine class '" + clazz.getName()
                    + "' using Introspector.getBeanInfo() to determine property information.", ie);
        }
    }
View Full Code Here


                Interceptor interceptor = getObjectFactory().newInstance(
                        (Class<? extends Interceptor>) type);
                addInterceptor(map, interceptor);
            }
            catch (Exception e) {
                throw new StripesRuntimeException("Could not instantiate configured Interceptor ["
                        + type.getClass().getName() + "].", e);
            }
        }

        return map;
View Full Code Here

                component.init(this);
                return component;
            }
            catch (Exception e) {
                throw new StripesRuntimeException("Could not instantiate configured "
                        + componentType.getSimpleName() + " of type [" + clazz.getSimpleName()
                        + "]. Please check "
                        + "the configuration parameters specified in your web.xml.", e);

            }
View Full Code Here

                className = clazz.getName();
                log.info("Class implementing/extending ", targetType.getSimpleName(),
                        " found via auto-discovery: ", className);
            }
            else if (classes.size() > 1) {
                throw new StripesRuntimeException(StringUtil.combineParts(
                        "Found too many classes implementing/extending ", targetType
                                .getSimpleName(), ": ", classes));
            }
        }
View Full Code Here

                className = className.trim();
                try {
                    classes.add(ReflectUtil.findClass(className));
                }
                catch (ClassNotFoundException e) {
                    throw new StripesRuntimeException("Could not find class [" + className
                            + "] specified by the configuration parameter [" + paramName
                            + "]. This value must contain fully qualified class names separated "
                            + " by commas.");
                }
            }
View Full Code Here

            log.error(e, "Failure checking @Validate annotations ", getClass().getName());
            throw e;
        }
        catch (Exception e) {
            log.error(e, "Failure checking @Validate annotations ", getClass().getName());
            StripesRuntimeException sre = new StripesRuntimeException(e.getMessage(), e);
            sre.setStackTrace(e.getStackTrace());
            throw sre;
        }
        return annotationInfoMap;
    }
View Full Code Here

                for (Class<?> cls : annotationMap.keySet()) {
                    buf.append('@').append(cls.getSimpleName()).append(' ');
                }
                buf.append('\n');
            }
            throw new StripesRuntimeException(buf.toString());
        }
        if (!map.isEmpty()) {
            annotationInfo.setAnnotationMap(map.entrySet().iterator().next().getValue());
        }
        return annotationInfo;
View Full Code Here

    }

    /** Default constructor that throws an exception if the JSP2.1 APIs are not available. */
    public Jsp21ExpressionExecutor() {
        if (getExpressionFactory() == null) {
            throw new StripesRuntimeException("Could not create a JSP2.1 ExpressionFactory.");
        }
    }
View Full Code Here

                // If this turns out to be slow we could probably cache the parsed expression
                expression = factory.createValueExpression(ctx, expressionString, Boolean.class);
            }
        }
        catch (ELException ele) {
            throw new StripesRuntimeException(
                    "Could not parse the EL expression being used to validate field " +
                    name.getName() + ". This is not a transient error. Please double " +
                    "check the following expression for errors: " +
                    validationInfo.expression(), ele);
        }
View Full Code Here

                String expression = validationInfo.expression();
                expr = evaluator.parseExpression(expression, Boolean.class, null);
                resolver = new BeanVariableResolver(bean);
            }
            catch (ELException ele) {
                throw new StripesRuntimeException(
                        "Could not parse the EL expression being used to validate field " +
                        name.getName() + ". This is not a transient error. Please double " +
                        "check the following expression for errors: " +
                        validationInfo.expression(), ele);
            }
View Full Code Here

TOP

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

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.