java.lang.ExceptionInInitializerError

This exception has no message.


Solutions on the web8362

Solution icon of terracotta
This exception has no message.

Solution icon of terracotta
via Terracotta by hashcode, 1 year ago
This exception has no message.

Solution icon of terracotta
This exception has no message.

Solution icon of terracotta
via Terracotta by efremov, 1 year ago
This exception has no message.

Solution icon of terracotta
This exception has no message.

Solution icon of terracotta
via Terracotta by babuvaha, 1 year ago
This exception has no message.

Solution icon of terracotta
via Terracotta by rustum, 1 year ago
This exception has no message.

Solution icon of terracotta
via Terracotta by acs, 1 year ago
This exception has no message.

Solution icon of terracotta
via Terracotta by vinnie, 1 year ago
This exception has no message.

Solution icon of terracotta
via Terracotta by agp, 1 year ago
This exception has no message.

Stack trace

  • java.lang.ExceptionInInitializerError at org.mockito.internal.util.MockUtil.<clinit>(MockUtil.java:24) at org.mockito.internal.configuration.injection.scanner.MockScanner.isMockOrSpy(MockScanner.java:83) at org.mockito.internal.configuration.injection.scanner.MockScanner.preparedMock(MockScanner.java:71) at org.mockito.internal.configuration.injection.scanner.MockScanner.scan(MockScanner.java:59) at org.mockito.internal.configuration.injection.scanner.MockScanner.addPreparedMocks(MockScanner.java:45) at org.mockito.internal.configuration.InjectingAnnotationEngine.injectMocks(InjectingAnnotationEngine.java:82) at org.powermock.api.mockito.internal.configuration.PowerMockitoInjectingAnnotationEngine.process(PowerMockitoInjectingAnnotationEngine.java:36) at org.powermock.api.extension.listener.AnnotationEnabler.injectSpiesAndInjectToSetters(AnnotationEnabler.java:61) at org.powermock.api.extension.listener.AnnotationEnabler.beforeTestMethod(AnnotationEnabler.java:56) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at org.powermock.reflect.internal.WhiteboxImpl.performMethodInvocation(WhiteboxImpl.java:1846) at org.powermock.reflect.internal.WhiteboxImpl.invokeMethod(WhiteboxImpl.java:700) at org.powermock.reflect.Whitebox.invokeMethod(Whitebox.java:415) at org.powermock.modules.testng.internal.PowerMockTestNGMethodHandler.injectMocksUsingAnnotationEnabler(PowerMockTestNGMethodHandler.java:76) at org.powermock.modules.testng.internal.PowerMockTestNGMethodHandler.invoke(PowerMockTestNGMethodHandler.java:48) at powermock.MyFinalTest_$$_jvst217_0.myFinal(MyFinalTest_$$_jvst217_0.java) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:86) at org.testng.internal.Invoker.invokeMethod(Invoker.java:643) at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:820) at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1128) at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:129) at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:112) at org.testng.TestRunner.privateRun(TestRunner.java:782) at org.testng.TestRunner.run(TestRunner.java:632) at org.testng.SuiteRunner.runTest(SuiteRunner.java:366) at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:361) at org.testng.SuiteRunner.privateRun(SuiteRunner.java:319) at org.testng.SuiteRunner.run(SuiteRunner.java:268) at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52) at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86) at org.testng.TestNG.runSuitesSequentially(TestNG.java:1244) at org.testng.TestNG.runSuitesLocally(TestNG.java:1169) at org.testng.TestNG.run(TestNG.java:1064) at org.testng.IDEARemoteTestNG.run(IDEARemoteTestNG.java:72) at org.testng.RemoteTestNGStarter.main(RemoteTestNGStarter.java:127) Caused by: java.lang.IllegalStateException: Failed to load interface org.mockito.plugins.MockMaker implementation declared in sun.misc.CompoundEnumeration@12aba8be at org.mockito.internal.configuration.plugins.PluginLoader.loadImpl(PluginLoader.java:86) at org.mockito.internal.configuration.plugins.PluginLoader.loadPlugin(PluginLoader.java:40) at org.mockito.internal.configuration.plugins.PluginRegistry.<init>(PluginRegistry.java:18) at org.mockito.internal.configuration.plugins.Plugins.<clinit>(Plugins.java:17) ... 42 more Caused by: java.lang.ClassCastException: Cannot cast org.powermock.api.mockito.internal.mockmaker.PowerMockMaker to org.mockito.plugins.MockMaker at java.lang.Class.cast(Class.java:3369) at org.mockito.internal.configuration.plugins.PluginLoader.loadImpl(PluginLoader.java:82) ... 45 more

Write tip

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

Users with the same issue

Once, 1 month ago
2 times, 2 months ago
7 times, 4 months ago
8 times, 5 months ago
64 times, 9 months ago
24 more bugmates