java.lang.IllegalStateException: Failed to load ApplicationContext

Stack Overflow | commit | 4 months ago
  1. 0

    Maven build error on Junit test case for service layer

    Stack Overflow | 4 years ago | Jazz
    java.lang.IllegalStateException: Failed to load ApplicationContext
  2. Speed up your debug routine!

    Automated exception search integrated into your IDE

  3. 0

    spring-data: Not an managed type: class java.lang.Object

    Stack Overflow | 3 years ago | daydreamer
    java.lang.IllegalStateException: Failed to load ApplicationContext

  1. andyglick 4 times, last 2 months ago
  2. pradhul 1 times, last 9 months ago
13 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.IllegalStateException

    Failed to load ApplicationContext

    at org.springframework.test.context.CacheAwareContextLoaderDelegate.loadContext()
  2. Spring TestContext
    SpringJUnit4ClassRunner$1.runReflectiveCall
    1. org.springframework.test.context.CacheAwareContextLoaderDelegate.loadContext(CacheAwareContextLoaderDelegate.java:99)
    2. org.springframework.test.context.TestContext.getApplicationContext(TestContext.java:122)
    3. org.springframework.test.context.web.ServletTestExecutionListener.setUpRequestContextIfNecessary(ServletTestExecutionListener.java:105)
    4. org.springframework.test.context.web.ServletTestExecutionListener.prepareTestInstance(ServletTestExecutionListener.java:74)
    5. org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:312)
    6. org.springframework.test.context.junit4.SpringJUnit4ClassRunner.createTest(SpringJUnit4ClassRunner.java:211)
    7. org.springframework.test.context.junit4.SpringJUnit4ClassRunner$1.runReflectiveCall(SpringJUnit4ClassRunner.java:288)
    7 frames
  3. JUnit
    ReflectiveCallable.run
    1. org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
    1 frame
  4. Spring TestContext
    SpringJUnit4ClassRunner.runChild
    1. org.springframework.test.context.junit4.SpringJUnit4ClassRunner.methodBlock(SpringJUnit4ClassRunner.java:284)
    2. org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:231)
    3. org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:88)
    3 frames
  5. JUnit
    ParentRunner$2.evaluate
    1. org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
    2. org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
    3. org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
    4. org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
    5. org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
    5 frames
  6. Spring TestContext
    RunAfterTestClassCallbacks.evaluate
    1. org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
    2. org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:71)
    2 frames
  7. JUnit
    ParentRunner.run
    1. org.junit.runners.ParentRunner.run(ParentRunner.java:363)
    1 frame
  8. Spring TestContext
    SpringJUnit4ClassRunner.run
    1. org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:174)
    1 frame
  9. 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
  10. 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
  11. 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