org.springframework.beans.factory.BeanIsAbstractException: Tried to instantiate abstract bean definition '&baseTransactionProxy'

Spring JIRA | Patrick Burleson | 1 decade ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    Using the cool new Abstract bean definition for defining common transaction attributes seems to cause a problem with the VelocityView class. Adapting the config from the petclinic example to my app, only copying over the Transaction stuff to apply to my Hibernate Session Factory. Before I added this, my Velocity config was working fine. Ever since adding this, I get the following error: org.springframework.beans.factory.BeanIsAbstractException: Tried to instantiate abstract bean definition '&baseTransactionProxy' at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:177) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:136) at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:177) at org.springframework.context.support.AbstractApplicationContext.getBeansOfType(AbstractApplicationContext.java:473) at org.springframework.beans.factory.BeanFactoryUtils.beansOfTypeIncludingAncestors(BeanFactoryUtils.java:108) at org.springframework.beans.factory.BeanFactoryUtils.beansOfTypeIncludingAncestors(BeanFactoryUtils.java:112) at org.springframework.beans.factory.BeanFactoryUtils.beanOfTypeIncludingAncestors(BeanFactoryUtils.java:141) at org.springframework.web.servlet.view.velocity.VelocityView.initApplicationContext(VelocityView.java:182) at org.springframework.context.support.ApplicationObjectSupport.setApplicationContext(ApplicationObjectSupport.java:79) at org.springframework.web.servlet.view.AbstractCachingViewResolver.loadAndConfigureView(AbstractCachingViewResolver.java:123) at org.springframework.web.servlet.view.AbstractCachingViewResolver.resolveViewName(AbstractCachingViewResolver.java:78) at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:629) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:535) at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:321) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683) at java.lang.Thread.run(Thread.java:595) The problem seems to be around line 182 of VelocityView.java in org.springframework.web.servlet.view.velocity when it uses BeanFactoryUtils.beanOfTypeIncludingAncestors() . It also appears that this affects the Freemarker implementation as well (just eyeballing the code). If you need them, I can profile my context configuration files.

    Spring JIRA | 1 decade ago | Patrick Burleson
    org.springframework.beans.factory.BeanIsAbstractException: Tried to instantiate abstract bean definition '&baseTransactionProxy'
  2. 0

    Using the cool new Abstract bean definition for defining common transaction attributes seems to cause a problem with the VelocityView class. Adapting the config from the petclinic example to my app, only copying over the Transaction stuff to apply to my Hibernate Session Factory. Before I added this, my Velocity config was working fine. Ever since adding this, I get the following error: org.springframework.beans.factory.BeanIsAbstractException: Tried to instantiate abstract bean definition '&baseTransactionProxy' at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:177) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:136) at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:177) at org.springframework.context.support.AbstractApplicationContext.getBeansOfType(AbstractApplicationContext.java:473) at org.springframework.beans.factory.BeanFactoryUtils.beansOfTypeIncludingAncestors(BeanFactoryUtils.java:108) at org.springframework.beans.factory.BeanFactoryUtils.beansOfTypeIncludingAncestors(BeanFactoryUtils.java:112) at org.springframework.beans.factory.BeanFactoryUtils.beanOfTypeIncludingAncestors(BeanFactoryUtils.java:141) at org.springframework.web.servlet.view.velocity.VelocityView.initApplicationContext(VelocityView.java:182) at org.springframework.context.support.ApplicationObjectSupport.setApplicationContext(ApplicationObjectSupport.java:79) at org.springframework.web.servlet.view.AbstractCachingViewResolver.loadAndConfigureView(AbstractCachingViewResolver.java:123) at org.springframework.web.servlet.view.AbstractCachingViewResolver.resolveViewName(AbstractCachingViewResolver.java:78) at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:629) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:535) at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:321) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683) at java.lang.Thread.run(Thread.java:595) The problem seems to be around line 182 of VelocityView.java in org.springframework.web.servlet.view.velocity when it uses BeanFactoryUtils.beanOfTypeIncludingAncestors() . It also appears that this affects the Freemarker implementation as well (just eyeballing the code). If you need them, I can profile my context configuration files.

    Spring JIRA | 1 decade ago | Patrick Burleson
    org.springframework.beans.factory.BeanIsAbstractException: Tried to instantiate abstract bean definition '&baseTransactionProxy'

    Root Cause Analysis

    1. org.springframework.beans.factory.BeanIsAbstractException

      Tried to instantiate abstract bean definition '&baseTransactionProxy'

      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean()
    2. Spring Beans
      DefaultListableBeanFactory.getBeansOfType
      1. org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:177)
      2. org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:136)
      3. org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:177)
      3 frames
    3. Spring Context
      AbstractApplicationContext.getBeansOfType
      1. org.springframework.context.support.AbstractApplicationContext.getBeansOfType(AbstractApplicationContext.java:473)
      1 frame
    4. Spring Beans
      BeanFactoryUtils.beanOfTypeIncludingAncestors
      1. org.springframework.beans.factory.BeanFactoryUtils.beansOfTypeIncludingAncestors(BeanFactoryUtils.java:108)
      2. org.springframework.beans.factory.BeanFactoryUtils.beansOfTypeIncludingAncestors(BeanFactoryUtils.java:112)
      3. org.springframework.beans.factory.BeanFactoryUtils.beanOfTypeIncludingAncestors(BeanFactoryUtils.java:141)
      3 frames
    5. Spring MVC
      VelocityView.initApplicationContext
      1. org.springframework.web.servlet.view.velocity.VelocityView.initApplicationContext(VelocityView.java:182)
      1 frame
    6. Spring Context
      ApplicationObjectSupport.setApplicationContext
      1. org.springframework.context.support.ApplicationObjectSupport.setApplicationContext(ApplicationObjectSupport.java:79)
      1 frame
    7. Spring MVC
      FrameworkServlet.service
      1. org.springframework.web.servlet.view.AbstractCachingViewResolver.loadAndConfigureView(AbstractCachingViewResolver.java:123)
      2. org.springframework.web.servlet.view.AbstractCachingViewResolver.resolveViewName(AbstractCachingViewResolver.java:78)
      3. org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:629)
      4. org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:535)
      5. org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:321)
      5 frames
    8. JavaServlet
      HttpServlet.service
      1. javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
      1 frame
    9. Glassfish Core
      ContainerBase.invoke
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
      3. org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
      4. org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
      5. org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
      6. org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
      7. org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
      8. org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
      9. org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
      10. org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
      11. org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
      12. org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
      13. org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
      14. org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
      15. org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      16. org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
      17. org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
      18. org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
      18 frames
    10. org.apache.coyote
      CoyoteAdapter.service
      1. org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
      1 frame
    11. Grizzly HTTP
      TcpWorkerThread.runIt
      1. org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
      2. org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
      3. org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
      3 frames
    12. Tomcat Util
      ThreadPool$ControlRunnable.run
      1. org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
      1 frame
    13. Java RT
      Thread.run
      1. java.lang.Thread.run(Thread.java:595)
      1 frame