Package org.impalaframework.exception

Examples of org.impalaframework.exception.ExecutionException


            if (!result.isInError()) {
                try {
                servlet.init();
              }
              catch (Exception e) {
                throw new ExecutionException("Unable to reinitialize servlet " + servletName, e);
              }
            } else {
                logger.warn("Not attempting to initialize servlet " + servletName + " as module loading failed");
            }
          }
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

            FactoryBean factoryBean = (FactoryBean)service;
            try {
                this.service = factoryBean.getObject();
            }
            catch (Exception e) {
                throw new ExecutionException("Error retrieving target object from factory bean " + factoryBean, e);
            }
        } else {
            this.service = service;
        }
    }
View Full Code Here

        String description = resource.toString();
        try {
            inputStream = resource.openStream();
        }
        catch (IOException e) {
            throw new ExecutionException("Unable to load properties file from resource: " + description, e);
        }
        return loadProperties(inputStream, description);
    }
View Full Code Here

        String description = resource.getDescription();
        try {
            inputStream = resource.getInputStream();
        }
        catch (IOException e) {
            throw new ExecutionException("Unable to load properties file " + description, e);
        }

        return loadProperties(inputStream, description);
    }
View Full Code Here

        Properties props = new Properties();
        try {
            props.load(inputStream);
        }
        catch (IOException e) {
            throw new ExecutionException("Unable to load properties file " + description, e);
        }
        finally {
            if (inputStream != null) {
                try {
                    inputStream.close();
View Full Code Here

        Class<?> clazz = null;
        try {
            clazz = org.springframework.util.ClassUtils.forName(className, classLoader);
        }
        catch (ClassNotFoundException e) {
            throw new ExecutionException("Unable to find class of type '" + className + "'");
        }

        Object o = null;
        try {
           
            Constructor<?> constructor = ReflectionUtils.findConstructor(clazz, new Class[0]);
            if (constructor == null) {
                throw new InvalidStateException("Cannot instantiate class '" + clazz + "' as it has no no-args constructor");
            }
           
            ReflectionUtils.makeAccessible(constructor);
           
            o = constructor.newInstance();
            return o;
        }
        catch (InvalidStateException e) {
            throw e;
        }
        catch (ClassCastException e) {
            String message = "Created object '" + o + "' is an instance of " + o.getClass().getName();
            throw new ExecutionException(message, e);
        }
        catch (Exception e) {
            String message = "Error instantiating class of type '" + className + "': " + e.getMessage();
            throw new ExecutionException(message, e);
        }
    }
View Full Code Here

           
            try {
                return ClassUtils.forName(factoryClass);
            }
            catch (Throwable e) {
                throw new ExecutionException("Unable to load class: " + factoryClass + ": " + e.getMessage(), e);
            }
        }
        return getDefaultFactoryBeanClass();
    }
View Full Code Here

           
            try {
                return ClassUtils.forName(factoryClass);
            }
            catch (Throwable e) {
                throw new ExecutionException("Unable to load class: " + factoryClass + ": " + e.getMessage(), e);
            }
        }
        Class<?> beanClass = guessBeanClass(element);
        if (beanClass != null) {
            return beanClass;
View Full Code Here

            if (!result.isInError()) {
                try {
                servlet.init();
              }
              catch (Exception e) {
                throw new ExecutionException("Unable to reinitialize servlet " + servletName, e);
              }
            } else {
                logger.warn("Not attempting to initialize servlet " + servletName + " as module loading failed");
            }
          }
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.