java.lang.IllegalStateException: BeanWrapper does not hold a bean instance

Spring JIRA | Colin Yates | 1 decade ago
  1. 0

    More details at: http://forum.springframework.org/showthread.php?p=49536#post49536 Essentially I have a constructor: public ClassFilteringLoadEventListener(final Map<String, Collection<? extends Object>> theListeners) { } wiring up with: <bean class="uk.ac.warwick.sbr.hibernate.ClassFilteringLoadEventListener"> <constructor-arg index="0"> <map> <entry key="anything"> <list> <bean class="uk.ac.warwick.sbr.hibernate.AutoWiringLoadedObjectListener"/> </list> </entry> </map> </constructor-arg> </bean> throws: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'uk.ac.warwick.sbr.hibernate.ClassFilteringLoadEventListener' defined in class path resource [uk/ac/warwick/sbr/broken-context.xml]: Instantiation of bean failed; nested exception is java.lang.IllegalStateException: BeanWrapper does not hold a bean instance java.lang.IllegalStateException: BeanWrapper does not hold a bean instance at org.springframework.util.Assert.state(Assert.java:341) at org.springframework.beans.BeanWrapperImpl.getPropertyDescriptorInternal(BeanWrapperImpl.java:274) at org.springframework.beans.BeanWrapperImpl.getPropertyType(BeanWrapperImpl.java:323) at org.springframework.beans.PropertyEditorRegistrySupport.findCustomEditor(PropertyEditorRegistrySupport.java:233) at org.springframework.beans.PropertyTypeConverter.doTypeConversionIfNecessary(PropertyTypeConverter.java:100) at org.springframework.beans.PropertyTypeConverter.doTypeConversionIfNecessary(PropertyTypeConverter.java:73) at org.springframework.beans.PropertyTypeConverter.convertToTypedMap(PropertyTypeConverter.java:277) at org.springframework.beans.PropertyTypeConverter.doTypeConversionIfNecessary(PropertyTypeConverter.java:131) at org.springframework.beans.BeanWrapperImpl.doTypeConversionIfNecessary(BeanWrapperImpl.java:853) at org.springframework.beans.factory.support.AbstractBeanFactory.doTypeConversionIfNecessary(AbstractBeanFactory.java:672) at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:370) at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:126) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:542) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:368) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:238) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:148) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:253) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:331) at uk.ac.warwick.sbr.TheTest.testItFails(TheTest.java:14) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at junit.framework.TestCase.runTest(TestCase.java:154) at junit.framework.TestCase.runBare(TestCase.java:127) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:118) at junit.framework.TestSuite.runTest(TestSuite.java:208) at junit.framework.TestSuite.run(TestSuite.java:203) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:478) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:344) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)

    Spring JIRA | 1 decade ago | Colin Yates
    java.lang.IllegalStateException: BeanWrapper does not hold a bean instance
  2. 0

    More details at: http://forum.springframework.org/showthread.php?p=49536#post49536 Essentially I have a constructor: public ClassFilteringLoadEventListener(final Map<String, Collection<? extends Object>> theListeners) { } wiring up with: <bean class="uk.ac.warwick.sbr.hibernate.ClassFilteringLoadEventListener"> <constructor-arg index="0"> <map> <entry key="anything"> <list> <bean class="uk.ac.warwick.sbr.hibernate.AutoWiringLoadedObjectListener"/> </list> </entry> </map> </constructor-arg> </bean> throws: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'uk.ac.warwick.sbr.hibernate.ClassFilteringLoadEventListener' defined in class path resource [uk/ac/warwick/sbr/broken-context.xml]: Instantiation of bean failed; nested exception is java.lang.IllegalStateException: BeanWrapper does not hold a bean instance java.lang.IllegalStateException: BeanWrapper does not hold a bean instance at org.springframework.util.Assert.state(Assert.java:341) at org.springframework.beans.BeanWrapperImpl.getPropertyDescriptorInternal(BeanWrapperImpl.java:274) at org.springframework.beans.BeanWrapperImpl.getPropertyType(BeanWrapperImpl.java:323) at org.springframework.beans.PropertyEditorRegistrySupport.findCustomEditor(PropertyEditorRegistrySupport.java:233) at org.springframework.beans.PropertyTypeConverter.doTypeConversionIfNecessary(PropertyTypeConverter.java:100) at org.springframework.beans.PropertyTypeConverter.doTypeConversionIfNecessary(PropertyTypeConverter.java:73) at org.springframework.beans.PropertyTypeConverter.convertToTypedMap(PropertyTypeConverter.java:277) at org.springframework.beans.PropertyTypeConverter.doTypeConversionIfNecessary(PropertyTypeConverter.java:131) at org.springframework.beans.BeanWrapperImpl.doTypeConversionIfNecessary(BeanWrapperImpl.java:853) at org.springframework.beans.factory.support.AbstractBeanFactory.doTypeConversionIfNecessary(AbstractBeanFactory.java:672) at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:370) at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:126) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:542) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:368) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:238) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:148) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:253) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:331) at uk.ac.warwick.sbr.TheTest.testItFails(TheTest.java:14) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at junit.framework.TestCase.runTest(TestCase.java:154) at junit.framework.TestCase.runBare(TestCase.java:127) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:118) at junit.framework.TestSuite.runTest(TestSuite.java:208) at junit.framework.TestSuite.run(TestSuite.java:203) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:478) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:344) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)

    Spring JIRA | 1 decade ago | Colin Yates
    java.lang.IllegalStateException: BeanWrapper does not hold a bean instance
  3. 0

    Error while Implementing HATEOAS in Spring

    Stack Overflow | 3 years ago | Sunil Ks
    java.lang.IllegalStateException: Could not find current request via RequestContextHolder
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Simple WebMvcTest fails with Spring Boot 1.4M3 due to missing SpringBootConfiguration

    GitHub | 7 months ago | jgoldhammer
    java.lang.IllegalStateException: Unable to find a @SpringBootConfiguration, you need to use @ContextConfiguration or @SpringBootTest(classes=...) with your test
  6. 0

    Exception after upgrading to 1.2.0.RELEASE from 1.1.9.RELEASE

    GitHub | 2 years ago | mtm0riah
    org.springframework.beans.factory.BeanDefinitionStoreException: Failed to load bean class: ; nested exception is java.lang.IllegalStateException: Error processing condition on org.springframework.boot.actuate.autoconfigure.HealthIndicatorAutoConfiguration$SolrHealthIndicatorConfiguration

  1. tvrmsmith 2 times, last 2 weeks ago
  2. tvrmsmith 4 times, last 1 month ago
  3. schoetty 8 times, last 7 months ago
  4. Александр Пастухов 1 times, last 7 months ago
