I am getting this error in WildFly 8.2 at runtime:
java.lang.LinkageError: loader constraint violation: when resolving method "org.app.security.key.MyKeyRing.<init>(Lorg/app/security/key/MyPrivateKey;Lorg/app/security/key/MyPublicKey;[Ljava/security/cert/Certificate;)V" the class loader (instance of org/jboss/modules/ModuleClassLoader) of the current class, org/app/security/auth/KeyLoginModule, and the class loader (instance of org/jboss/modules/ModuleClassLoader) for resolved class, org/app/security/key/MyKeyRing, have different Class objects for the type curity/key/MyPrivateKey;Lorg/app/security/key/MyPublicKey;[Ljava/security/cert/Certificate;)V used in the signature
The classes starts with 'My' are created for the application and is inside the EAR file. There is a custom module in created in WildFly and the jar with these classes are available in that too.
What may be the reason?
Thanks!
Related
I try to run some TestNG tests in Eclipse and i get this error:
An internal error occurred during: "Launching AuthorizationServiceTest.testFixAuthorizationStatusPartialApproval".
loader constraint violation: loader org.eclipse.osgi.internal.loader.EquinoxClassLoader #3310bdff wants to load class org.apache.maven.project.MavenProject. A different class with the same name was previously loaded by org.eclipse.osgi.internal.loader.EquinoxClassLoader #21a1790d. (org.apache.maven.project.MavenProject is in unnamed module of loader org.eclipse.osgi.internal.loader.EquinoxClassLoader #21a1790d, parent loader 'platform')
I tried changing TestNG properites same as my teams and updated,cleaned restarted project- eclipse
error log with eclipse oxygen 4.7.0
An internal error occurred during: "Loading models".
loader constraint violation: when resolving field "IS_DETACHMENT" the class loader (instance of org/eclipse/osgi/internal/loader/EquinoxClassLoader) of the referring class, org/eclipse/sirius/business/internal/session/danalysis/DanglingRefRemovalTrigger, and the class loader (instance of org/eclipse/osgi/internal/loader/EquinoxClassLoader) for the field's resolved type, com/google/common/base/Predicate, have different Class objects for that type
But when I change to eclipse neon uml designer is well
I have installed SONARQUBE from Eclipse marketplace and restarted the eclipse as well.
But I am getting the below error while selecting SonarQube from Preferences page.
An error occurred while automatically activating bundle org.sonar.ide.eclipse.ui (351). And when I tracked through the root exception is below. Please help.
Root exception:
java.lang.LinkageError: loader constraint violation: when resolving method "org.slf4j.impl.StaticLoggerBinder.getLoggerFactory()Lorg/slf4j/ILoggerFactory;" the class loader (instance of org/eclipse/osgi/internal/loader/EquinoxClassLoader) of the current class, org/slf4j/LoggerFactory, and the class loader (instance of org/eclipse/osgi/internal/loader/EquinoxClassLoader) for the method's defining class, org/slf4j/impl/StaticLoggerBinder, have different Class objects for the type org/slf4j/ILoggerFactory used in the signature
at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:299)
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:269)
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:281)
After I installed, " m2e - slf4j over logback logging (Optional)" from the Luna update site, the preferences page worked.
We are trying to migrate seam2.2 + jboss4.2.3 to jboss7.1.1 + seam2.3 and we are currently facing:
Caused by: java.lang.LinkageError: loader constraint violation:
when resolving overridden method
"org.jboss.seam.faces.DateConverter.getAsString
(Ljavax/faces/context/FacesContext;
Ljavax/faces/component/UIComponent;Ljava/lang/Object;)Ljava/lang/String;"
the class loader (instance of org/jboss/modules/ModuleClassLoader)
of the current class, org/jboss/seam/faces/DateConverter,
and its superclass loader (instance of org/jboss/modules/ModuleClassLoader),
have different Class objects for the type ext/FacesContext;
Ljavax/faces/component/UIComponent;
Ljava/lang/Object;)
Ljava/lang/String;
used in the signature
Base on the articles I've found on google it seems like we are loading 2x the jboss-seam jar. 1 from the app and 1 from JBoss, but I'm not 100% sure though.
Any idea what's causing the problem?
Thanks,
czetsuya
Some jars are needed to build your application, but shouldn't be deployed with it.
Check the deployed-jars.list in your Seam app and make sure you're not deploying jars already loaded by jboss.
It won't be a Seam jars, those are not included with the jboss loader unless you add them. It will probably be a JSF jar.
I'm trying to deploy a WAR application on JBoss 6. I'm getting a LinkageError:
java.lang.LinkageError: loader constraint violation:
when resolving interface method "javax.xml.stream.XMLStreamReader.getName()Ljavax/xml/namespace/QName;" the class loader (instance of org/jboss/classloader/spi/base/BaseClassLoader) of the current class, org/codehaus/xfire/soap/handler/ReadHeadersHandler,
and the class loader (instance of <bootloader>) for resolved class, javax/xml/stream/XMLStreamReader, have different Class objects for the type javax/xml/namespace/QName used in the signature
So I'm trying to setup a classloader repository WEB-INF/jboss-web.xml file:
<class-loading>
<loader-repository java2ClassLoadingCompliance="false">
com.example:archive=unique-archive-name
<loader-repository-config>java2ParentDelegation=false</loader-repository-config>
</loader-repository>
</class-loading>
but I'm still getting the same error, any ideas?
This means two copies of javax/xml/namespace/QName are being loaded by two different classloaders. This thread and this one have a couple of useful responses that should help you get started on figuring out how dig deeper and hopefully get past this problem.