>>>>> Steinar Bang <[email protected]>:
> Is there something else I can try?
Looking closer at the error message:
java.lang.LinkageError: loader constraint violation in interface itable
initialization: when resolving method
"$javax.servlet.http.HttpServletRequest$$EnhancerByMockitoWithCGLIB$$22025fbe.newInstance([Ljava/lang/Class;[Ljava/lang/Object;[Lorg/mockito/cglib/proxy/Callback;)Ljava/lang/Object;"
the class loader (instance of
org/mockito/internal/creation/util/SearchingClassLoader) of the current class,
$javax/servlet/http/HttpServletRequest$$EnhancerByMockitoWithCGLIB$$22025fbe,
and the class loader (instance of
org/apache/felix/framework/BundleWiringImpl$BundleClassLoader) for interface
org/mockito/cglib/proxy/Factory have different Class objects for the type
[Lorg/mockito/cglib/proxy/Callback; used in the signature
Looking closer at the error message: The two classloaders that load
different versions of org.mockito.cglib.proxy.Callback, are:
1. One classloader belonging to mockito
(org.mockito.internal.creation.util.SearchingClassLoader),
this is the classloader that has loaded the mock
2. One classloader belonging to felix
(org.apache.felix.framework.BundleWiringImpl$BundleClassLoader)
Is the problem that mockito uses its own classloader?
The problem is similar to what was seen in this bug, 6 years ago
https://ops4j1.jira.com/browse/PAXEXAM-274
But the bug was 6 years ago, and many versions of everything (OSGi,
pax-exam, mockito, Java) ago, so I'm not sure if the simiarlities are a
red herring...?
My versions of the components, are:
Karaf 4.1.2
Pax-exam 4.11.0
Mockito 1.10.19
Java 1.8
Windows 10
--
--
------------------
OPS4J - http://www.ops4j.org - [email protected]
---
You received this message because you are subscribed to the Google Groups
"OPS4J" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.