What is the relationship between tomcat and jdk and web application?

Here is a question I asked recently: org.apache.commons.codec.digest.Md5Crypt.md5Crypt. exception occurred under linux but fine under windows

Although finally I decided, but I'm still confused. What did it do?

My jdk was 1.7, my tomcat was 7, my web application was compiled by jdk 1.7, the commons-codec.jar version was 1.10, then an exception was thrown.

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 

When I changed my cat from 7 to 8, it worked fine. What for? What does tomcat do for apps?

+5
source share
1 answer

I highly recommend that the problem is not resolved because you used tomcat 8 instead of 7, but it was resolved because you had a conflict in your Java build path, which meant that you had two different versions of the commons-codec JAR at startup There was probably time in your tomcat 7 lib folder.

+2
source

Source: https://habr.com/ru/post/1239412/


All Articles