When two classes of the same name are loaded inconsistently, the VM issues the above LinkageError, but the error message is very cryptic.
At the very least it can refer to the VM spec section 5.3.4. Furthermore, it should provide more information (such as (a) which class loader tried to load the 2nd class, (b) which class loader loaded the original definition, (c) where those two classes are being loaded from.)
Also, if I'm not mistaken, the error message could be further improved to indicate exactly which
constraint is violated.
All of those information makes it easier for developers to track down the problem. If you search
Google with "LinkageError loader constraints", you'll see how developers out there are hopelessly
confused with this error.
Finally, the definition of the loader constraints in the VM spec is hard to understand for most of the people. Perhaps it could be clarified in somewhere?