java.lang.IllegalStateException

Failed to load ApplicationContext

Samebug tips0

There are no available Samebug tips for this exception. If you know how to solve this issue, help other users by writing a short tip.

Don't give up yet. Paste your full stack trace to get a solution.

Solutions on the web12631

  • via Apereo Issues by Dan McCallum, 1 year ago
    Failed to load ApplicationContext
  • via SpringSource Issue Tracker by Denis Mitin, 1 year ago
    Failed to load ApplicationContext
  • via Spring JIRA by Vivek Kumar Gupta, 1 year ago
    Failed to load ApplicationContext
  • Stack trace

    • java.lang.IllegalStateException: Failed to load ApplicationContext at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:124)[spring-test-4.2.7.RELEASE.jar:4.2.7.RELEASE] at org.springframework.test.context.support.DefaultTestContext.getApplicationContext(DefaultTestContext.java:83)[spring-test-4.2.7.RELEASE.jar:4.2.7.RELEASE] at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.injectDependencies(DependencyInjectionTestExecutionListener.java:117)[spring-test-4.2.7.RELEASE.jar:4.2.7.RELEASE] at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.prepareTestInstance(DependencyInjectionTestExecutionListener.java:83)[spring-test-4.2.7.RELEASE.jar:4.2.7.RELEASE] at org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:228)[spring-test-4.2.7.RELEASE.jar:4.2.7.RELEASE] at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.createTest(SpringJUnit4ClassRunner.java:230)[spring-test-4.2.7.RELEASE.jar:4.2.7.RELEASE] at org.springframework.test.context.junit4.SpringJUnit4ClassRunner$1.runReflectiveCall(SpringJUnit4ClassRunner.java:289)[spring-test-4.2.7.RELEASE.jar:4.2.7.RELEASE] at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)[junit-4.12.jar:4.12] at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.methodBlock(SpringJUnit4ClassRunner.java:291)[spring-test-4.2.7.RELEASE.jar:4.2.7.RELEASE] at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:249)[spring-test-4.2.7.RELEASE.jar:4.2.7.RELEASE] at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:89)[spring-test-4.2.7.RELEASE.jar:4.2.7.RELEASE] at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)[junit-4.12.jar:4.12] at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)[junit-4.12.jar:4.12] at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)[junit-4.12.jar:4.12] at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)[junit-4.12.jar:4.12] at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)[junit-4.12.jar:4.12] at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)[spring-test-4.2.7.RELEASE.jar:4.2.7.RELEASE] at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70)[spring-test-4.2.7.RELEASE.jar:4.2.7.RELEASE] at org.junit.runners.ParentRunner.run(ParentRunner.java:363)[junit-4.12.jar:4.12] at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:193)[spring-test-4.2.7.RELEASE.jar:4.2.7.RELEASE] at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecuter.runTestClass(JUnitTestClassExecuter.java:114)[gradle-testing-jvm-2.14.1.jar:2.14.1] at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecuter.execute(JUnitTestClassExecuter.java:57)[gradle-testing-jvm-2.14.1.jar:2.14.1] at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassProcessor.processTestClass(JUnitTestClassProcessor.java:66)[gradle-testing-jvm-2.14.1.jar:2.14.1] at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.processTestClass(SuiteTestClassProcessor.java:51)[gradle-testing-base-2.14.1.jar:2.14.1] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[na:1.8.0_101] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)[na:1.8.0_101] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[na:1.8.0_101] at java.lang.reflect.Method.invoke(Method.java:498)[na:1.8.0_101] at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35)[gradle-messaging-2.14.1.jar:2.14.1] at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)[gradle-messaging-2.14.1.jar:2.14.1] at org.gradle.internal.dispatch.ContextClassLoaderDispatch.dispatch(ContextClassLoaderDispatch.java:32)[gradle-messaging-2.14.1.jar:2.14.1] at org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:93)[gradle-messaging-2.14.1.jar:2.14.1] at com.sun.proxy.$Proxy2.processTestClass(Unknown Source)[na:na] at org.gradle.api.internal.tasks.testing.worker.TestWorker.processTestClass(TestWorker.java:109)[gradle-testing-base-2.14.1.jar:2.14.1] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[na:1.8.0_101] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)[na:1.8.0_101] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[na:1.8.0_101] at java.lang.reflect.Method.invoke(Method.java:498)[na:1.8.0_101] at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35)[gradle-messaging-2.14.1.jar:2.14.1] at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)[gradle-messaging-2.14.1.jar:2.14.1] at org.gradle.internal.remote.internal.hub.MessageHub$Handler.run(MessageHub.java:377)[gradle-messaging-2.14.1.jar:2.14.1] at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:54)[gradle-base-services-2.14.1.jar:2.14.1] at org.gradle.internal.concurrent.StoppableExecutorImpl$1.run(StoppableExecutorImpl.java:40)[gradle-base-services-2.14.1.jar:2.14.1] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[na:1.8.0_101] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[na:1.8.0_101] at java.lang.Thread.run(Thread.java:745)[na:1.8.0_101] Caused by: java.lang.RuntimeException: Command exited with error code: '-1' and output: '' at com.wix.mysql.distribution.setup.ProcessRunner.resolveException(ProcessRunner.java:44)[wix-embedded-mysql-2.0.1.jar:na] at com.wix.mysql.distribution.setup.ProcessRunner.run(ProcessRunner.java:29)[wix-embedded-mysql-2.0.1.jar:na] at com.wix.mysql.distribution.setup.Mysql57Initializer.apply(Mysql57Initializer.java:32)[wix-embedded-mysql-2.0.1.jar:na] at com.wix.mysql.distribution.Setup.apply(Setup.java:25)[wix-embedded-mysql-2.0.1.jar:na] at com.wix.mysql.MysqldExecutable.start(MysqldExecutable.java:42)[wix-embedded-mysql-2.0.1.jar:na] at com.wix.mysql.MysqldExecutable.start(MysqldExecutable.java:21)[wix-embedded-mysql-2.0.1.jar:na] at de.flapdoodle.embed.process.runtime.Executable.start(Executable.java:101)[de.flapdoodle.embed.process-1.50.1.jar:na] at com.wix.mysql.EmbeddedMysql.<init>(EmbeddedMysql.java:45)[wix-embedded-mysql-2.0.1.jar:na] at com.wix.mysql.EmbeddedMysql$Builder.start(EmbeddedMysql.java:131)[wix-embedded-mysql-2.0.1.jar:na]

    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

    You’re the first here who have seen this exception.