In our WAR We have three JARs that include the class org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager
. One jar has an older version than the others.
This does not cause an issue in our dev or staging environments, however in our production environment a version of the class from a different JAR is loaded causing us a java.lang.NoSuchMethodError
on startup. I've taken the exact same WAR that fails in production, and ran it successfully in stage and development.
In Java, what dictates the selection of which jar version of a class is chosen? What would cause that to be different on one box versus another?