Hello I am trying to connect a Java Maven application to Cassandra with hector. The code is very simple
imports......
public class App {
public static void main( String[] args ){
Cluster cluster = HFactory.getOrCreateCluster("TestCluster",
new CassandraHostConfigurator("localhost:9042"));
}
}
}
When I run it I have these exceptions:
log4j:WARN No appenders could be found for logger (me.prettyprint.cassandra.connection.CassandraHostRetryService).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
I think I need to set up something but I cannot find what it is.
You need a log4j properties file. From the Hector docs:
Run your application with the following parameter:
Where log4j.properties contains:
Log4J is very powerful, check out the project site for more information.