Parso library problem
I am trying to use the Parso Java library to read in a .sas7bdat file. My goal is to convert it to CSV and then manipulate it afterwards. The directions I follow to set it up are here. I have a parso.jar file imported into Eclipse successfully. However, when I try to instantiate like this:
InputStream streamIn = new FileInputStream(sasFile);
SasFileReader sasFileReader = new SasFileReader(streamIn);
I am getting this exception:
Exception in thread "main"
java.lang.NoClassDefFoundError:org/slf4j/LoggerFactory
at com.ggasoftware.parso.SasFileReader.<clinit>(SasFileReader.java:30)
at sas7bdatFileConverter.convert(sas7bdatFileConverter.java:25)
at sas7bdatFileConverter.main(sas7bdatFileConverter.java:11)
Caused by: java.lang.ClassNotFoundException: org.slf4j.LoggerFactory
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
I would really appreciate any hints as to what I am not seeing here. Thank!
source to share
The article you posted says that you should use a Maven dependency (which automatically downloads all the required jar files), but it appears that you are importing the jar file directly.
Since you are not using Maven, you also need to include the jf slf4j file (and that is either slf4j-api, which doesn't really do anything, or at least slf4j-simple, which comes in the console).
Just go to http://www.slf4j.org/ and download the newest package, then pull slf4j-api-<version>.jar
(and slf4j-simple-<version>.jar
if you want to see the Parso library included in your console).
In the long run, be sure to learn how to use Maven, it will greatly ease your pain of managing the library.
source to share