48 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

    BeanWrapper does not hold a bean instance

    at org.springframework.util.Assert.state()
  2. Spring Core
    Assert.state
    1. org.springframework.util.Assert.state(Assert.java:341)
    1 frame
  3. Spring Beans
    DefaultListableBeanFactory.preInstantiateSingletons
    1. org.springframework.beans.BeanWrapperImpl.getPropertyDescriptorInternal(BeanWrapperImpl.java:274)
    2. org.springframework.beans.BeanWrapperImpl.getPropertyType(BeanWrapperImpl.java:323)
    3. org.springframework.beans.PropertyEditorRegistrySupport.findCustomEditor(PropertyEditorRegistrySupport.java:233)
    4. org.springframework.beans.PropertyTypeConverter.doTypeConversionIfNecessary(PropertyTypeConverter.java:100)
    5. org.springframework.beans.PropertyTypeConverter.doTypeConversionIfNecessary(PropertyTypeConverter.java:73)
    6. org.springframework.beans.PropertyTypeConverter.convertToTypedMap(PropertyTypeConverter.java:277)
    7. org.springframework.beans.PropertyTypeConverter.doTypeConversionIfNecessary(PropertyTypeConverter.java:131)
    8. org.springframework.beans.BeanWrapperImpl.doTypeConversionIfNecessary(BeanWrapperImpl.java:853)
    9. org.springframework.beans.factory.support.AbstractBeanFactory.doTypeConversionIfNecessary(AbstractBeanFactory.java:672)
    10. org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:370)
    11. org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:126)
    12. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:542)
    13. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:368)
    14. org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:238)
    15. org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:148)
    16. org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:253)
    16 frames
  4. Spring Context
    AbstractApplicationContext.refresh
    1. org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:331)
    1 frame
  5. uk.ac.warwick
    TheTest.testItFails
    1. uk.ac.warwick.sbr.TheTest.testItFails(TheTest.java:14)
    1 frame
  6. 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
  7. JUnit
    TestSuite.run
    1. junit.framework.TestCase.runTest(TestCase.java:154)
    2. junit.framework.TestCase.runBare(TestCase.java:127)
    3. junit.framework.TestResult$1.protect(TestResult.java:106)
    4. junit.framework.TestResult.runProtected(TestResult.java:124)
    5. junit.framework.TestResult.run(TestResult.java:109)
    6. junit.framework.TestCase.run(TestCase.java:118)
    7. junit.framework.TestSuite.runTest(TestSuite.java:208)
    8. junit.framework.TestSuite.run(TestSuite.java:203)
    8 frames
  8. JUnit3 Runner
    RemoteTestRunner.main
    1. org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:478)
    2. org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:344)
    3. org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
    3 frames