From: David C. <dc...@al...> - 2007-03-22 19:11:35
|
I've been using Rmock 2.0RC5 for a bit. It works fine for me when mocking interfaces, but every attempt to mock classes gets me an exception like the one below. I tried 2.0 (final) and a bunch of tests that worked fine started breaking in the same manner. Any ideas? David net.sf.cglib.core.CodeGenerationException: java.lang.reflect.InvocationTargetException-->null at net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:236) at net.sf.cglib.proxy.Enhancer.createHelper(Enhancer.java:377) at net.sf.cglib.proxy.Enhancer.create(Enhancer.java:285) at com.agical.rmock.extension.cglib.CglibProxyFactory.createInterfaceProxy(CglibProxyFactory.java:61) at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at com.agical.rmock.core.hub.ProxySetMethodConnectionStrategy$ConsumableInvocationHandler.invoke(ProxySetMethodConnectionStrategy.java:34) at $Proxy3.createInterfaceProxy(Unknown Source) at com.agical.rmock.extension.junit.RMockTestCase.mock(RMockTestCase.java:106) at com.agical.rmock.extension.junit.RMockTestCase.mock(RMockTestCase.java:87) at com.enttek.cim.service.rest.client.service.RestServiceFactoryImpl_UT.setUp(RestServiceFactoryImpl_UT.java:31) at com.agical.rmock.extension.junit.BasicJUnitStrategyTestCase$1.run(BasicJUnitStrategyTestCase.java:32) at com.agical.rmock.core.strategy.impl.CompositeStep.run(CompositeStep.java:24) at com.agical.rmock.core.strategy.impl.FinallyStep.run(FinallyStep.java:19) at com.agical.rmock.core.expectation.Engine.runStrategy(Engine.java:142) at sun.reflect.GeneratedMethodAccessor36.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at com.agical.rmock.core.hub.ProxySetMethodConnectionStrategy$ConsumableInvocationHandler.invoke(ProxySetMethodConnectionStrategy.java:34) at $Proxy7.runStrategy(Unknown Source) at com.agical.rmock.extension.junit.AbstractStrategyTestCase.runBare(AbstractStrategyTestCase.java:112) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:118) at junit.framework.TestSuite.runTest(TestSuite.java:208) at junit.framework.TestSuite.run(TestSuite.java:203) at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:128) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196) Caused by: java.lang.reflect.InvocationTargetException at sun.reflect.GeneratedMethodAccessor27.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at net.sf.cglib.core.ReflectUtils.defineClass(ReflectUtils.java:384) at net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:218) ... 33 more Caused by: java.lang.SecurityException: class "org.springframework.context.ApplicationContextMock"'s signer information does not match signer information of other classes in the same package at java.lang.ClassLoader.checkCerts(ClassLoader.java:611) at java.lang.ClassLoader.defineClass(ClassLoader.java:532) ... 38 more |