java.lang.NoSuchMethodError: javassist.CtMethod.hasAnnotation(Ljava/lang/Class;)Z

Google Groups | Federico Tomassetti | 2 years ago
  1. 0

    Getting java.lang.NoSuchMethodError: javassist.CtMethod.hasAnnotation(Ljava/lang/Class;)Z

    Google Groups | 2 years ago | Federico Tomassetti
    java.lang.NoSuchMethodError: javassist.CtMethod.hasAnnotation(Ljava/lang/Class;)Z
  2. 0

    Maven builds are working, but junit is throwing a NoSuchMethodError

    Stack Overflow | 1 year ago | Lencalot
    java.lang.NoSuchMethodError: javassist.CtMethod.hasAnnotation(Ljava/lang/Class;)Z
  3. 0

    NoSuchMethodError

    GitHub | 3 months ago | avasa004
    java.lang.NoSuchMethodError: javassist.CtMethod.hasAnnotation(Ljava/lang/Class;)Z
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Powermock 1.6.3 with Javassist 3.18.2-GA produces a NoSuchMethodError

    GitHub | 3 months ago | avasa004
    java.lang.NoSuchMethodError: javassist.CtMethod.hasAnnotation(Ljava/lang/Class;)Z
  6. 0

    Powermock 1.6.3 with Javassist 3.18.2-GA produces a NoSuchMethodError

    Stack Overflow | 3 months ago | Jayanth Avasarala
    java.lang.NoSuchMethodError: javassist.CtMethod.hasAnnotation(Ljava/lang/Class;)Z

    7 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.lang.NoSuchMethodError

      javassist.CtMethod.hasAnnotation(Ljava/lang/Class;)Z

      at org.powermock.core.transformers.impl.TestClassTransformer.removeTestAnnotationsForTestMethodsThatRunOnOtherClassLoader()
    2. powermock-core
      DeferSupportingClassLoader.loadClass
      1. org.powermock.core.transformers.impl.TestClassTransformer.removeTestAnnotationsForTestMethodsThatRunOnOtherClassLoader(TestClassTransformer.java:141)
      2. org.powermock.core.transformers.impl.TestClassTransformer.transform(TestClassTransformer.java:154)
      3. org.powermock.core.classloader.MockClassLoader.loadMockClass(MockClassLoader.java:251)
      4. org.powermock.core.classloader.MockClassLoader.loadModifiedClass(MockClassLoader.java:180)
      5. org.powermock.core.classloader.DeferSupportingClassLoader.loadClass(DeferSupportingClassLoader.java:68)
      5 frames
    3. 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:344)
      3 frames
    4. 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
    5. powermock-core
      AbstractTestSuiteChunkerImpl.createTestDelegators
      1. org.powermock.tests.utils.impl.AbstractTestSuiteChunkerImpl.createTestDelegators(AbstractTestSuiteChunkerImpl.java:244)
      1 frame
    6. 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
    7. powermock-module-junit4
      PowerMockRunner.<init>
      1. org.powermock.modules.junit4.PowerMockRunner.<init>(PowerMockRunner.java:34)
      1 frame
    8. 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
    9. 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
    10. IntelliJ junit4 module
      JUnit4IdeaTestRunner.startRunnerWithArgs
      1. com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:41)
      1 frame
    11. IDEA
      JUnitStarter.main
      1. com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:211)
      2. com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:67)
      2 frames
    12. Java RT
      NativeMethodAccessorImpl.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      2 frames
    13. IDEA
      AppMain.main
      1. com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)
      1 frame