jmockit / jmockit1

Advanced Java library for integration testing, mocking, faking, and code coverage
Other
465 stars 240 forks source link

java.lang.VerifyError Again with JMockit 0.9 #200

Closed mkmewada closed 9 years ago

mkmewada commented 9 years ago

Hello team,

I have installed JMockit from below update site: http://dl.bintray.com/ajermakovics/jmockit/

Problem: Getting java.lang.VerifyError while running Junit Plugin-test JRE used : C:\Program Files (x86)\Java\jdk1.7.0_72

Error stacktrace:

java.lang.VerifyError at sun.instrument.InstrumentationImpl.redefineClasses0(Native Method) at sun.instrument.InstrumentationImpl.redefineClasses(InstrumentationImpl.java:170) at mockit.internal.startup.Startup.redefineMethods(Startup.java:236) at mockit.internal.startup.Startup.redefineMethods(Startup.java:230) at mockit.internal.mockups.MockClassSetup.applyClassModifications(MockClassSetup.java:140) at mockit.internal.mockups.MockClassSetup.redefineMethodsInClassHierarchy(MockClassSetup.java:93) at mockit.internal.mockups.MockClassSetup.redefineMethods(MockClassSetup.java:78) at mockit.MockUp.redefineMethods(MockUp.java:241) at mockit.MockUp.redefineClassOrImplementInterface(MockUp.java:223) at mockit.MockUp.(MockUp.java:132) at mockit.integration.junit4.internal.RunNotifierDecorator.(RunNotifierDecorator.java:21) at mockit.internal.startup.JMockitInitialization.loadInternalStartupMocksForJUnitIntegration(JMockitInitialization.java:43) at mockit.internal.startup.JMockitInitialization.initialize(JMockitInitialization.java:28) at mockit.internal.startup.Startup.applyStartupMocks(Startup.java:73) at mockit.internal.startup.Startup.reapplyStartupMocks(Startup.java:125) at mockit.internal.startup.Startup.getInstrumentation(Startup.java:186) at mockit.internal.startup.Startup.verifyInitialization(Startup.java:171) at mockit.internal.startup.Startup.instrumentation(Startup.java:130) at mockit.internal.startup.Startup.retransformClass(Startup.java:225) at mockit.internal.state.CachedClassfiles.getClassfile(CachedClassfiles.java:101) at mockit.internal.ClassFile.createReaderOrGetFromCache(ClassFile.java:61) at mockit.internal.classGeneration.ImplementationClass.generateClass(ImplementationClass.java:41) at mockit.internal.mockups.MockedImplementationClass.generateImplementationForPublicInterface(MockedImplementationClass.java:61) at mockit.internal.mockups.MockedImplementationClass.createImplementation(MockedImplementationClass.java:41) at mockit.internal.mockups.MockedImplementationClass.createImplementation(MockedImplementationClass.java:29) at mockit.MockUp.createInstanceOfMockedImplementationClass(MockUp.java:230) at mockit.MockUp.redefineClassOrImplementInterface(MockUp.java:214) at mockit.MockUp.(MockUp.java:132) at at.allianz.a3k.orbit.mock.OrbitMock$1.(OrbitMock.java:98) at at.allianz.a3k.orbit.mock.OrbitMock.(OrbitMock.java:98) at at.allianz.gfb.core.vertrag.vertrag.logic.BoVertragTest.initialize(BoVertragTest.java:49) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229) at org.junit.runners.ParentRunner.run(ParentRunner.java:309) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390) at org.eclipse.pde.internal.junit.runtime.RemotePluginTestRunner.main(RemotePluginTestRunner.java:62) at org.eclipse.pde.internal.junit.runtime.CoreTestApplication.run(CoreTestApplication.java:23) at org.eclipse.pde.internal.junit.runtime.NonUIThreadTestApplication.runApp(NonUIThreadTestApplication.java:56) at org.eclipse.pde.internal.junit.runtime.NonUIThreadTestApplication.start(NonUIThreadTestApplication.java:48) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:354) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:181) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:636) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591) at org.eclipse.equinox.launcher.Main.run(Main.java:1450) at org.eclipse.equinox.launcher.Main.main(Main.java:1426)

Kindly do needful and provide the suggestions. Is it solved? Yes then please give link to install patch or Jmockit version.

Thanks Mayur Mewada

rliesenfeld commented 9 years ago

Please visit jmockit.org; if the problem persists, show an example test which fails.

mkmewada commented 9 years ago

I have visited the website you mentioned but not able to find solution. Kindly guide . which jmockit version its fixed and which java version is required to use this.

rliesenfeld commented 9 years ago

Any recent version (say, 1.8 or newer) should work fine, in any version of Java starting from Java 6.