'SLF4J: Which .jar files does iText7 need exactly?

I tried to run the sample code shown here but it's complaining that SLF4J is missing, so I downloaded the zip archive from the official website.

The tutorial video shows that 3 of the jar files are used (log4j-over-slf4j, slf4j-api & slf4j-log4j12) but if I add all 3 of them to the build path of my project (I'm not using Maven!), it complains that both "log4j-over..." and the api are there.

If I get rid of the "over" file, it says "Failed to instantiate SLF4J LoggerFactory".

So, which jar files do I need exactly to stop the complaints and run the sample code?



Solution 1:[1]

Try removing log4j12. You cannot use both over and log4j12 at the same time. link

Solution 2:[2]

If you wish to use log4j 1.2.x as the logging back-end with slf4j, you need log4j-1.2.17.jar, slf4j-api-1.7.25.jar and slf4j-log4j12-1.7.25.jar.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 CInvt
Solution 2 Ceki