Hi,

I'm deploying 4.9.2.0 (not the vanilla version, but rather an upgraded
version of our fork) on Tomcat 8. Management server startup fails with the
following error:

java.lang.IncompatibleClassChangeError: Found interface
com.google.common.base.Equivalence, but class was expected

I've traced this down to the OutOfBandServiceManagerImpl. More
specifically, when it tries to build the hostAlertCache using Guava's
CacheBuilder. Deep in Guava, it's calling an "identity()" method on the
Equivalence class.  All of the Guava classes are coming from guava-19.0
except for com/google/common/base/Equivalence.class. The Equivalence class
is being loaded from the midonet jar for some reason, and that version does
not have the method needed. Thus, the error.

This is because Tomcat apparently does not load jars in alphabetical order
anymore, starting with version 8. An open ticket for them to fix this is
here: https://bz.apache.org/bugzilla/show_bug.cgi?id=57129

It could be possible to "fix" this by using a custom ClassLoader to force
Tomcat to load things alphabetically (testing that right now--and not
really succeeding), but the proper fix is to have the midonet client not be
packaging guava with itself. Does anyone know why this is?

Jeff

Reply via email to