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()

1 Answer 1


The problem was related to a conflict in dependencies. This function "encodeBase64String()" is normally available in the jar commons-codec.jar Both our original application and the dd4t application had these jars in their classpath, but the original application had a really old version (1.3, versus 1.8 for DD4T). Seems the old version of the jar didn't have this function yet, which resulted in this error.

The solution was fairly simple : we just had to update the version of the commons codec in our original web application to the same one dd4t uses, and the problem was gone.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.