Exception in thread "main" java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory at nl.siegmann.epublib.epub.EpubReader.<clinit>(EpubReader.java:33) #115
trying on a Simple Java program to read an epub file and display the Author (metadata):
try {
System.out.println("Inside Try block");
EpubReader ereader = new EpubReader();
Book ebook = ereader.readEpub(new FileInputStream(filepath));
List<String> titles = ebook.getMetadata().getTitles();
System.out.println("book title:" + (titles.isEmpty() ? "book has no title" : titles.get(0)));
}
catch(Exception e) {
System.out.println("Exception: "+ e);
}
This throws the exception:
Exception in thread "main" java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory
at nl.siegmann.epublib.epub.EpubReader.(EpubReader.java:33)
at epub_test.EPUB_TEST.main(EPUB_TEST.java:57)
Caused by: java.lang.ClassNotFoundException: org.slf4j.LoggerFactory
trying on a Simple Java program to read an epub file and display the Author (metadata):
This throws the exception:
Exception in thread "main" java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory at nl.siegmann.epublib.epub.EpubReader.(EpubReader.java:33)
at epub_test.EPUB_TEST.main(EPUB_TEST.java:57)
Caused by: java.lang.ClassNotFoundException: org.slf4j.LoggerFactory
I have imported "epublib-core-latest.jar" - and downloaded this file from: https://github.com/psiegman/epublib/epublib-core-latest.jar