When adding the dd4t jars in our custom web app, we get error : NoSuchMethodError: org.apache.commons.codec.binary.Base64.encodeBase64String()

We currently have a java web application, and we wish to use a part of the dd4t api in it. So, we included all dd4t jars and dependencies in our pom, and put all necessary configuration.

Now, we call the pagefactory to get the dd4t json of a page, but we get the following error

java.lang.NoSuchMethodError: org.apache.commons.codec.binary.Base64.encodeBase64String()