On 2/28/22 15:32, Ricardo Osorio wrote:
I have Tomcat 9.0.53 and i deployed a war file APP.war with 2 differents

    - app/WEB-INF/lib/javax.mail-1.6.0.jar
    - app/WEB-INF/lib/mail-1.4.jar

QA environment hardware properties:
Mem:                           6809
Architecture:                x86_64
CPU op-mode(s):        32-bit, 64-bit
CPU(s):                       2
Model name:               Intel(R) Xeon(R) CPU E7-4850 v4 @ 2.10GHz

Production environment hardware properties:
Mem:                           25960
Architecture:                x86_64
CPU op-mode(s):        32-bit, 64-bit
CPU(s):                       13
Model name:               Intel(R) Xeon(R) CPU E7-4890 v2 @ 2.80GHz

In my QA env tomcat class loaders use javax.mail-1.6.0.jar for method
[23.922s][info][class,load] javax.mail.Authenticator source:

but in my Prod env tomcat use mail-1.4.jar for same method
[12.306s][info][class,load] javax.mail.Authenticator source:

Do you know why Tomcat class loader use different libs in two different
Do you have best practices to force tomcat to always use the latest libs in
different environments?

The libraries are not loaded in any particular order. The difference you are seeing is the order that the filesystem is returning the files when a directory-scan is being done. It's totally arbitrary and unpredictable unless you understand how the filesystem organizes files. It can even change due to other factors than just e.g. updating a file or changing its timestamp.

Please see https://bz.apache.org/bugzilla/show_bug.cgi?id=57129 for lots more information.


To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to