We are using commons-codec
to encrypt passwords, using the org.apache.commons.codec.digest.Md5Crypt.md5Crypt
function.
It works fine on a Windows environment, but on CentOS, an exception is thrown.
We have 3 centOS test servers: one is centOS7, one is centOS6.7, and one is centOS7 minimal. The weirdest thing is, the code works on the centOS7 server, but not on the other two. The only difference between them is the OS. Same tomcats, same jdks, same builds.
Does it need any other things under linux?
The exception message:
java.lang.IllegalAccessError: tried to access method org.apache.commons.codec.digest.DigestUtils.getMd5Digest()Ljava/security/MessageDigest; from class org.apache.commons.codec.digest.Md5Crypt