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

GitHub | avasa004 | 6 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

    Powermock 1.6.3 with Javassist 3.18.2-GA produces a NoSuchMethodError

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

    Powermock 1.6.3 with Javassist 3.18.2-GA produces a NoSuchMethodError

    Google Groups | 6 months ago | Jayanth Avasarala
    java.lang.NoSuchMethodError: javassist.CtMethod.hasAnnotation(Ljava/lang/Class;)Z
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    NoSuchMethodError

    GitHub | 6 months ago | avasa004
    java.lang.NoSuchMethodError: javassist.CtMethod.hasAnnotation(Ljava/lang/Class;)Z
  5. 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

    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:185)
      2. org.powermock.core.transformers.impl.TestClassTransformer.transform(TestClassTransformer.java:198)
      3. org.powermock.core.classloader.MockClassLoader.loadMockClass(MockClassLoader.java:250)
      4. org.powermock.core.classloader.MockClassLoader.loadModifiedClass(MockClassLoader.java:179)
      5. org.powermock.core.classloader.DeferSupportingClassLoader.loadClass(DeferSupportingClassLoader.java:70)
      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:348)
      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:423)
      4 frames
    9. JUnit
      ClassRequest.getRunner
      1. org.junit.internal.builders.AnnotatedBuilder.buildRunner(AnnotatedBuilder.java:29)
      2. org.junit.internal.builders.AnnotatedBuilder.runnerForClass(AnnotatedBuilder.java:21)
      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:26)
      6 frames
    10. JUnit4 Provider
      JUnit4Provider.invoke
      1. org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:51)
      2. org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:123)
      3. org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:104)
      3 frames
    11. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      4. java.lang.reflect.Method.invoke(Method.java:498)
      4 frames
    12. SureFire
      ForkedBooter.main
      1. org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:164)
      2. org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:110)
      3. org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:175)
      4. org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcessWhenForked(SurefireStarter.java:107)
      5. org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:68)
      5 frames