"java.lang.LinkageError: loader constraint violation" when calling method on JBoss
Issue
- An EAR which contains a WAR and some JAR files, and is giving the error:
java\,lang\,LinkageError: loader constraint violation: when resolving method "com\,example\,ServiceClass\,doSomething\(Lcom\,example\,MyBean;\)V" the class loader \(instance of org/jboss/classloader/spi/base/BaseClassLoader\) of the current class, com/example/CallerClass, and the class loader \(instance of org/jboss/classloader/spi/base/BaseClassLoader\) for resolved class, comp\,example/ServiceClass, have different Class objects for the type com/example/MyBean used in the signature
Environment
- Red Hat JBoss Enterprise Application Platform (EAP)
- 4.2.x
- 4.3.x
- 5.x.x
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
