java.lang.IllegalStateException: Failed to load ApplicationContext

Spring JIRA | Chris Beams | 8 years ago
  1. 0

    Here's the trace. More details upon request. java.lang.IllegalStateException: Failed to load ApplicationContext at org.springframework.test.context.TestContext.getApplicationContext(TestContext.java:200) at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.injectDependencies(DependencyInjectionTestExecutionListener.java:109) at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.prepareTestInstance(DependencyInjectionTestExecutionListener.java:75) at org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:255) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.createTest(SpringJUnit4ClassRunner.java:117) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.invokeTestMethod(SpringJUnit4ClassRunner.java:154) at org.junit.internal.runners.JUnit4ClassRunner.runMethods(JUnit4ClassRunner.java:51) at org.junit.internal.runners.JUnit4ClassRunner$1.run(JUnit4ClassRunner.java:44) at org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:27) at org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:37) at org.junit.internal.runners.JUnit4ClassRunner.run(JUnit4ClassRunner.java:42) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:103) at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62) at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140) at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127) at org.apache.maven.surefire.Surefire.run(Surefire.java:177) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:338) at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:997) Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'diningProcessor': Invocation of init method failed; nested exception is java.lang.NoSuchMethodError: org.springframework.integration.message.MethodParameterMessageMapper$MethodParameterMetadata.getParameterAnnotations()[Ljava/lang/Object; at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1337) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:476) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:412) at java.security.AccessController.doPrivileged(Native Method) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:383) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:276) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:273) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:175) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:508) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:716) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:377) at org.springframework.test.context.support.AbstractGenericContextLoader.loadContext(AbstractGenericContextLoader.java:84) at org.springframework.test.context.support.AbstractGenericContextLoader.loadContext(AbstractGenericContextLoader.java:1) at org.springframework.test.context.TestContext.loadApplicationContext(TestContext.java:173) at org.springframework.test.context.TestContext.getApplicationContext(TestContext.java:196) ... 21 more Caused by: java.lang.NoSuchMethodError: org.springframework.integration.message.MethodParameterMessageMapper$MethodParameterMetadata.getParameterAnnotations()[Ljava/lang/Object; at org.springframework.integration.message.MethodParameterMessageMapper$MethodParameterMetadata.getHeaderAnnotation(MethodParameterMessageMapper.java:208) at org.springframework.integration.message.MethodParameterMessageMapper.initializeParameterMetadata(MethodParameterMessageMapper.java:160) at org.springframework.integration.message.MethodParameterMessageMapper.<init>(MethodParameterMessageMapper.java:65) at org.springframework.integration.gateway.GatewayProxyFactoryBean.createGatewayForMethod(GatewayProxyFactoryBean.java:227) at org.springframework.integration.gateway.GatewayProxyFactoryBean.onInit(GatewayProxyFactoryBean.java:144) at org.springframework.integration.endpoint.AbstractEndpoint.afterPropertiesSet(AbstractEndpoint.java:58) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1368) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1334) ... 36 more Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 1.258 sec <<< FAILURE! Results : Tests in error: testBatch(rewards.messaging.DiningProcessorTests) Tests run: 1, Failures: 0, Errors: 1, Skipped: 0 [INFO] ------------------------------------------------------------------------ [ERROR] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] There are test failures. Please refer to /Users/cbeams/Work/springsource/services/training/enterprise-integration/trunk/modules/spring-integration-1/lab/start/target/surefire-reports for the individual test results. [INFO] ------------------------------------------------------------------------ [INFO] For more information, run Maven with the -e switch [INFO] ------------------------------------------------------------------------ [INFO] Total time: 7 seconds [INFO] Finished at: Mon Apr 20 14:29:06 PDT 2009 [INFO] Final Memory: 26M/62M [INFO] ------------------------------------------------------------------------

    Spring JIRA | 8 years ago | Chris Beams
    java.lang.IllegalStateException: Failed to load ApplicationContext
  2. 0

    Here's the trace. More details upon request. java.lang.IllegalStateException: Failed to load ApplicationContext at org.springframework.test.context.TestContext.getApplicationContext(TestContext.java:200) at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.injectDependencies(DependencyInjectionTestExecutionListener.java:109) at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.prepareTestInstance(DependencyInjectionTestExecutionListener.java:75) at org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:255) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.createTest(SpringJUnit4ClassRunner.java:117) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.invokeTestMethod(SpringJUnit4ClassRunner.java:154) at org.junit.internal.runners.JUnit4ClassRunner.runMethods(JUnit4ClassRunner.java:51) at org.junit.internal.runners.JUnit4ClassRunner$1.run(JUnit4ClassRunner.java:44) at org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:27) at org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:37) at org.junit.internal.runners.JUnit4ClassRunner.run(JUnit4ClassRunner.java:42) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:103) at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62) at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140) at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127) at org.apache.maven.surefire.Surefire.run(Surefire.java:177) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:338) at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:997) Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'diningProcessor': Invocation of init method failed; nested exception is java.lang.NoSuchMethodError: org.springframework.integration.message.MethodParameterMessageMapper$MethodParameterMetadata.getParameterAnnotations()[Ljava/lang/Object; at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1337) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:476) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:412) at java.security.AccessController.doPrivileged(Native Method) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:383) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:276) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:273) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:175) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:508) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:716) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:377) at org.springframework.test.context.support.AbstractGenericContextLoader.loadContext(AbstractGenericContextLoader.java:84) at org.springframework.test.context.support.AbstractGenericContextLoader.loadContext(AbstractGenericContextLoader.java:1) at org.springframework.test.context.TestContext.loadApplicationContext(TestContext.java:173) at org.springframework.test.context.TestContext.getApplicationContext(TestContext.java:196) ... 21 more Caused by: java.lang.NoSuchMethodError: org.springframework.integration.message.MethodParameterMessageMapper$MethodParameterMetadata.getParameterAnnotations()[Ljava/lang/Object; at org.springframework.integration.message.MethodParameterMessageMapper$MethodParameterMetadata.getHeaderAnnotation(MethodParameterMessageMapper.java:208) at org.springframework.integration.message.MethodParameterMessageMapper.initializeParameterMetadata(MethodParameterMessageMapper.java:160) at org.springframework.integration.message.MethodParameterMessageMapper.<init>(MethodParameterMessageMapper.java:65) at org.springframework.integration.gateway.GatewayProxyFactoryBean.createGatewayForMethod(GatewayProxyFactoryBean.java:227) at org.springframework.integration.gateway.GatewayProxyFactoryBean.onInit(GatewayProxyFactoryBean.java:144) at org.springframework.integration.endpoint.AbstractEndpoint.afterPropertiesSet(AbstractEndpoint.java:58) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1368) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1334) ... 36 more Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 1.258 sec <<< FAILURE! Results : Tests in error: testBatch(rewards.messaging.DiningProcessorTests) Tests run: 1, Failures: 0, Errors: 1, Skipped: 0 [INFO] ------------------------------------------------------------------------ [ERROR] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] There are test failures. Please refer to /Users/cbeams/Work/springsource/services/training/enterprise-integration/trunk/modules/spring-integration-1/lab/start/target/surefire-reports for the individual test results. [INFO] ------------------------------------------------------------------------ [INFO] For more information, run Maven with the -e switch [INFO] ------------------------------------------------------------------------ [INFO] Total time: 7 seconds [INFO] Finished at: Mon Apr 20 14:29:06 PDT 2009 [INFO] Final Memory: 26M/62M [INFO] ------------------------------------------------------------------------

    Spring JIRA | 8 years ago | Chris Beams
    java.lang.IllegalStateException: Failed to load ApplicationContext
  3. 0

    [NMS-5695] google-collections has been replaced with guava - The OpenNMS Issue Tracker

    opennms.org | 1 year ago
    java.lang.NoSuchMethodError: com.google.common.base.Objects.firstNonNull(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Develop branch relies on guava libraries which are not included

    GitHub | 5 years ago | sprocter
    org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter$TerminatingClassNotFoundException: An error occurred while automatically activating bundle org.osate.xtext.aadl2.ui (510).
  6. 0

    NoSuchMethodError on startup

    GitHub | 11 months ago | jogi01
    cpw.mods.fml.common.LoaderException: java.lang.NoSuchMethodError: java.util.Map.putIfAbsent(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    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.NoSuchMethodError

      org.springframework.integration.message.MethodParameterMessageMapper$MethodParameterMetadata.getParameterAnnotations()[Ljava/lang/Object;

      at org.springframework.integration.message.MethodParameterMessageMapper$MethodParameterMetadata.getHeaderAnnotation()
    2. Spring Integration Core
      AbstractEndpoint.afterPropertiesSet
      1. org.springframework.integration.message.MethodParameterMessageMapper$MethodParameterMetadata.getHeaderAnnotation(MethodParameterMessageMapper.java:208)
      2. org.springframework.integration.message.MethodParameterMessageMapper.initializeParameterMetadata(MethodParameterMessageMapper.java:160)
      3. org.springframework.integration.message.MethodParameterMessageMapper.<init>(MethodParameterMessageMapper.java:65)
      4. org.springframework.integration.gateway.GatewayProxyFactoryBean.createGatewayForMethod(GatewayProxyFactoryBean.java:227)
      5. org.springframework.integration.gateway.GatewayProxyFactoryBean.onInit(GatewayProxyFactoryBean.java:144)
      6. org.springframework.integration.endpoint.AbstractEndpoint.afterPropertiesSet(AbstractEndpoint.java:58)
      6 frames
    3. Spring Beans
      AbstractAutowireCapableBeanFactory$1.run
      1. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1368)
      2. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1334)
      3. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:476)
      4. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:412)
      4 frames
    4. Java RT
      AccessController.doPrivileged
      1. java.security.AccessController.doPrivileged(Native Method)
      1 frame
    5. Spring Beans
      DefaultListableBeanFactory.preInstantiateSingletons
      1. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:383)
      2. org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:276)
      3. org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
      4. org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:273)
      5. org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:175)
      6. org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:508)
      6 frames
    6. Spring Context
      AbstractApplicationContext.refresh
      1. org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:716)
      2. org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:377)
      2 frames
    7. 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:1)
      3. org.springframework.test.context.TestContext.loadApplicationContext(TestContext.java:173)
      4. org.springframework.test.context.TestContext.getApplicationContext(TestContext.java:196)
      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:117)
      9. org.springframework.test.context.junit4.SpringJUnit4ClassRunner.invokeTestMethod(SpringJUnit4ClassRunner.java:154)
      9 frames
    8. 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
    9. Spring TestContext
      SpringJUnit4ClassRunner.run
      1. org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:103)
      1 frame
    10. JUnit4 Provider
      JUnit4TestSet.execute
      1. org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62)
      1 frame
    11. SureFire
      Surefire.run
      1. org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140)
      2. org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127)
      3. org.apache.maven.surefire.Surefire.run(Surefire.java:177)
      3 frames
    12. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      4. java.lang.reflect.Method.invoke(Method.java:597)
      4 frames
    13. SureFire
      SurefireBooter.main
      1. org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:338)
      2. org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:997)
      2 frames