jjpd jjpd - 11 months ago 68
Java Question

Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory

I am using pdfbox in java to convert pdf to images. But when I compile I got the message


Exception in thread "main" java.lang.NoClassDefFoundError:
org/apache/commons/logging/LogFactory
.


Here is the code I am following. Kindly help me to get out of this error.

Answer Source

You need the Apache Commons Logging library on your classpath.

Chances are that you're missing all the dependencies of PDFBox:

Minimum Requirement for PDFBox

  • Java 1.5
  • commons-logging