Configure Eclipse for Log4j
jena, log4j
Solution
jena use log4j as logging system, and the warning messages tell explicitly that you are lacking of a log4j.properties to initialize it.
"This occurs when the default configuration files log4j.properties and log4j.xml can not be found and the application performs no explicit configuration."
Create log4j.properties file under src and retry. You can find some sample config files here
Problem
I am working on an application using apache jena, to access dbpedia using sparql. Well I am very new to DBPedia and apache jena, I did some research and started with some sample code to create VCARD. public class DpPedia extends Object { ``` static String personURI = "<!..http://def/JohnSmith..!>"; static String fullName = "John Smith"; static String Fullname = "Pulkit Gupta"; public static void main (String args[]) { // create an empty model Model model = ModelFactory.createDefaultModel(); // create the resource Resource johnSmith = model.createResource(personURI); Resource pulkitgupta=model.createResource(personABC); // add the property johnSmith.addProperty(VCARD.FN, fullName); pulkitgupta.addProperty(VCARD.FN,Fullname); } ``` } However when i tried to execute this code .. It end up with an error log4j:WARN No appenders could be found for logger (org.apache.jena.riot.stream.JenaIOEnvironment). log4j:WARN Please initialize the log4j system properly. log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info. it seems my eclipse is not configured properly and I need to install Log4j. Well I downloaded the files, but not sure how up configure it with eclipse.