Spring Framework
  1. Spring Framework
  2. SPR-8733

Unable to use @EnableTransactionManagement along with <cache:annotation-driven />

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Duplicate
    • Affects Version/s: 3.1 M2
    • Fix Version/s: None
    • Component/s: Core
    • Labels:
      None
    • Last commented by a User:
      false

      Description

      I'm unable to use the new @Cachable construct within spring 3.1 along with the new @EnableTransactionManagement. My application fails to start with the following exception:

      Caused by: java.lang.IllegalArgumentException: Class name [null] is not a known auto-proxy creator class
      at org.springframework.aop.config.AopConfigUtils.findPriorityForClass(AopConfigUtils.java:140)
      at org.springframework.aop.config.AopConfigUtils.registerOrEscalateApcAsRequired(AopConfigUtils.java:113)
      at org.springframework.aop.config.AopConfigUtils.registerAutoProxyCreatorIfNecessary(AopConfigUtils.java:74)
      at org.springframework.aop.config.AopNamespaceUtils.registerAutoProxyCreatorIfNecessary(AopNamespaceUtils.java:58)
      at org.springframework.cache.config.AnnotationDrivenCacheBeanDefinitionParser$AopAutoProxyConfigurer.configureAutoProxyCreator(AnnotationDrivenCacheBeanDefinitionParser.java:109)
      at org.springframework.cache.config.AnnotationDrivenCacheBeanDefinitionParser.parse(AnnotationDrivenCacheBeanDefinitionParser.java:67)
      at org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:73)
      at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1414)
      at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1404)
      at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:184)
      at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.doRegisterBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:140)
      at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:111)
      at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:493)
      at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:390)
      ... 40 more

      I've attached a sample application which has a test case to recreate this issue.

        Issue Links

          Activity

          Hide
          Brandon M. added a comment -

          I just updated my dependencies to use the latest build snapshot, and it looks like this issue has been fixed (at least the application context loads and the tests pass). Feel free to close this JIRA.

          Show
          Brandon M. added a comment - I just updated my dependencies to use the latest build snapshot, and it looks like this issue has been fixed (at least the application context loads and the tests pass). Feel free to close this JIRA.
          Hide
          Chris Beams added a comment -

          Hi Brandon,

          Indeed, this was already addressed by SPR-8494. Thanks, though for the submission and for taking the time to put together a reproducton project.

          Cheers!

          Show
          Chris Beams added a comment - Hi Brandon, Indeed, this was already addressed by SPR-8494 . Thanks, though for the submission and for taking the time to put together a reproducton project. Cheers!

            People

            • Assignee:
              Chris Beams
              Reporter:
              Brandon M.
              Last updater:
              Trevor Marshall
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                2 years, 29 weeks, 5 days ago