java.lang.IllegalStateException: Failed to transform class with name uk.ac.open.util.DebuggerTest. Reason: PowerMock internal error when modifying method.

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • java.lang.IllegalStateException: Failed to transform class with name uk.ac.open.util.DebuggerTest. Reason: PowerMock internal error when modifying method. at org.powermock.core.classloader.MockClassLoader.loadMockClass(MockClassLoader.java:207) at org.powermock.core.classloader.MockClassLoader.loadMockClass(MockClassLoader.java:207) at org.powermock.core.classloader.MockClassLoader.loadModifiedClass(MockClassLoader.java:145) at org.powermock.core.classloader.DeferSupportingClassLoader.loadClass(DeferSupportingClassLoader.java:65) at java.lang.ClassLoader.loadClass(ClassLoader.java:247) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:247) at org.powermock.modules.junit4.common.internal.impl.JUnit4TestSuiteChunkerImpl.createDelegatorFromClassloader(JUnit4TestSuiteChunkerImpl.java:133) at org.powermock.modules.junit4.common.internal.impl.JUnit4TestSuiteChunkerImpl.createDelegatorFromClassloader(JUnit4TestSuiteChunkerImpl.java:39) at org.powermock.tests.utils.impl.AbstractTestSuiteChunkerImpl.createTestDelegators(AbstractTestSuiteChunkerImpl.java:217) at org.powermock.modules.junit4.common.internal.impl.JUnit4TestSuiteChunkerImpl.<init>(JUnit4TestSuiteChunkerImpl.java:59) at org.powermock.modules.junit4.common.internal.impl.AbstractCommonPowerMockRunner.<init>(AbstractCommonPowerMockRunner.java:32) at org.powermock.modules.junit4.PowerMockRunner.<init>(PowerMockRunner.java:31) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) Caused by: java.lang.RuntimeException: PowerMock internal error when modifying method. at org.powermock.core.transformers.impl.MainMockTransformer$PowerMockExpressionEditor.edit(MainMockTransformer.java:304) at javassist.expr.ExprEditor.loopBody(ExprEditor.java:191) at javassist.expr.ExprEditor.doit(ExprEditor.java:90) at javassist.CtClassType.instrument(CtClassType.java:1289) at org.powermock.core.transformers.impl.MainMockTransformer.transform(MainMockTransformer.java:75) at org.powermock.core.classloader.MockClassLoader.loadMockClass(MockClassLoader.java:203) Caused by: javassist.NotFoundException: debug(..) is not found in uk.ac.open.util.Debugger at javassist.CtClassType.getMethod(CtClassType.java:1042) at javassist.expr.MethodCall.getMethod(MethodCall.java:114) at org.powermock.core.transformers.impl.MainMockTransformer$PowerMockExpressionEditor.edit(MainMockTransformer.java:283)

Users with the same issue

Unknown visitor1 times, last one,
Unknown visitor1 times, last one,