Search in sources :

Example 66 with ConfigurationException

use of org.apache.commons.configuration.ConfigurationException in project janusgraph by JanusGraph.

the class RemoteGraphApp method openGraph.

@Override
public GraphTraversalSource openGraph() throws ConfigurationException {
    LOGGER.info("opening graph");
    conf = new PropertiesConfiguration(propFileName);
    // using the remote driver for schema
    try {
        cluster = Cluster.open(conf.getString("gremlin.remote.driver.clusterFile"));
        client = cluster.connect();
    } catch (Exception e) {
        throw new ConfigurationException(e);
    }
    // using the remote graph for queries
    graph = EmptyGraph.instance();
    g = graph.traversal().withRemote(conf);
    return g;
}
Also used : ConfigurationException(org.apache.commons.configuration.ConfigurationException) PropertiesConfiguration(org.apache.commons.configuration.PropertiesConfiguration) ConfigurationException(org.apache.commons.configuration.ConfigurationException)

Aggregations

ConfigurationException (org.apache.commons.configuration.ConfigurationException)66 PropertiesConfiguration (org.apache.commons.configuration.PropertiesConfiguration)31 File (java.io.File)20 IOException (java.io.IOException)19 ActionEvent (java.awt.event.ActionEvent)6 Configuration (org.apache.commons.configuration.Configuration)6 ActionListener (java.awt.event.ActionListener)5 FileInputStream (java.io.FileInputStream)5 MalformedURLException (java.net.MalformedURLException)5 ArrayList (java.util.ArrayList)5 ZapXmlConfiguration (org.zaproxy.zap.utils.ZapXmlConfiguration)5 DistributedLogConfiguration (com.twitter.distributedlog.DistributedLogConfiguration)4 FileNotFoundException (java.io.FileNotFoundException)3 FileWriter (java.io.FileWriter)3 HashMap (java.util.HashMap)3 CloudRuntimeException (com.cloud.utils.exception.CloudRuntimeException)2 CommonsConfiguration (com.thinkaurelius.titan.diskstorage.configuration.backend.CommonsConfiguration)2 BufferedWriter (java.io.BufferedWriter)2 UnsupportedEncodingException (java.io.UnsupportedEncodingException)2 InvocationTargetException (java.lang.reflect.InvocationTargetException)2