java.io.IOException: invalid constant type: 18" Solutions Tried: Googled threads for issue on with powermock - mockito & java-8 Excluded java assist from powermock and added java assist 3.19.0-GA Tried different versions of powermock (1.5.4, 1.6.2...) Below is the exception stack trace: java.lang.IllegalStateException: Failed to transform class with name com.StaticClass. Reason: java.io.IOException: invalid constant type: 18

Stack Overflow | Lucky1989 | 1 year ago
  1. 0

    Powermock - java.lang.IllegalStateException: Failed to transform class

    Stack Overflow | 1 year ago | Lucky1989
    java.io.IOException: invalid constant type: 18" Solutions Tried: Googled threads for issue on with powermock - mockito & java-8 Excluded java assist from powermock and added java assist 3.19.0-GA Tried different versions of powermock (1.5.4, 1.6.2...) Below is the exception stack trace: java.lang.IllegalStateException: Failed to transform class with name com.StaticClass. Reason: java.io.IOException: invalid constant type: 18
  2. 0

    [TRUNK-4595] Exception When Running ExtensionUtilTest under Java 8 - OpenMRS Issues

    openmrs.org | 1 year ago
    java.io.IOException: invalid constant type: 18" type="java.lang.IllegalStateException">java.lang.IllegalStateException: Failed to transform class with name org.openmrs.module.ModuleFactory. Reason: java.io.IOException: invalid constant type: 18
  3. 0

    Powermock

    xluat.com | 1 year ago
    java.lang.IllegalStateException: Failed to transform class with name com.StaticClass. Reason: java.io.IOException: invalid constant type: 18
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Powermock

    pr8x.com | 11 months ago
    java.lang.IllegalStateException: Failed to transform class with name com.StaticClass. Reason: java.io.IOException: invalid constant type: 18
  6. 0

    Maven Jenkins Build Failure

    Stack Overflow | 2 years ago | user3474468
    java.lang.IllegalStateException: Failed to transform class with name hudson.cli.CLI. Reason: java.io.IOException: invalid constant type: 15

    4 unregistered visitors
    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. java.io.IOException

      invalid constant type: 18

      at javassist.bytecode.ConstPool.readOne()
    2. Javassist
      NewExpr.replace
      1. javassist.bytecode.ConstPool.readOne(ConstPool.java:1090)
      2. javassist.bytecode.ConstPool.read(ConstPool.java:1033)
      3. javassist.bytecode.ConstPool.<init>(ConstPool.java:149)
      4. javassist.bytecode.ClassFile.read(ClassFile.java:737)
      5. javassist.bytecode.ClassFile.<init>(ClassFile.java:108)
      6. javassist.CtClassType.getClassFile2(CtClassType.java:190)
      7. javassist.CtClassType.getClassFile2(CtClassType.java:203)
      8. javassist.compiler.MemberResolver.lookupMethod(MemberResolver.java:110)
      9. javassist.compiler.MemberResolver.lookupMethod(MemberResolver.java:96)
      10. javassist.compiler.TypeChecker.atMethodCallCore(TypeChecker.java:704)
      11. javassist.expr.NewExpr$ProceedForNew.setReturnType(NewExpr.java:243)
      12. javassist.compiler.JvstTypeChecker.atCallExpr(JvstTypeChecker.java:146)
      13. javassist.compiler.ast.CallExpr.accept(CallExpr.java:45)
      14. javassist.compiler.TypeChecker.atVariableAssign(TypeChecker.java:248)
      15. javassist.compiler.TypeChecker.atAssignExpr(TypeChecker.java:217)
      16. javassist.compiler.ast.AssignExpr.accept(AssignExpr.java:38)
      17. javassist.compiler.CodeGen.doTypeCheck(CodeGen.java:241)
      18. javassist.compiler.CodeGen.atStmnt(CodeGen.java:329)
      19. javassist.compiler.ast.Stmnt.accept(Stmnt.java:49)
      20. javassist.compiler.CodeGen.atStmnt(CodeGen.java:350)
      21. javassist.compiler.ast.Stmnt.accept(Stmnt.java:49)
      22. javassist.compiler.CodeGen.atIfStmnt(CodeGen.java:404)
      23. javassist.compiler.CodeGen.atStmnt(CodeGen.java:354)
      24. javassist.compiler.ast.Stmnt.accept(Stmnt.java:49)
      25. javassist.compiler.Javac.compileStmnt(Javac.java:568)
      26. javassist.expr.NewExpr.replace(NewExpr.java:206)
      26 frames
    3. powermock-core
      MainMockTransformer$PowerMockExpressionEditor.edit
      1. org.powermock.core.transformers.impl.MainMockTransformer$PowerMockExpressionEditor.edit(MainMockTransformer.java:418)
      1 frame
    4. Javassist
      CtClassType.instrument
      1. javassist.expr.ExprEditor.loopBody(ExprEditor.java:211)
      2. javassist.expr.ExprEditor.doit(ExprEditor.java:90)
      3. javassist.CtClassType.instrument(CtClassType.java:1374)
      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:251)
      3. org.powermock.core.classloader.MockClassLoader.loadMockClass(MockClassLoader.java:266)
      4. org.powermock.core.classloader.MockClassLoader.loadModifiedClass(MockClassLoader.java:180)
      5. org.powermock.core.classloader.DeferSupportingClassLoader.loadClass(DeferSupportingClassLoader.java:68)
      5 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:340)
      3 frames
    7. powermock-module-junit4-common
      JUnit4TestSuiteChunkerImpl.createDelegatorFromClassloader
      1. org.powermock.modules.junit4.common.internal.impl.JUnit4TestSuiteChunkerImpl.createDelegatorFromClassloader(JUnit4TestSuiteChunkerImpl.java:145)
      2. org.powermock.modules.junit4.common.internal.impl.JUnit4TestSuiteChunkerImpl.createDelegatorFromClassloader(JUnit4TestSuiteChunkerImpl.java:40)
      2 frames
    8. powermock-core
      AbstractTestSuiteChunkerImpl.createTestDelegators
      1. org.powermock.tests.utils.impl.AbstractTestSuiteChunkerImpl.createTestDelegators(AbstractTestSuiteChunkerImpl.java:244)
      1 frame
    9. powermock-module-junit4-common
      AbstractCommonPowerMockRunner.<init>
      1. org.powermock.modules.junit4.common.internal.impl.JUnit4TestSuiteChunkerImpl.<init>(JUnit4TestSuiteChunkerImpl.java:61)
      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:34)
      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:408)
      4 frames
    12. JUnit
      ClassRequest.getRunner
      1. org.junit.internal.builders.AnnotatedBuilder.buildRunner(AnnotatedBuilder.java:104)
      2. org.junit.internal.builders.AnnotatedBuilder.runnerForClass(AnnotatedBuilder.java:86)
      3. org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59)
      4. org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:26)
      5. org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59)
      6. org.junit.internal.requests.ClassRequest.getRunner(ClassRequest.java:33)
      6 frames
    13. IDEA
      JUnitStarter.main
      1. com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:67)
      1 frame