Examples of ApplicationConfigurationException


Examples of org.jitterbit.application.config.ApplicationConfigurationException

            if (clazz != null) {
                return clazz.newInstance();
            }
            return new DefaultApplicationWorker();
        } catch (ClassCastException ex) {
            throw new ApplicationConfigurationException(ex);
        } catch (InstantiationException ex) {
            throw new ApplicationConfigurationException(ex);
        } catch (IllegalAccessException ex) {
            throw new ApplicationConfigurationException(ex);
        }
    }
View Full Code Here

Examples of org.strecks.exceptions.ApplicationConfigurationException

                  + " converted to " + converted.getClass() + " and not the "
                  + converterType + " expected by one or more validators. "
                  + "Check that the property contains an appropriate converter in its getter method";

              log.info(message);
              throw new ApplicationConfigurationException(message);
            }

          }
          else
          {
View Full Code Here

Examples of org.strecks.exceptions.ApplicationConfigurationException

            InjectionSetter inputSetter = createSetter(actionClass, m);
            PropertyDescriptor propertyDescriptor = BeanUtils.findPropertyForMethod(m);
           
            if (propertyDescriptor == null)
            {
              throw new ApplicationConfigurationException("Method " + m.getName() + " has no valid property descriptor. Is this a valid property");
            }
           
            wrapper = new InjectionWrapper(inputSetter, propertyDescriptor);
          }
          InjectionHandler handler = factory.createInjectionHandler(annotation, actionClass, wrapper
View Full Code Here

Examples of org.strecks.exceptions.ApplicationConfigurationException

   
    MessageResources messageResources = getMessageResources(injectionContext);

    if (messageResources == null)
    {
      throw new ApplicationConfigurationException("test me");
    }

    HttpServletRequest request = injectionContext.getRequest();
    Locale locale = (Locale) request.getAttribute(Globals.LOCALE_KEY);
View Full Code Here

Examples of org.strecks.exceptions.ApplicationConfigurationException

    boolean ok = ReflectHelper.checkGenericType(converterClass, Converter.class, String.class);
    if (!ok)
    {
      Class sourceType = ReflectHelper.getGenericType(converterClass, Converter.class);
     
      throw new ApplicationConfigurationException("@" + input.annotationType().getSimpleName() + " in "
          + clazz.getName() + " uses converter " + converterClass.getName()
          + " whose conversion source type is " + sourceType.getName() + ", and not "
          + String.class.getName());
     
    }
View Full Code Here

Examples of org.strecks.exceptions.ApplicationConfigurationException

      {

        Object bean = SpringUtils.getSpringBean(actionContext.getContext(), name);
        if (!(bean instanceof ViewResolver))
        {
          throw new ApplicationConfigurationException("Bean referenced using the 'resolver' attribute of @"
              + SpringView.class.getSimpleName() + " annotation is not instance of "
              + ViewResolver.class.getName());
        }

        ViewResolver viewResolver = (ViewResolver) bean;
        String viewName = modelAndView.getViewName();

        try
        {
          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
      else
      {
        String viewName = modelAndView.getViewName();
        Object bean = SpringUtils.getSpringBean(actionContext.getContext(), viewName);
        if (!(bean instanceof View))
        {
          throw new ApplicationConfigurationException(
              "Bean referenced using the 'viewName' property of the returned ModelAndView of the method containing @"
                  + SpringView.class.getSimpleName() + " is not an instance of " + View.class.getName());
        }

        view = (View) bean;
View Full Code Here

Examples of org.strecks.exceptions.ApplicationConfigurationException

    SpringViewNavigationHandler springViewNavigationHandler = new SpringViewNavigationHandler(view.resolver());

    Class<?> returnType = containingMethod.getReturnType();
    if (!ModelAndView.class.isAssignableFrom(returnType))
    {
      throw new ApplicationConfigurationException("Method " + containingMethod.getName() + "() in class "
          + containingMethod.getDeclaringClass().getName() + " must return object of type "
          + ModelAndView.class.getName());
    }

    NavigationHandlerFactory factoryInstance = new IdentityNavigationHandlerFactory(springViewNavigationHandler);
View Full Code Here

Examples of org.strecks.exceptions.ApplicationConfigurationException

  public void checkParameterName(ActionMapping mapping, String parameterName)
  {
    if (parameterName == null)
    {
      throw new ApplicationConfigurationException(
          "The element 'parameter' is required to determine the method name, and is required in required in path "
              + mapping.getPath());
    }
  }
View Full Code Here

Examples of org.strecks.exceptions.ApplicationConfigurationException

    @SuppressWarnings("unchecked")
    ActionInterface actionInterface = (ActionInterface) controllerClass.getAnnotation(ActionInterface.class);

    if (actionInterface == null)
    {
      throw new ApplicationConfigurationException("The controller class " + controllerClass + " declared from "
          + actionBeanClass + " does not have an " + ActionInterface.class + " annnotation");
    }

    Class actionInterfaceType = actionInterface.name();

    // check that actionInterfaceType is an interface
    if (!actionInterfaceType.isInterface())
    {
      throw new ApplicationConfigurationException("The controller class " + controllerClass + " declared from "
          + actionBeanClass + " declares an action interface type " + actionInterfaceType
          + " which is not an interface");
    }
    return actionInterfaceType;
  }
View Full Code Here

Examples of org.strecks.exceptions.ApplicationConfigurationException

    {
      controllerActionInstance = controllerClass.newInstance();
    }
    catch (InstantiationException e)
    {
      throw new ApplicationConfigurationException("Could not instantiate " + controllerClass
          + " declared from action bean class " + actionBeanClass);
    }
    catch (IllegalAccessException e)
    {
      throw new ApplicationConfigurationException("Illegal access to " + controllerClass
          + " declared from action bean class " + actionBeanClass);
    }
    return controllerActionInstance;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.