Maybe ClassLoaderService sees too much? But even then, for it to be inconsistent would mean some inconsistency in how the ClassLoaderService's aggregated ClassLoaders are built.
So in this case there are two separate persistence units which use the same entity class name (something that could easily happen in Java EE). The loaded classes are different because the two persistence units have totally separate classloaders. If the ClassLoader service is a singleton then a naive search will always be wrong for one of the persistence units. |