java.lang.IllegalStateException: Failed to load ApplicationContext

Google Groups | Alec Swan | 6 years ago
  1. 0

    Salve "Could not find dependency for key" during Spring initialization

    Google Groups | 6 years ago | Alec Swan
    java.lang.IllegalStateException: Failed to load ApplicationContext

    Root Cause Analysis

    1. salve.depend.DependencyNotFoundException

      Could not find dependency for key: [FieldKey field=com.galecsy.lrm.domain.model.IdentifiableModel#clock]

      at salve.depend.DependencyLibrary.locate()
    2. salve.depend
      DependencyAspect.ajc$inlineAccessMethod$salve_depend_DependencyAspect$salve_depend_DependencyAspect$handleRead
      1. salve.depend.DependencyLibrary.locate(DependencyLibrary.java:107)
      2. salve.depend.DependencyAspect.handleRead(DependencyAspect.aj:52)
      3. salve.depend.DependencyAspect.ajc$inlineAccessMethod$salve_depend_DependencyAspect$salve_depend_DependencyAspect$handleRead(DependencyAspect.aj:1)
      3 frames
    3. com.galecsy.lrm
      OfferRecipient.<init>
      1. com.galecsy.lrm.domain.model.IdentifiableModel.clock_aroundBody1$advice(IdentifiableModel.java:25)
      2. com.galecsy.lrm.domain.model.IdentifiableModel.<init>(IdentifiableModel.java:51)
      3. com.galecsy.lrm.domain.model.OfferRecipient.<init>(OfferRecipient.java:43)
      3 frames
    4. Java RT
      Constructor.newInstance
      1. sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      2. sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
      3. sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
      4. java.lang.reflect.Constructor.newInstance(Constructor.java:513)
      4 frames
    5. Hibernate
      SingleTableEntityPersister.<init>
      1. org.hibernate.engine.UnsavedValueFactory.instantiate(UnsavedValueFactory.java:45)
      2. org.hibernate.engine.UnsavedValueFactory.getUnsavedIdentifierValue(UnsavedValueFactory.java:67)
      3. org.hibernate.tuple.PropertyFactory.buildIdentifierProperty(PropertyFactory.java:67)
      4. org.hibernate.tuple.entity.EntityMetamodel.<init>(EntityMetamodel.java:136)
      5. org.hibernate.persister.entity.AbstractEntityPersister.<init>(AbstractEntityPersister.java:456)
      6. org.hibernate.persister.entity.SingleTableEntityPersister.<init>(SingleTableEntityPersister.java:131)
      6 frames
    6. Hibernate
      SessionFactoryImpl.<init>
      1. org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:84)
      2. org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:267)
      2 frames
    7. Hibernate
      AnnotationConfiguration.buildSessionFactory
      1. org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1341)
      2. org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:867)
      2 frames
    8. Hibernate
      AbstractSessionFactoryBean.afterPropertiesSet
      1. org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:814)
      2. org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:732)
      3. org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertiesSet(AbstractSessionFactoryBean.java:211)
      3 frames
    9. Spring Beans
      AbstractAutowireCapableBeanFactory$1.run
      1. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1369)
      2. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1335)
      3. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473)
      4. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
      4 frames
    10. Java RT
      AccessController.doPrivileged
      1. java.security.AccessController.doPrivileged(Native Method)
      1 frame
    11. Spring Beans
      DefaultListableBeanFactory.preInstantiateSingletons
      1. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
      2. org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
      3. org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
      4. org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
      5. org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
      6. org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
      7. org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:423)
      7 frames
    12. Spring Context
      AbstractApplicationContext.refresh
      1. org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)
      2. org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380)
      2 frames
    13. Spring TestContext
      SpringJUnit4ClassRunner.invokeTestMethod
      1. org.springframework.test.context.support.AbstractGenericContextLoader.loadContext(AbstractGenericContextLoader.java:84)
      2. org.springframework.test.context.support.AbstractGenericContextLoader.loadContext(AbstractGenericContextLoader.java:42)
      3. org.springframework.test.context.TestContext.loadApplicationContext(TestContext.java:173)
      4. org.springframework.test.context.TestContext.getApplicationContext(TestContext.java:197)
      5. org.springframework.test.context.support.DependencyInjectionTestExecutionListener.injectDependencies(DependencyInjectionTestExecutionListener.java:109)
      6. org.springframework.test.context.support.DependencyInjectionTestExecutionListener.prepareTestInstance(DependencyInjectionTestExecutionListener.java:75)
      7. org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:255)
      8. org.springframework.test.context.junit4.SpringJUnit4ClassRunner.createTest(SpringJUnit4ClassRunner.java:111)
      9. org.springframework.test.context.junit4.SpringJUnit4ClassRunner.invokeTestMethod(SpringJUnit4ClassRunner.java:148)
      9 frames
    14. JUnit
      JUnit4ClassRunner.run
      1. org.junit.internal.runners.JUnit4ClassRunner.runMethods(JUnit4ClassRunner.java:51)
      2. org.junit.internal.runners.JUnit4ClassRunner$1.run(JUnit4ClassRunner.java:44)
      3. org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:27)
      4. org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:37)
      5. org.junit.internal.runners.JUnit4ClassRunner.run(JUnit4ClassRunner.java:42)
      5 frames
    15. Spring TestContext
      SpringJUnit4ClassRunner.run
      1. org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:97)
      1 frame
    16. JUnit
      JUnit4TestAdapter.run
      1. junit.framework.JUnit4TestAdapter.run(JUnit4TestAdapter.java:36)
      1 frame
    17. Apache Ant + JUnit
      JUnitTestRunner.main
      1. org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:420)
      2. org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:911)
      3. org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:768)
      3 frames