Hello,
I have an issue to load RDF files only with the new Jena 3.0.1. With this
simple code:
import org.apache.jena.riot.RDFDataMgr;
import org.apache.jena.rdf.model.Model;
public class Test {
public static void main(String[] args) {
Model model = RDFDataMgr.loadModel("test.nt");
}
}
Where "test.nt" contains one simple triple:
<http://dbpedia.org/resource/Barack_Obama> <
http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <
http://dbpedia.org/ontology/Person> .
If I compile this code with Maven to build an executable jar and run it
with the command line:
java -jar target/test.jar
I get the following exception:
log4j:WARN No appenders could be found for logger (Jena).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for
more info.
Exception in thread "main" java.lang.ExceptionInInitializerError
at
Test.main(Test.java:5)
Caused by: java.lang.NullPointerException
at
org.apache.jena.tdb.sys.EnvTDB.processGlobalSystemProperties(EnvTDB.java:33)
at org.apache.jena.tdb.TDB.init(TDB.java:250)
at org.apache.jena.tdb.sys.InitTDB.start(InitTDB.java:29)
at org.apache.jena.system.JenaSystem.lambda$init$40(JenaSystem.java:114)
at java.util.ArrayList.forEach(ArrayList.java:1249)
at org.apache.jena.system.JenaSystem.forEach(JenaSystem.java:179)
at org.apache.jena.system.JenaSystem.forEach(JenaSystem.java:156)
at org.apache.jena.system.JenaSystem.init(JenaSystem.java:111)
at org.apache.jena.riot.RDFDataMgr.<clinit>(RDFDataMgr.java:81)
... 2 more
Any idea of what is going wrong?
Thanks in advance.
--
Julien Plu
PhD Student at Eurecom.
Personal webpage: http://jplu.developpez.com
FOAF file : http://jplu.developpez.com/julien
Email address : [email protected] && *[email protected]
<[email protected]>*
Phone : +33493008103
Twitter : @julienplu