GutoVeronezi commented on PR #6693:
URL: https://github.com/apache/cloudstack/pull/6693#issuecomment-1237304268

    @shwstppr, sorry for the delay.
   
   The occurence of this error depends on how Java loads the four libraries 
mentioned. 
   
   The classpath is defined as `/usr/share/cloudstack-agent/lib/*`; therefore, 
it will load everything in the directory. Java uses [File#list] to load the 
JARs, which does not guarantee an order in the listing. With the JARs loaded, 
the classloader will try to find the first appropriate class between the 
libraries (as explained in this [documentation]); therefore, in some cases 
(environments) it can load the dependencies in different order. 
   
   We upgraded more than 40 services (Agents and Usages - in CentOS 7 and 
Ubuntu 20.04) to the opensaml upgrade patch and around 10 presented the error 
(around 25%), meaning that most of the time the libraries are loaded correctly; 
however, sometimes they are loaded in a different order that causes the error. 
   
   Due to lack of time we could not find the specificity that triggers the 
loading order difference between the environments; however, we do understand 
that they are caused by the dependencies introduced with the new opensaml 
version.
   
   [documentation]: 
https://blogs.oracle.com/javamagazine/post/how-the-jvm-locates-loads-and-runs-libraries
   [File#list]: 
https://docs.oracle.com/javase/7/docs/api/java/io/File.html#list()


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to