Trying to convert a file from csv to rdf. No problems reading the data, but I'm having issues with the following and it's starting to become somewhat cumbersome at the moment. Maybe I'm just having one of those days.
public void makeFile(String[] array2)
{
this.array2 = array2;
try
{
Model model = ModelFactory.createDefaultModel();
Resource node;
FileOutputStream fout = new FileOutputStream("dir\\file.rdf");
for(int x = 0; x < array2.length; x++)
{
System.out.println(array2[x]);
System.out.println();
node = model.createResource(personURI).addProperty(VCARD.FN, fullName).addProperty(VCARD.N, model.createResource().addProperty(VCARD.Given, givenName).addProperty(VCARD.Family, familyName));
model.write(fout);
}
}
catch(IOException e)
{
System.out.println("IOException: " + e.getMessage());
}
catch(Exception a){}
}
The code itself doesn't have any problems and compiles fine. I'm using Jena as I want to write an RDF document, but the above in bold seems to throw problems every time, in every example I use. The following runtime issue appears in everything I try:
SLF4J built for org.grlea.log.adapters.slf4j.Slf4jAdapterFA
Exception in thread "main" java.lang.NoClassDefFoundError: org/grlea/log/SimpleLogger
at org.grlea.log.adapters.slf4j.Slf4jAdapterFA.getLogger(Unknown Source)
at org.slf4j.LoggerFactory.getLogger(Unknown Source)
at com.hp.hpl.jena.util.Metadata.<clinit>(Metadata.java:39)
at com.hp.hpl.jena.JenaRuntime.<clinit>(JenaRuntime.java:34)
at com.hp.hpl.jena.rdf.model.impl.RDFReaderFImpl.reset(RDFReaderFImpl.java:79)
at com.hp.hpl.jena.rdf.model.impl.RDFReaderFImpl.<clinit>(RDFReaderFImpl.java:72)
at com.hp.hpl.jena.rdf.model.impl.ModelCom.<clinit>(ModelCom.java:54)
at com.hp.hpl.jena.rdf.model.ModelFactory.createDefaultModel(ModelFactory.java:140)
at Tutorial04.main(Tutorial04.java:24)
Caused by: java.lang.ClassNotFoundException: org.grlea.log.SimpleLogger
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
... 9 more
Process completed.
I've searched everywhere possible and used additional jar files as suggested. Anyone have any ideas on what may be the issue?