Package org.impalaframework.exception

Examples of org.impalaframework.exception.ExecutionException


        Object value = null;
        try {
            value = declaredField.get(object);
        }
        catch (Exception e) {
            throw new ExecutionException(e.getMessage(), e);
        }
        return ObjectUtils.cast(value, clazz);
    }
View Full Code Here


        }
        return null;
    }

    private static ExecutionException rethrowMethodException(Exception e, String methodName, Object... args) {
        return new ExecutionException("Unable to execute method: " + methodName + ", args: " + Arrays.toString(args), e);
    }
View Full Code Here

    private static ExecutionException rethrowMethodException(Exception e, String methodName, Object... args) {
        return new ExecutionException("Unable to execute method: " + methodName + ", args: " + Arrays.toString(args), e);
    }

    private static ExecutionException rethrowConstructorException(Exception e, Constructor<?> constructor, Object... args) {
        return new ExecutionException("Unable to instantiate object using constructor '" + constructor + "', args: " + Arrays.toString(args), e);
    }
View Full Code Here

                lines.add(readLine);
            }
            return lines;
        }
        catch (IOException e) {
            throw new ExecutionException("Error reading lines using reader " + reader, e);
        }
    }
View Full Code Here

            }
           
            return target;
        }
        catch (Exception e) {
            throw new ExecutionException(e);
        }
    }
View Full Code Here

     * interface
     */
    static BeanFactory getRootBeanFactory(BeanFactory beanFactory) {

        if (!(beanFactory instanceof HierarchicalBeanFactory)) {
            throw new ExecutionException(BeanFactory.class.getSimpleName()
                    + " " + beanFactory + " is of type "
                    + beanFactory.getClass().getName()
                    + ", which is not an instance of "
                    + HierarchicalBeanFactory.class.getName());
        }
View Full Code Here

        return endPoint;
    }

    BeanDefinitionRegistry getBeanDefinitionRegistry(BeanFactory rootBeanFactory) {
        if (!(rootBeanFactory instanceof BeanDefinitionRegistry)) {
            throw new ExecutionException("Cannot use " + this.getClass().getName() + " with bean factory which does not implement " + BeanDefinitionRegistry.class.getName());
        }
        BeanDefinitionRegistry registry = (BeanDefinitionRegistry) rootBeanFactory;
        return registry;
    }
View Full Code Here

        List<Class> interfaceClasses = new ArrayList<Class>();
        for (String interfaceClass : interfaces) {
            Class resolvedClassName = ClassUtils.resolveClassName(interfaceClass.trim(), getBeanClassLoader());

            if (!resolvedClassName.isAssignableFrom(bean.getClass())) {
                throw new ExecutionException("Bean '" + beanName + "' is not instance of type " + resolvedClassName.getName() + ", declared in type list '" + typeList + "'");
            }

            interfaceClasses.add(resolvedClassName);
        }
    }
View Full Code Here

        ContextLoader contextLoader = null;
        try {
            contextLoader = contextLoaderClass.newInstance();
        }
        catch (Exception e) {
            throw new ExecutionException("Error instantiating context loader class " + contextLoaderClassName + ": " + e.getMessage(), e);
        }
       
        return contextLoader;
    }
View Full Code Here

    return parentClassLoader;
  }

  public static BeanDefinitionRegistry castToBeanDefinitionRegistry(final ConfigurableListableBeanFactory beanFactory) {
    if (!(beanFactory instanceof BeanDefinitionRegistry)) {
      throw new ExecutionException(beanFactory.getClass().getName() + " is not an instance of "
          + BeanDefinitionRegistry.class.getSimpleName());
    }
 
    BeanDefinitionRegistry beanDefinitionRegistry = (BeanDefinitionRegistry) beanFactory;
    return beanDefinitionRegistry;
View Full Code Here

TOP

Related Classes of org.impalaframework.exception.ExecutionException

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.