Package de.novanic.eventservice.client.config

Examples of de.novanic.eventservice.client.config.ConfigurationException


                        }
                }
            }

            if(theDefaultConstructor == null) {
                throw new ConfigurationException("The class \"" + theConnectionIdGeneratorClass + "\" has no default constructor and no constructor which requires a single configuration! At least one of both is needed!");
            }
            return theDefaultConstructor.newInstance();
        } catch(ClassNotFoundException e) {
            throw new ConfigurationException(aClassName + " couldn't be instantiated!", e);
        } catch(InstantiationException e) {
            throw new ConfigurationException(aClassName + " couldn't be instantiated!", e);
        } catch(IllegalAccessException e) {
            throw new ConfigurationException(aClassName + " couldn't be instantiated!", e);
        } catch(InvocationTargetException e) {
            throw new ConfigurationException(aClassName + " couldn't be instantiated!", e);
        }
    }
View Full Code Here


    private static String getConfiguration(String aConfigProperties) {
        URL theResource = Thread.currentThread().getContextClassLoader().getResource(aConfigProperties);
        if(theResource != null) {
            return theResource.getFile();
        } else {
            throw new ConfigurationException("Configuration file \"" + aConfigProperties + "\" could not be found on classpath!");
        }
    }
View Full Code Here

TOP

Related Classes of de.novanic.eventservice.client.config.ConfigurationException

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.