java.lang.ExceptionInInitializerError

GitHub | jwtodd | 3 months ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    GitHub comment 746#277547413

    GitHub | 3 months ago | jwtodd
    java.lang.ExceptionInInitializerError
  2. 0

    PowerMock exceptions... How to solve them?

    Stack Overflow | 1 week ago | m.mjn202
    java.lang.ExceptionInInitializerError
  3. 0

    Android instrumentation testing with mockito

    Stack Overflow | 7 months ago | Steven
    java.lang.NullPointerException
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    GitHub comment 3503#155027058

    GitHub | 1 year ago | akarnokd
    java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Class java.lang.Object.getClass()' on a null object reference
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.ClassCastException

    Cannot cast org.powermock.api.mockito.internal.mockmaker.PowerMockMaker to org.mockito.plugins.MockMaker

    at java.lang.Class.cast()
  2. Java RT
    Class.cast
    1. java.lang.Class.cast(Class.java:3369)
    1 frame
  3. Mockito
    InjectingAnnotationEngine.injectMocks
    1. org.mockito.internal.configuration.plugins.PluginLoader.loadImpl(PluginLoader.java:82)
    2. org.mockito.internal.configuration.plugins.PluginLoader.loadPlugin(PluginLoader.java:40)
    3. org.mockito.internal.configuration.plugins.PluginRegistry.<init>(PluginRegistry.java:18)
    4. org.mockito.internal.configuration.plugins.Plugins.<clinit>(Plugins.java:17)
    5. org.mockito.internal.util.MockUtil.<clinit>(MockUtil.java:24)
    6. org.mockito.internal.configuration.injection.scanner.MockScanner.isMockOrSpy(MockScanner.java:83)
    7. org.mockito.internal.configuration.injection.scanner.MockScanner.preparedMock(MockScanner.java:71)
    8. org.mockito.internal.configuration.injection.scanner.MockScanner.scan(MockScanner.java:59)
    9. org.mockito.internal.configuration.injection.scanner.MockScanner.addPreparedMocks(MockScanner.java:45)
    10. org.mockito.internal.configuration.InjectingAnnotationEngine.injectMocks(InjectingAnnotationEngine.java:82)
    10 frames
  4. powermock-api-mockito
    AnnotationEnabler.beforeTestMethod
    1. org.powermock.api.mockito.internal.configuration.PowerMockitoInjectingAnnotationEngine.process(PowerMockitoInjectingAnnotationEngine.java:36)
    2. org.powermock.api.extension.listener.AnnotationEnabler.injectSpiesAndInjectToSetters(AnnotationEnabler.java:61)
    3. org.powermock.api.extension.listener.AnnotationEnabler.beforeTestMethod(AnnotationEnabler.java:56)
    3 frames
  5. 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:497)
    4 frames
  6. powermock-reflect
    Whitebox.invokeMethod
    1. org.powermock.reflect.internal.WhiteboxImpl.performMethodInvocation(WhiteboxImpl.java:1846)
    2. org.powermock.reflect.internal.WhiteboxImpl.invokeMethod(WhiteboxImpl.java:700)
    3. org.powermock.reflect.Whitebox.invokeMethod(Whitebox.java:415)
    3 frames
  7. Powermock
    PowerMockTestNGMethodHandler.invoke
    1. org.powermock.modules.testng.internal.PowerMockTestNGMethodHandler.injectMocksUsingAnnotationEnabler(PowerMockTestNGMethodHandler.java:76)
    2. org.powermock.modules.testng.internal.PowerMockTestNGMethodHandler.invoke(PowerMockTestNGMethodHandler.java:48)
    2 frames
  8. powermock
    MyFinalTest_$$_jvst217_0.myFinal
    1. powermock.MyFinalTest_$$_jvst217_0.myFinal(MyFinalTest_$$_jvst217_0.java)
    1 frame
  9. 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:497)
    4 frames
  10. TestNG
    RemoteTestNGStarter.main
    1. org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:86)
    2. org.testng.internal.Invoker.invokeMethod(Invoker.java:643)
    3. org.testng.internal.Invoker.invokeTestMethod(Invoker.java:820)
    4. org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1128)
    5. org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:129)
    6. org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:112)
    7. org.testng.TestRunner.privateRun(TestRunner.java:782)
    8. org.testng.TestRunner.run(TestRunner.java:632)
    9. org.testng.SuiteRunner.runTest(SuiteRunner.java:366)
    10. org.testng.SuiteRunner.runSequentially(SuiteRunner.java:361)
    11. org.testng.SuiteRunner.privateRun(SuiteRunner.java:319)
    12. org.testng.SuiteRunner.run(SuiteRunner.java:268)
    13. org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
    14. org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
    15. org.testng.TestNG.runSuitesSequentially(TestNG.java:1244)
    16. org.testng.TestNG.runSuitesLocally(TestNG.java:1169)
    17. org.testng.TestNG.run(TestNG.java:1064)
    18. org.testng.IDEARemoteTestNG.run(IDEARemoteTestNG.java:72)
    19. org.testng.RemoteTestNGStarter.main(RemoteTestNGStarter.java:127)
    19 frames