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

Stack Overflow | Kode | 3 months ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    Junit test with powermock gives initialization error via eclipse but runs through command line

    Stack Overflow | 3 years ago | user3642013
    java.lang.IllegalStateException: Failed to transform class with name com.paychex.mobile.remote.ReportingMobileRemoteTest. Reason: Invalid index
  2. 0

    PowerMock: invalid constant type: 18

    Stack Overflow | 2 years ago | R. Kuehteubl
    java.lang.IllegalStateException: Failed to transform class with name test.ContentPanelTest. Reason: java.io.IOException: invalid constant type: 18
  3. 0

    The initializationError test in the WebModuleUtilTest class throws an exception when running under Java 8. <error message="Failed to transform class with name org.openmrs.module.web.WebModuleUtilTest. Reason: java.io.IOException: invalid constant type: 18" type="java.lang.IllegalStateException">java.lang.IllegalStateException: Failed to transform class with name org.openmrs.module.web.WebModuleUtilTest. Reason: java.io.IOException: invalid constant type: 18 at org.powermock.core.classloader.MockClassLoader.loadMockClass(MockClassLoader.java:219) at org.powermock.core.classloader.MockClassLoader.loadModifiedClass(MockClassLoader.java:147) at org.powermock.core.classloader.DeferSupportingClassLoader.loadClass(DeferSupportingClassLoader.java:67) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:340) at org.powermock.modules.junit4.common.internal.impl.JUnit4TestSuiteChunkerImpl.createDelegatorFromClassloader(JUnit4TestSuiteChunkerImpl.java:132) 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.&lt;init&gt;(JUnit4TestSuiteChunkerImpl.java:59) at org.powermock.modules.junit4.common.internal.impl.AbstractCommonPowerMockRunner.&lt;init&gt;(AbstractCommonPowerMockRunner.java:32) at org.powermock.modules.junit4.PowerMockRunner.&lt;init&gt;(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:408) at org.junit.internal.builders.AnnotatedBuilder.buildRunner(AnnotatedBuilder.java:29) at org.junit.internal.builders.AnnotatedBuilder.runnerForClass(AnnotatedBuilder.java:21) at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59) at org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:26) at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59) at org.junit.internal.requests.ClassRequest.getRunner(ClassRequest.java:26) at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:51) at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:115) at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:102) at org.apache.maven.surefire.Surefire.run(Surefire.java:180) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:350) at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1021) Caused by: java.lang.RuntimeException: java.io.IOException: invalid constant type: 18 at javassist.CtClassType.getClassFile2(CtClassType.java:203) at javassist.CtClassType.subtypeOf(CtClassType.java:303) at javassist.bytecode.stackmap.TypeData$TypeName.update(TypeData.java:274) at javassist.bytecode.stackmap.TypeData$TypeName.setType(TypeData.java:203) at javassist.bytecode.stackmap.TypeData.setType(TypeData.java:46) at javassist.bytecode.stackmap.Tracer.checkParamTypes(Tracer.java:913) at javassist.bytecode.stackmap.Tracer.doInvokeMethod(Tracer.java:818) at javassist.bytecode.stackmap.Tracer.doOpcode148_201(Tracer.java:615) at javassist.bytecode.stackmap.Tracer.doOpcode(Tracer.java:101) at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:182) at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:192) at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:192) at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:192) at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:192) at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:192) at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:192) at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:192) at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:192) at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:192) at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:192) at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:192) at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:192) at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:192) at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:192) at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:192) at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:192) at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:192) at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:192) at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:192) at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:192) at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:192) at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:192) at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:192) at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:192) at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:192) at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:192) at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:192) at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:192) at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:192) at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:192) at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:192) at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:192) at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:192) at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:192) at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:192) at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:141) at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:96) at javassist.bytecode.MethodInfo.rebuildStackMap(MethodInfo.java:416) at javassist.bytecode.MethodInfo.rebuildStackMapIf6(MethodInfo.java:398) at javassist.expr.ExprEditor.doit(ExprEditor.java:112) at javassist.CtClassType.instrument(CtClassType.java:1374) at org.powermock.core.transformers.impl.MainMockTransformer.transform(MainMockTransformer.java:75) at org.powermock.core.classloader.MockClassLoader.loadMockClass(MockClassLoader.java:215) ... 31 more Caused by: java.io.IOException: invalid constant type: 18 at javassist.bytecode.ConstPool.readOne(ConstPool.java:1090) at javassist.bytecode.ConstPool.read(ConstPool.java:1033) at javassist.bytecode.ConstPool.&lt;init&gt;(ConstPool.java:149) at javassist.bytecode.ClassFile.read(ClassFile.java:737) at javassist.bytecode.ClassFile.&lt;init&gt;(ClassFile.java:108) at javassist.CtClassType.getClassFile2(CtClassType.java:190) ... 83 more </error>

    JIRA | 2 years ago | Wesley Brown
    java.io.IOException: invalid constant type: 18" type="java.lang.IllegalStateException">java.lang.IllegalStateException: Failed to transform class with name org.openmrs.module.web.WebModuleUtilTest. Reason: java.io.IOException: invalid constant type: 18
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    PowerMockEasyMock: Failed to transform class with name

    Stack Overflow | 3 months ago | Kode
    java.lang.IllegalStateException: Failed to transform class with name com.amazon.awsaccounts.notificationlistenerservice.proxies.MyClassTest. Reason: sorry, cannot edit NEW followed by no DUP
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. javassist.CannotCompileException

    sorry, cannot edit NEW followed by no DUP

    at javassist.expr.NewExpr.canReplace()
  2. Javassist
    NewExpr.replace
    1. javassist.expr.NewExpr.canReplace(NewExpr.java:150)
    2. javassist.expr.NewExpr.replace(NewExpr.java:170)
    2 frames
  3. powermock-core
    MainMockTransformer$PowerMockExpressionEditor.edit
    1. org.powermock.core.transformers.impl.MainMockTransformer$PowerMockExpressionEditor.edit(MainMockTransformer.java:427)
    1 frame
  4. Javassist
    CtClassType.instrument
    1. javassist.expr.ExprEditor.loopBody(ExprEditor.java:198)
    2. javassist.expr.ExprEditor.doit(ExprEditor.java:90)
    3. javassist.CtClassType.instrument(CtClassType.java:1224)
    3 frames
  5. powermock-core
    DeferSupportingClassLoader.loadClass
    1. org.powermock.core.transformers.impl.MainMockTransformer.transform(MainMockTransformer.java:74)
    2. org.powermock.core.classloader.MockClassLoader.loadMockClass(MockClassLoader.java:243)
    3. org.powermock.core.classloader.MockClassLoader.loadModifiedClass(MockClassLoader.java:177)
    4. org.powermock.core.classloader.DeferSupportingClassLoader.loadClass(DeferSupportingClassLoader.java:68)
    4 frames
  6. Java RT
    Class.forName
    1. java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    2. java.lang.Class.forName0(Native Method)
    3. java.lang.Class.forName(Class.java:348)
    3 frames
  7. powermock-module-junit4-common
    JUnit4TestSuiteChunkerImpl.createDelegatorFromClassloader
    1. org.powermock.modules.junit4.common.internal.impl.JUnit4TestSuiteChunkerImpl.createDelegatorFromClassloader(JUnit4TestSuiteChunkerImpl.java:138)
    2. org.powermock.modules.junit4.common.internal.impl.JUnit4TestSuiteChunkerImpl.createDelegatorFromClassloader(JUnit4TestSuiteChunkerImpl.java:39)
    2 frames
  8. powermock-core
    AbstractTestSuiteChunkerImpl.createTestDelegators
    1. org.powermock.tests.utils.impl.AbstractTestSuiteChunkerImpl.createTestDelegators(AbstractTestSuiteChunkerImpl.java:218)
    1 frame
  9. powermock-module-junit4-common
    AbstractCommonPowerMockRunner.<init>
    1. org.powermock.modules.junit4.common.internal.impl.JUnit4TestSuiteChunkerImpl.<init>(JUnit4TestSuiteChunkerImpl.java:59)
    2. org.powermock.modules.junit4.common.internal.impl.AbstractCommonPowerMockRunner.<init>(AbstractCommonPowerMockRunner.java:32)
    2 frames
  10. powermock-module-junit4
    PowerMockRunner.<init>
    1. org.powermock.modules.junit4.PowerMockRunner.<init>(PowerMockRunner.java:33)
    1 frame
  11. Java RT
    Constructor.newInstance
    1. sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    2. sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    3. sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    4. java.lang.reflect.Constructor.newInstance(Constructor.java:423)
    4 frames
  12. JUnit
    ClassRequest.getRunner
    1. org.junit.internal.builders.AnnotatedBuilder.buildRunner(AnnotatedBuilder.java:31)
    2. org.junit.internal.builders.AnnotatedBuilder.runnerForClass(AnnotatedBuilder.java:24)
    3. org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:57)
    4. org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:29)
    5. org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:57)
    6. org.junit.internal.requests.ClassRequest.getRunner(ClassRequest.java:24)
    6 frames
  13. JUnit4 Runner
    JUnit4TestLoader.loadTests
    1. org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.createUnfilteredTest(JUnit4TestLoader.java:84)
    2. org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.createTest(JUnit4TestLoader.java:70)
    3. org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.loadTests(JUnit4TestLoader.java:43)
    3 frames
  14. JUnit3 Runner
    RemoteTestRunner.main
    1. org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:444)
    2. org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:678)
    3. org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
    4. org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
    4 frames