java.lang.IllegalStateException: Failed to load ApplicationContext

Stack Overflow | N. Pradeep | 2 months ago
tip
Do you know that we can give you better hits? Get more relevant results from Samebug’s stack trace search.
  1. 0

    Integration test of persistent layer of Spring MVC and Hibernate

    Stack Overflow | 2 years ago | Mahin
    java.lang.IllegalStateException: Failed to load ApplicationContext
  2. 0

    Spring-Boot 1.4.0 Working with random ports Example

    Stack Overflow | 9 months ago | Merth92
    java.lang.IllegalStateException: Failed to load ApplicationContext
  3. 0

    Mocking class with @PostConstruct causes initialization failure

    Stack Overflow | 1 year ago | user657592
    java.lang.IllegalStateException: Failed to load ApplicationContext
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    @Autowired BeanCreationException with JUnit

    Stack Overflow | 11 months ago | The Apprentice
    java.lang.IllegalStateException: Failed to load ApplicationContext
  6. 0

    Camel - Users - Problems prettyPrinting JSON after camel 2.14.0 upgrade

    nabble.com | 1 year ago
    java.lang.IllegalStateException: Failed to load ApplicationContext at >> org.springframework.test.context.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:91) at >> org.springframework.test.context.DefaultTestContext.getApplicationContext(DefaultTestContext.java:74) at >> org.springframework.test.context.support.DependencyInjectionTestExecutionListener.injectDependencies(DependencyInjectionTestExecutionListener.java:116) at >> org.springframework.test.context.support.DependencyInjectionTestExecutionListener.prepareTestInstance(DependencyInjectionTestExecutionListener.java:82) at >> org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:212) at >> org.springframework.test.context.junit4.SpringJUnit4ClassRunner.createTest(SpringJUnit4ClassRunner.java:199) at >> org.springframework.test.context.junit4.SpringJUnit4ClassRunner$1.runReflectiveCall(SpringJUnit4ClassRunner.java:251) at >> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at >> org.springframework.test.context.junit4.SpringJUnit4ClassRunner.methodBlock(SpringJUnit4ClassRunner.java:253) at >> org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:216) at >> org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:82)
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.NullPointerException

    null

    at sun.reflect.NativeMethodAccessorImpl.invoke0()
  2. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    4. java.lang.reflect.Method.invoke(Unknown Source)
    4 frames
  3. Spring Framework
    JdbcTemplate$CloseSuppressingInvocationHandler.invoke
    1. org.springframework.jdbc.core.JdbcTemplate$CloseSuppressingInvocationHandler.invoke(JdbcTemplate.java:1490)
    1 frame
  4. com.sun.proxy
    $Proxy103.getMetaData
    1. com.sun.proxy.$Proxy103.getMetaData(Unknown Source)
    1 frame
  5. Spring Boot AutoConfigure
    EmbeddedDatabaseConnection$IsEmbedded.doInConnection
    1. org.springframework.boot.autoconfigure.jdbc.EmbeddedDatabaseConnection$IsEmbedded.doInConnection(EmbeddedDatabaseConnection.java:172)
    2. org.springframework.boot.autoconfigure.jdbc.EmbeddedDatabaseConnection$IsEmbedded.doInConnection(EmbeddedDatabaseConnection.java:167)
    2 frames
  6. Spring Framework
    JdbcTemplate.execute
    1. org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:353)
    1 frame
  7. Spring Boot AutoConfigure
    HibernateJpaAutoConfiguration$$EnhancerBySpringCGLIB$$3125e39e$$FastClassBySpringCGLIB$$2cf81419.invoke
    1. org.springframework.boot.autoconfigure.jdbc.EmbeddedDatabaseConnection.isEmbedded(EmbeddedDatabaseConnection.java:137)
    2. org.springframework.boot.autoconfigure.orm.jpa.JpaProperties$Hibernate.getDefaultDdlAuto(JpaProperties.java:224)
    3. org.springframework.boot.autoconfigure.orm.jpa.JpaProperties$Hibernate.getOrDeduceDdlAuto(JpaProperties.java:212)
    4. org.springframework.boot.autoconfigure.orm.jpa.JpaProperties$Hibernate.getAdditionalProperties(JpaProperties.java:188)
    5. org.springframework.boot.autoconfigure.orm.jpa.JpaProperties$Hibernate.access$000(JpaProperties.java:129)
    6. org.springframework.boot.autoconfigure.orm.jpa.JpaProperties.getHibernateProperties(JpaProperties.java:126)
    7. org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration.getVendorProperties(HibernateJpaAutoConfiguration.java:103)
    8. org.springframework.boot.autoconfigure.orm.jpa.JpaBaseConfiguration.entityManagerFactory(JpaBaseConfiguration.java:117)
    9. org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration$$EnhancerBySpringCGLIB$$3125e39e.CGLIB$entityManagerFactory$3(<generated>)
    10. org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration$$EnhancerBySpringCGLIB$$3125e39e$$FastClassBySpringCGLIB$$2cf81419.invoke(<generated>)
    10 frames
  8. Spring Core
    MethodProxy.invokeSuper
    1. org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)
    1 frame
  9. Spring Context
    ConfigurationClassEnhancer$BeanMethodInterceptor.intercept
    1. org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:356)
    1 frame
  10. Spring Boot AutoConfigure
    HibernateJpaAutoConfiguration$$EnhancerBySpringCGLIB$$3125e39e.entityManagerFactory
    1. org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration$$EnhancerBySpringCGLIB$$3125e39e.entityManagerFactory(<generated>)
    1 frame
  11. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    4. java.lang.reflect.Method.invoke(Unknown Source)
    4 frames
  12. Spring Beans
    AbstractBeanFactory.getBean
    1. org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:162)
    2. org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:588)
    3. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1134)
    4. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1028)
    5. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:513)
    6. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)
    7. org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
    8. org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
    9. org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
    10. org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
    10 frames
  13. Spring Context
    AbstractApplicationContext.refresh
    1. org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1081)
    2. org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:856)
    3. org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:542)
    3 frames
  14. Spring Boot
    SpringApplication.run
    1. org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122)
    2. org.springframework.boot.SpringApplication.refresh(SpringApplication.java:761)
    3. org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:371)
    4. org.springframework.boot.SpringApplication.run(SpringApplication.java:315)
    4 frames
  15. org.springframework.boot
    SpringBootContextLoader.loadContext
    1. org.springframework.boot.test.context.SpringBootContextLoader.loadContext(SpringBootContextLoader.java:111)
    1 frame
  16. org.springframework.test
    DefaultCacheAwareContextLoaderDelegate.loadContext
    1. org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContextInternal(DefaultCacheAwareContextLoaderDelegate.java:98)
    2. org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:116)
    2 frames
  17. Spring TestContext
    DefaultTestContext.getApplicationContext
    1. org.springframework.test.context.support.DefaultTestContext.getApplicationContext(DefaultTestContext.java:83)
    1 frame
  18. org.springframework.boot
    SpringBootDependencyInjectionTestExecutionListener.prepareTestInstance
    1. org.springframework.boot.test.autoconfigure.SpringBootDependencyInjectionTestExecutionListener.prepareTestInstance(SpringBootDependencyInjectionTestExecutionListener.java:47)
    1 frame
  19. Spring TestContext
    SpringJUnit4ClassRunner$1.runReflectiveCall
    1. org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:230)
    2. org.springframework.test.context.junit4.SpringJUnit4ClassRunner.createTest(SpringJUnit4ClassRunner.java:228)
    3. org.springframework.test.context.junit4.SpringJUnit4ClassRunner$1.runReflectiveCall(SpringJUnit4ClassRunner.java:287)
    3 frames
  20. JUnit
    ReflectiveCallable.run
    1. org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
    1 frame
  21. Spring TestContext
    SpringJUnit4ClassRunner.runChild
    1. org.springframework.test.context.junit4.SpringJUnit4ClassRunner.methodBlock(SpringJUnit4ClassRunner.java:289)
    2. org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:247)
    3. org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:94)
    3 frames
  22. JUnit
    RunBefores.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)
    6. org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
    6 frames
  23. 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:70)
    2 frames
  24. JUnit
    ParentRunner.run
    1. org.junit.runners.ParentRunner.run(ParentRunner.java:363)
    1 frame
  25. Spring TestContext
    SpringJUnit4ClassRunner.run
    1. org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:191)
    1 frame
  26. JUnit4 Runner
    JUnit4TestReference.run
    1. org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:49)
    1 frame
  27. JUnit3 Runner
    RemoteTestRunner.main
    1. org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
    2. org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
    3. org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
    4. org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
    5. org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
    5 frames