Uploaded image for project: 'Spring Framework'
  1. Spring Framework
  2. SPR-8733

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

    Details

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

      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.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                cbeams Chris Beams
                Reporter:
                jzcfk9 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:
                  6 years, 30 weeks, 4 days ago