java.lang.NoClassDefFoundError: Could not initialize class org.mockito.internal.util.MockUtil

GitHub | dolendupes | 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

    GitHub comment 638#247982345

    GitHub | 6 months ago | dolendupes
    java.lang.NoClassDefFoundError: Could not initialize class org.mockito.internal.util.MockUtil
  2. 0

    GitHub comment 638#247938900

    GitHub | 6 months ago | dolendupes
    java.lang.NoClassDefFoundError: Could not initialize class org.mockito.internal.util.MockUtil

    Root Cause Analysis

    1. java.lang.NoClassDefFoundError

      Could not initialize class org.mockito.internal.util.MockUtil

      at org.mockito.internal.configuration.injection.scanner.MockScanner.isMockOrSpy()
    2. Mockito
      SilentJUnitRunner$1.withBefores
      1. org.mockito.internal.configuration.injection.scanner.MockScanner.isMockOrSpy(MockScanner.java:83)
      2. org.mockito.internal.configuration.injection.scanner.MockScanner.preparedMock(MockScanner.java:71)
      3. org.mockito.internal.configuration.injection.scanner.MockScanner.scan(MockScanner.java:59)
      4. org.mockito.internal.configuration.injection.scanner.MockScanner.addPreparedMocks(MockScanner.java:45)
      5. org.mockito.internal.configuration.InjectingAnnotationEngine.injectMocks(InjectingAnnotationEngine.java:84)
      6. org.mockito.internal.configuration.InjectingAnnotationEngine.processInjectMocks(InjectingAnnotationEngine.java:50)
      7. org.mockito.internal.configuration.InjectingAnnotationEngine.process(InjectingAnnotationEngine.java:44)
      8. org.mockito.MockitoAnnotations.initMocks(MockitoAnnotations.java:67)
      9. org.mockito.internal.runners.SilentJUnitRunner$1.withBefores(SilentJUnitRunner.java:29)
      9 frames
    3. JUnit
      ParentRunner.run
      1. org.junit.runners.BlockJUnit4ClassRunner.methodBlock(BlockJUnit4ClassRunner.java:276)
      2. org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
      3. org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
      4. org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
      5. org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
      6. org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
      7. org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
      8. org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
      9. org.junit.runners.ParentRunner.run(ParentRunner.java:363)
      9 frames
    4. Mockito
      MockitoJUnitRunner.run
      1. org.mockito.internal.runners.SilentJUnitRunner.run(SilentJUnitRunner.java:39)
      2. org.mockito.internal.runners.StrictRunner.run(StrictRunner.java:35)
      3. org.mockito.runners.MockitoJUnitRunner.run(MockitoJUnitRunner.java:104)
      3 frames
    5. JUnit4 Provider
      JUnit4Provider.invoke
      1. org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:252)
      2. org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141)
      3. org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112)
      3 frames
    6. 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
    7. SureFire
      ForkedBooter.main
      1. org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
      2. org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
      3. org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
      4. org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)
      5. org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)
      5 frames