org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'scopedTarget.com.ms.wi.ireports.ce.async.SubmitJobExecutor$JobCounter#14db0e3' is defined

Spring JIRA | Bruno Navert | 10 years ago
  1. 0

    A custom-scoped bean cannot be declared as such in Spring 2.0.2: <bean ....> <property name="jobCounter"> <bean class="com.ms.wi.ireports.ce.async.SubmitJobExecutor$JobCounter" scope="report"> <aop:scoped-proxy /> </bean> </property> </bean> It must be declared outside the parent and referenced: <bean id="jobCounter" class="com.ms.wi.ireports.ce.async.SubmitJobExecutor$JobCounter" scope="report"> <aop:scoped-proxy /> </bean> <bean ....> <property name="jobCounter" ref="jobCounter" /> </bean> (note: the fact that the bean is a static inner class has nothing to do with this, I get the same problem with a regular non-inner class) The first definition style works fine in version 2.0.0 (final) but fails in 2.0.2 with this error message: org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'scopedTarget.com.ms.wi.ireports.ce.async.SubmitJobExecutor$JobCounter#14db0e3' is defined at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:340) at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedBeanDefinition(AbstractBeanFactory.java:906) at org.springframework.beans.factory.support.AbstractBeanFactory.isSingleton(AbstractBeanFactory.java:351) at org.springframework.aop.target.AbstractPrototypeBasedTargetSource.setBeanFactory(AbstractPrototypeBasedTargetSource.java:44) at org.springframework.aop.scope.ScopedProxyFactoryBean.setBeanFactory(ScopedProxyFactoryBean.java:84) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1076) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:429) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:250) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:141) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:247) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:161) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:270) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:346) at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:156)

    Spring JIRA | 10 years ago | Bruno Navert
    org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'scopedTarget.com.ms.wi.ireports.ce.async.SubmitJobExecutor$JobCounter#14db0e3' is defined
  2. 0

    A custom-scoped bean cannot be declared as such in Spring 2.0.2: <bean ....> <property name="jobCounter"> <bean class="com.ms.wi.ireports.ce.async.SubmitJobExecutor$JobCounter" scope="report"> <aop:scoped-proxy /> </bean> </property> </bean> It must be declared outside the parent and referenced: <bean id="jobCounter" class="com.ms.wi.ireports.ce.async.SubmitJobExecutor$JobCounter" scope="report"> <aop:scoped-proxy /> </bean> <bean ....> <property name="jobCounter" ref="jobCounter" /> </bean> (note: the fact that the bean is a static inner class has nothing to do with this, I get the same problem with a regular non-inner class) The first definition style works fine in version 2.0.0 (final) but fails in 2.0.2 with this error message: org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'scopedTarget.com.ms.wi.ireports.ce.async.SubmitJobExecutor$JobCounter#14db0e3' is defined at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:340) at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedBeanDefinition(AbstractBeanFactory.java:906) at org.springframework.beans.factory.support.AbstractBeanFactory.isSingleton(AbstractBeanFactory.java:351) at org.springframework.aop.target.AbstractPrototypeBasedTargetSource.setBeanFactory(AbstractPrototypeBasedTargetSource.java:44) at org.springframework.aop.scope.ScopedProxyFactoryBean.setBeanFactory(ScopedProxyFactoryBean.java:84) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1076) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:429) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:250) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:141) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:247) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:161) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:270) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:346) at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:156)

    Spring JIRA | 10 years ago | Bruno Navert
    org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'scopedTarget.com.ms.wi.ireports.ce.async.SubmitJobExecutor$JobCounter#14db0e3' is defined
  3. 0

    Spring-Wicket: optional but named bean still required

    Stack Overflow | 4 years ago | Stijn Geukens
    org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'statusCheckService' is defined
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Mule User mailing list

    gmane.org | 1 year ago
    org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'com.nivi.InputFile' is defined
  6. 0

    Mule - User - RE: How to read a text file Contents using mule and java

    nabble.com | 6 months ago
    org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'com.nivi.InputFile' is defined

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

      No bean named 'scopedTarget.com.ms.wi.ireports.ce.async.SubmitJobExecutor$JobCounter#14db0e3' is defined

      at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition()
    2. Spring Beans
      AbstractBeanFactory.isSingleton
      1. org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:340)
      2. org.springframework.beans.factory.support.AbstractBeanFactory.getMergedBeanDefinition(AbstractBeanFactory.java:906)
      3. org.springframework.beans.factory.support.AbstractBeanFactory.isSingleton(AbstractBeanFactory.java:351)
      3 frames
    3. Spring AOP
      ScopedProxyFactoryBean.setBeanFactory
      1. org.springframework.aop.target.AbstractPrototypeBasedTargetSource.setBeanFactory(AbstractPrototypeBasedTargetSource.java:44)
      2. org.springframework.aop.scope.ScopedProxyFactoryBean.setBeanFactory(ScopedProxyFactoryBean.java:84)
      2 frames
    4. Spring Beans
      DefaultListableBeanFactory.preInstantiateSingletons
      1. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1076)
      2. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:429)
      3. org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:250)
      4. org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:141)
      5. org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:247)
      6. org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:161)
      7. org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:270)
      7 frames
    5. Spring Context
      AbstractApplicationContext.refresh
      1. org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:346)
      1 frame
    6. Spring
      AbstractRefreshableWebApplicationContext.refresh
      1. org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:156)
      1 frame