Reputation: 141
The Snippet is as follows:
static String personURI = "http://somewhere/JohnSmith";
static String fullName = "John Smith";
Model model = ModelFactory.createDefaultModel();
Resource johnSmith = model.createResource(personURI);
johnSmith.addProperty(VCARD.FN, fullName);
When the code is run, it gives the following errors:
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/home/sabarish/workspace/apache-jena-2.7.2/lib/slf4j-log4j12-1.6.4.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/home/sabarish/Jena-2.6.4/lib/slf4j-log4j12-1.5.8.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
Any ideas on how to solve this?
Upvotes: 1
Views: 248
Reputation: 2059
It seems that the error you're getting is not related to your code, apparently you have more than one logging framework included in your classpath. Check which libraries you're importing.
In the StackTrace you posted, you seem to have imported the log4j jars twice.
This is NOT related to yout question but... I used Jena for a really cool project in my university as RDF/OWL API, If you plan to do serious reasoning over an OWL ontology, I would recommend you to use Pellet :).
I have some basic examples here if you want to check them out, I don't know if it will help you but it took me a couple of days to put everything together properly. https://github.com/iferminm/ReasoningAndPersisting
Upvotes: 3