java.lang.IllegalStateException

Failed to transform class with name com.amazon.awsaccounts.notificationlistenerservice.proxies.MyClassTest. Reason: sorry, cannot edit NEW followed by no DUP

Samebug tips0

There are no available Samebug tips for this exception. If you know how to solve this issue, help other users by writing a short tip.

Don't give up yet. Paste your full stack trace to get a solution.

Solutions on the web21841

  • Failed to transform class with name com.amazon.awsaccounts.notificationlistenerservice.proxies.MyClassTest. Reason: sorry, cannot edit NEW followed by no DUP
  • Failed to transform class with name [CLASS NAME]. Reason: javax.servlet.ServletContext
  • Failed to transform class with name com.epiqsystems.jdx.protocols.ftpserver.ServerSession. Reason: javassist.bytecode.StringInfo cannot be cast to javassist.bytecode.ClassInfo
  • Stack trace

    • java.lang.IllegalStateException: Failed to transform class with name com.amazon.awsaccounts.notificationlistenerservice.proxies.MyClassTest. Reason: sorry, cannot edit NEW followed by no DUP at org.powermock.core.classloader.MockClassLoader.loadMockClass(MockClassLoader.java:247) at org.powermock.core.classloader.MockClassLoader.loadModifiedClass(MockClassLoader.java:177) at org.powermock.core.classloader.DeferSupportingClassLoader.loadClass(DeferSupportingClassLoader.java:68) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:348) at org.powermock.modules.junit4.common.internal.impl.JUnit4TestSuiteChunkerImpl.createDelegatorFromClassloader(JUnit4TestSuiteChunkerImpl.java:138) at org.powermock.modules.junit4.common.internal.impl.JUnit4TestSuiteChunkerImpl.createDelegatorFromClassloader(JUnit4TestSuiteChunkerImpl.java:39) at org.powermock.tests.utils.impl.AbstractTestSuiteChunkerImpl.createTestDelegators(AbstractTestSuiteChunkerImpl.java:218) 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:33) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at org.junit.internal.builders.AnnotatedBuilder.buildRunner(AnnotatedBuilder.java:31) at org.junit.internal.builders.AnnotatedBuilder.runnerForClass(AnnotatedBuilder.java:24) at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:57) at org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:29) at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:57) at org.junit.internal.requests.ClassRequest.getRunner(ClassRequest.java:24) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.createUnfilteredTest(JUnit4TestLoader.java:84) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.createTest(JUnit4TestLoader.java:70) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.loadTests(JUnit4TestLoader.java:43) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:444) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:678) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192) Caused by: javassist.CannotCompileException: sorry, cannot edit NEW followed by no DUP at javassist.expr.NewExpr.canReplace(NewExpr.java:150) at javassist.expr.NewExpr.replace(NewExpr.java:170) at org.powermock.core.transformers.impl.MainMockTransformer$PowerMockExpressionEditor.edit(MainMockTransformer.java:427) at javassist.expr.ExprEditor.loopBody(ExprEditor.java:198) at javassist.expr.ExprEditor.doit(ExprEditor.java:90) at javassist.CtClassType.instrument(CtClassType.java:1224) at org.powermock.core.transformers.impl.MainMockTransformer.transform(MainMockTransformer.java:74) at org.powermock.core.classloader.MockClassLoader.loadMockClass(MockClassLoader.java:243) ... 28 more

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    You’re the first here who have seen this exception.