Java Code Examples for org.apache.commons.configuration.ConfigurationException#getMessage()

The following examples show how to use org.apache.commons.configuration.ConfigurationException#getMessage() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: Main.java    From jbake with MIT License 6 votes vote down vote up
protected void run(String[] args) {
    SLF4JBridgeHandler.removeHandlersForRootLogger();
    SLF4JBridgeHandler.install();
    LaunchOptions res = parseArguments(args);

    final JBakeConfiguration config;
    try {
        if (res.isRunServer()) {
            config = getJBakeConfigurationFactory().createJettyJbakeConfiguration(res.getSource(), res.getDestination(), res.isClearCache());
        } else {
            config = getJBakeConfigurationFactory().createDefaultJbakeConfiguration(res.getSource(), res.getDestination(), res.isClearCache());
        }
    } catch (final ConfigurationException e) {
        throw new JBakeException("Configuration error: " + e.getMessage(), e);
    }
    run(res, config);
}
 
Example 2
Source File: DynamicTransformer.java    From steady with Apache License 2.0 5 votes vote down vote up
private DynamicTransformer() throws IllegalStateException {
	this.instrControl = InstrumentationControl.getInstance(this.getClass().getSimpleName());
	
	try {
		if(!CoreConfiguration.existsInBackend(CoreConfiguration.getAppContext()))
			throw new IllegalStateException("Application " + CoreConfiguration.getAppContext() + " does not exist in backend");
	} catch (ConfigurationException e) {
		throw new IllegalStateException("Error while reading configuration: " + e.getMessage());
	}
	
	// Freeze a couple of classes
	this.freezeClasses();
}
 
Example 3
Source File: RegistryServlet.java    From juddi with Apache License 2.0 5 votes vote down vote up
/**
 * Create the shared instance of jUDDI's Registry class and call it's
 * "init()" method to initialize all core components.
 */
@Override
public void init(ServletConfig config) throws ServletException {
	super.init(config);
	try {
		Registry.start();
	} catch (ConfigurationException e) {
		logger.error("jUDDI registry could not be started."
				+ e.getMessage(), e);
		throw new ServletException(e.getMessage(),e);
	}
}
 
Example 4
Source File: RegistryServlet.java    From juddi with Apache License 2.0 5 votes vote down vote up
/**
 * Create the shared instance of jUDDI's Registry class and call it's
 * "init()" method to initialize all core components.
 */
@Override
public void init(ServletConfig config) throws ServletException {
	super.init(config);
	try {
		Registry.start();
	} catch (ConfigurationException e) {
		logger.error("jUDDI registry could not be started."
				+ e.getMessage(), e);
		throw new ServletException(e.getMessage(),e);
	}
}
 
Example 5
Source File: GraphContextImpl.java    From windup with Eclipse Public License 1.0 5 votes vote down vote up
private void writeToPropertiesFile(Configuration conf, File file)
{
    try
    {
        PropertiesConfiguration propConf = new PropertiesConfiguration(file);
        propConf.append(conf);
        propConf.save();
    }
    catch (ConfigurationException ex)
    {
        throw new RuntimeException("Failed writing Titan config to " + file.getAbsolutePath() + ": " + ex.getMessage(), ex);
    }
}