Closed sparsick closed 8 years ago
Hi Sandra,
LinkageError is thrown when a class 'ABC' is loaded by more than one classloader and those classes are being used together in the same code (compared, cast, etc). Independent of whether it is the same Class name or even if it is loaded from an identical jar - a Class from one classloader is always treated as a different Class if loaded from another classloader.
I suppose you are using the internal Runner which is not recommended as it gets the tests to be run in the confluence instance / classloaders.
We recommend using a remote agent and running your tests through it. So all tests are run in an own process and with an own classloader:
Viel Erfolg ;)
Thanks for the hint. I'll check it out in the next days.
This hint helped. Thank you for your help.
Hi LivingDoc Team,
we currently evaluate LivingDoc and get following error messages inside confluence executing a recorded Selenium test against the Spring petclinic.war
Version numbers: JDK Version is 1.7.0.80 Tomcat is 8.0.30 Confluence Versions is 5.7.1
Error message
java.lang.LinkageError: loader constraint violation in interface itable initialization: when resolving method "org.apache.xpath.XPathContext$XPathExpressionContext.getVariableOrParam(Lorg/apache/xml/utils/QName;)Lorg/apache/xpath/objects/XObject;" the class loader (instance of info/novatec/testit/livingdoc/util/JoinClassLoader) of the current class, org/apache/xpath/XPathContext$XPathExpressionContext, and the class loader (instance of org/apache/catalina/loader/WebappClassLoader) for interface org/apache/xalan/extensions/ExpressionContext have different Class objects for the type text.getVariableOrParam(Lorg/apache/xml/utils/QName;)Lorg/apache/xpath/objects/XObject; used in the signature at org.apache.xpath.XPathContext.(XPathContext.java:1057) at org.apache.xpath.jaxp.XPathExpressionImpl.eval(XPathExpressionImpl.java:107) at org.apache.xpath.jaxp.XPathExpressionImpl.eval(XPathExpressionImpl.java:91) at org.apache.xpath.jaxp.XPathExpressionImpl.evaluate(XPathExpressionImpl.java:176) at org.openqa.selenium.firefox.internal.FileExtension.readIdFromInstallRdf(FileExtension.java:121) at org.openqa.selenium.firefox.internal.FileExtension.writeTo(FileExtension.java:61) at org.openqa.selenium.firefox.internal.ClasspathExtension.writeTo(ClasspathExtension.java:64) at org.openqa.selenium.firefox.FirefoxProfile.installExtensions(FirefoxProfile.java:443) at org.openqa.selenium.firefox.FirefoxProfile.layoutOnDisk(FirefoxProfile.java:421) at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.start(NewProfileExtensionConnection.java:95)
The POM of our fixture
We can provide the sources via Github if you want. Many thanks!
Sandra