>>>>> Steinar Bang <[email protected]>: > This worked fine in getting karaf to start and the service to be > produced, but actually using mockito mocks failed: > 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 [snip!]
> This is the code that fails: > > https://gist.github.com/steinarb/5534a87dd42827fad7a461732d6d5684#file-fildeleintegrationtest-java-L64 > I don't have any idea how to fix this, or even if it's fixable...? I tried setting frameworkProperty("felix.bootdelegation.implicit").value("false"), like what I found here: https://github.com/ops4j/org.ops4j.pax.exam2/blob/master/itest/osgi/src/it/regression-multi/src/test/java/org/ops4j/pax/exam/regression/multi/wrap/MockitoTest.java#L100 But I still got the same error: java.lang.LinkageError: loader constraint violation in interface itable initialization: when resolving method "$javax.servlet.http.HttpServletRequest$$EnhancerByMockitoWithCGLIB$$ec4b6d2f.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$$ec4b6d2f, 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 -- -- ------------------ 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.
