org.springframework.beans.factory.BeanDefinitionStoreException: 1 constructor arguments specified but no matching constructor found in bean 'testSpring01'

Spring JIRA | Ricky Nuyens | 1 decade ago
  1. 0

    when executing the following code XmlBeanFactory xbf = new XmlBeanFactory(new FileInputStream(file)); Object bean = (IEvent)xbf.getBean("testSpring01"); where file points to the following xml file <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE beans SYSTEM "../dtd/spring-beans.dtd" > <beans > <bean id="testInteger01" class="java.lang.Integer" singleton="false"> <constructor-arg><value>5</value></constructor-arg> </bean> <bean id="testSpring01" class="com.ricky.TestSpring" singleton="false" > <property name="attributes"> <map> <entry key="value01"><value>value01</value></entry> <entry key="nullValue"><value/></entry> <entry key="integerAttribute01"> <ref bean="testInteger01"/> </entry> <entry key="integerAttribute02"> <bean id="nestedInteger" class="java.lang.Integer" singleton="false"> <constructor-arg><value>5</value></constructor-arg> </bean> </entry> </map> </property> </bean> </beans> the following exception is printed on my console 0 [main] INFO xml.XmlBeanDefinitionReader - Loading XmlBeanFactory from resource [(no description] org.springframework.beans.factory.BeanDefinitionStoreException: 1 constructor arguments specified but no matching constructor found in bean 'testSpring01' at org.springframework.beans.factory.support.AbstractBeanFactory.autowireConstructor(AbstractBeanFactory.java:631) at org.springframework.beans.factory.support.AbstractBeanFactory.createBean(AbstractBeanFactory.java:532) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:192) at com.ricky.TestSpringApp.main(TestSpringApp.java:47) Exception in thread "main" Some debugging showed that the constructor context is not propagated down the chain. That is, the constructor is still the com.ricky.TestSpring rather than the java.lang.Integer one.

    Spring JIRA | 1 decade ago | Ricky Nuyens
    org.springframework.beans.factory.BeanDefinitionStoreException: 1 constructor arguments specified but no matching constructor found in bean 'testSpring01'
  2. 0

    when executing the following code XmlBeanFactory xbf = new XmlBeanFactory(new FileInputStream(file)); Object bean = (IEvent)xbf.getBean("testSpring01"); where file points to the following xml file <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE beans SYSTEM "../dtd/spring-beans.dtd" > <beans > <bean id="testInteger01" class="java.lang.Integer" singleton="false"> <constructor-arg><value>5</value></constructor-arg> </bean> <bean id="testSpring01" class="com.ricky.TestSpring" singleton="false" > <property name="attributes"> <map> <entry key="value01"><value>value01</value></entry> <entry key="nullValue"><value/></entry> <entry key="integerAttribute01"> <ref bean="testInteger01"/> </entry> <entry key="integerAttribute02"> <bean id="nestedInteger" class="java.lang.Integer" singleton="false"> <constructor-arg><value>5</value></constructor-arg> </bean> </entry> </map> </property> </bean> </beans> the following exception is printed on my console 0 [main] INFO xml.XmlBeanDefinitionReader - Loading XmlBeanFactory from resource [(no description] org.springframework.beans.factory.BeanDefinitionStoreException: 1 constructor arguments specified but no matching constructor found in bean 'testSpring01' at org.springframework.beans.factory.support.AbstractBeanFactory.autowireConstructor(AbstractBeanFactory.java:631) at org.springframework.beans.factory.support.AbstractBeanFactory.createBean(AbstractBeanFactory.java:532) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:192) at com.ricky.TestSpringApp.main(TestSpringApp.java:47) Exception in thread "main" Some debugging showed that the constructor context is not propagated down the chain. That is, the constructor is still the com.ricky.TestSpring rather than the java.lang.Integer one.

    Spring JIRA | 1 decade ago | Ricky Nuyens
    org.springframework.beans.factory.BeanDefinitionStoreException: 1 constructor arguments specified but no matching constructor found in bean 'testSpring01'
  3. 0

    Stackoverflow error in Spring's (3.2.0) ConfigurationClassEnhancer after upgrading to Java 7

    Stack Overflow | 3 years ago | Jakub Bochenski
    org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public java.lang.Object com.egnyte.filestore.cache.CacheManagerPeerProviderConfigurationProvider.get()] threw exception; nested exception is java.lang.StackOverflowError
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Cannot access metadata service on Alfresco 5.0.a and 5.0.b

    GitHub | 2 years ago | softwareloop
    org.springframework.extensions.webscripts.WebScriptException: 10190000 Wrapped Exception (with status template): 10190006 Failed to execute script 'classpath*:alfresco/extension/templates/webscripts/uploader-plus/list-content-types.get.js': Can only specify arguments for the getBean method when referring to a prototype bean definition
  6. 0

    [SPR-2745] Inner bean with unspecified scope, defined within abstract parent outer bean, does not inherit prototype scope from concrete child outer bean. - Spring JIRA

    spring.io | 1 year ago
    org.springframework.beans.factory.BeanDefinitionStoreException: Inner bean definition 'bug.Inner#198891' for bean property 'inner' has scope 'singleton' but containing bean definition 'child' does not. Mark the inner bean definition with scope 'prototype' instead.

    1 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. org.springframework.beans.factory.BeanDefinitionStoreException

      1 constructor arguments specified but no matching constructor found in bean 'testSpring01'

      at org.springframework.beans.factory.support.AbstractBeanFactory.autowireConstructor()
    2. Spring Beans
      AbstractBeanFactory.getBean
      1. org.springframework.beans.factory.support.AbstractBeanFactory.autowireConstructor(AbstractBeanFactory.java:631)
      2. org.springframework.beans.factory.support.AbstractBeanFactory.createBean(AbstractBeanFactory.java:532)
      3. org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:192)
      3 frames
    3. com.ricky
      TestSpringApp.main
      1. com.ricky.TestSpringApp.main(TestSpringApp.java:47)
      1 frame