Package org.strecks.exceptions

Examples of org.strecks.exceptions.ApplicationRuntimeException


          Locale locale = (Locale) request.getAttribute(Globals.LOCALE_KEY);
          view = viewResolver.resolveViewName(viewName, locale);
        }
        catch (Exception e)
        {
          throw new ApplicationRuntimeException("Exception thrown during resolution of view name " + viewName
              + " using ViewResolver " + viewResolver.getClass(), e);
        }

      }
      // no resolver supplied: use name to look up View
View Full Code Here


    {
      afterInterceptor.afterExecute(actionBean, context, ee);
    }
    catch (ClassCastException e)
    {
      throw new ApplicationRuntimeException("Action bean class " + actionBean.getClass().getName()
          + " is not compatible with AfterInterceptor implementation "
          + afterInterceptor.getClass().getName() + ", which is parameterized with the type "
          + ReflectHelper.getGenericType(afterInterceptor.getClass(), AfterInterceptor.class), e);
    }
    catch (Exception e)
View Full Code Here

    {
      beforeInterceptor.beforeExecute(actionBean, context);
    }
    catch (ClassCastException e)
    {
      throw new ApplicationRuntimeException("Action bean class " + actionBean.getClass().getName()
          + " is not compatible with BeforeInterceptor implementation "
          + beforeInterceptor.getClass().getName() + ", which is parameterized with the type "
          + ReflectHelper.getGenericType(beforeInterceptor.getClass(), BeforeInterceptor.class));
    }
  }
View Full Code Here

        initMethod.invoke(actionBean, new Object[]
        {});
      }
      catch (Exception e)
      {
        throw new ApplicationRuntimeException(e);
      }
    }
  }
View Full Code Here

        closeMethod.invoke(actionBean, new Object[]
        {});
      }
      catch (Exception e)
      {
        throw new ApplicationRuntimeException(e);
      }
    }
  }
View Full Code Here

      Class<? extends Validator> validatorClass = validator.getClass();
      Type[] genericTypes = ReflectHelper.getGenericTypes(validatorClass, Validator.class);
      String description = ReflectHelper.getTypeArrayDescription(genericTypes);

      throw new ApplicationRuntimeException("Mismatch between parameterization type of validator: "
          + validatorClass.getName() + description + ", and type of property being validated: property "
          + propertyName + " in class " + containingClass.getName() + "(" + sourceType + ")");
    }
  }
View Full Code Here

        });
      }
    }
    catch (IllegalArgumentException e)
    {
      throw new ApplicationRuntimeException("Application error: could not set '" + targetValue + "' (type "
          + (targetValue != null ? targetValue.getClass().getName() : "null") + ") using method "
          + setterMethod.getName() + " of class " + targetBean.getClass().getName()
          + ": illegal argument supplied", e);
    }
    catch (Exception e)
    {
      throw new ApplicationRuntimeException("Application error: could not set " + targetValue + " using method "
          + setterMethod.getName() + " of class " + targetBean.getClass().getName(), e);
    }

  }
View Full Code Here

      PropertyUtils.setProperty(targetBean, beanPropertyName, targetValue);

    }
    catch (IllegalArgumentException e)
    {
      throw new ApplicationRuntimeException(
          "Application error: could not set '" + targetValue + "' (type "
              + (targetValue != null ? targetValue.getClass().getName() : "null") + ") for property "
              + beanPropertyName + " of class " + targetBean.getClass().getName()
              + ": illegal argument supplied", e);
    }
    catch (Exception e)
    {
      throw new ApplicationRuntimeException("Application error: could not set " + targetValue + " for property "
          + beanPropertyName + " of class " + targetBean.getClass().getName(), e);
    }

  }
View Full Code Here

        this.propertyDescriptorCache.put(pds[i].getName(), pds[i]);
      }
    }
    catch (IntrospectionException ex)
    {
      throw new ApplicationRuntimeException("Cannot get BeanInfo for object of class [" + clazz.getName() + "]",
          ex);
    }
  }
View Full Code Here

  public static String checkSetterMethodName(Method m)
  {
    String methodName = m.getName();
    if (!methodName.startsWith("set"))
    {
      throw new ApplicationRuntimeException("Method " + m + " declared in " + m.getDeclaringClass()
          + " is not a setter method");
    }
    return methodName;
  }
View Full Code Here

TOP

Related Classes of org.strecks.exceptions.ApplicationRuntimeException

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.