On 19/10/2019 12:38, Andy Seaborne wrote:
On 19/10/2019 10:07, John Kozma wrote:
I'm trying to get through the Jena RDF tutorial_1
<https://github.com/apache/jena/tree/master/jena-core/src-examples/jena/examples/rdf/Tutorial01.java>.
I downloaded the example, commented out the package statement,
downloaded Jena and slf4j and included them in my class path argument,
but I'm still getting an error:
D:\Courses\jenaOntologies>java -cp
.;D:\MulCh_research\ontologyEditor\apache-jena-3.12.0\apache-jena-3.12.0\lib;D:\MulCh_research\ontologyEditor\slf4j-1.7.28\slf4j-1.7.28
That does not look right.
It should be ...\apache-jena-3.12.0\lib\* to to pick up all the jena
jars (java classpath treats * specially - need to be careful in scripts
to make sure the * is passed through).
Then check lib\ has
slf4j-api-1.7.26.jar
slf4j-log4j12-1.7.26.jar
log4j-1.2.17.jar
"...\slf4j-1.7.28\slf4j-1.7.28" isn't a jat so will have no effect.
^^^
jar
All the necessary jars are in apache-jena-3.12.0\lib
Andy
Tutorial01
Exception in thread "main" java.lang.NoClassDefFoundError:
org/slf4j/LoggerFactory
at
org.apache.jena.rdf.model.impl.PropertyImpl.<clinit>(PropertyImpl.java:47)
at
org.apache.jena.rdf.model.ResourceFactory$Impl.createProperty(ResourceFactory.java:335)
at
org.apache.jena.rdf.model.ResourceFactory.createProperty(ResourceFactory.java:180)
at org.apache.jena.vocabulary.RDF.property(RDF.java:51)
at org.apache.jena.vocabulary.RDF$Init.first(RDF.java:106)
at org.apache.jena.vocabulary.RDF.<clinit>(RDF.java:64)
at org.apache.jena.sys.InitJenaCore.init(InitJenaCore.java:57)
at org.apache.jena.sys.InitJenaCore.start(InitJenaCore.java:31)
at
org.apache.jena.sys.JenaSystem.lambda$init$2(JenaSystem.java:116)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1507)
at org.apache.jena.sys.JenaSystem.forEach(JenaSystem.java:191)
at org.apache.jena.sys.JenaSystem.forEach(JenaSystem.java:168)
at org.apache.jena.sys.JenaSystem.init(JenaSystem.java:114)
at
org.apache.jena.rdf.model.ModelFactory.<clinit>(ModelFactory.java:49)
at Tutorial01.main(Tutorial01.java:16)
Caused by: java.lang.ClassNotFoundException: org.slf4j.LoggerFactory
at
java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:604)
at
java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at
java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
... 15 more
Any help would be appreciated.
John Kozma