Results 1 to 4 of 4

Thread: Spring3 NoClassDefFoundError aopalliance/.../MethodInterceptor tx:annotation-driven

  1. #1
    Join Date
    Mar 2010
    Posts
    6

    Default Spring3 NoClassDefFoundError aopalliance/.../MethodInterceptor tx:annotation-driven

    One of our bean definition XML files contains

    <tx:annotation-driven/>

    which causes a NoClassDefFoundError looking for "org/aopalliance/intercept/MethodInterceptor". Removing the tx:annotation-driven clause eliminates the error.

    Google returns very old hits from Spring 1 having to do with not including the aopalliance classes. These are not included in Spring 3, and I would rather not have to pull additional jars (Spring is supposed to be self-contained, right?)

    Are these old internal references that should have been updated to use Spring's AOP instead?

  2. #2
    Join Date
    Jun 2006
    Location
    SF Bay Area, California
    Posts
    524

    Default

    You need aopalliance jar file in application's classpath. You may get it from http://www.springsource.com/reposito...ersi on=1.0.0 or from the Maven central repository.

    -Ramnivas
    Ramnivas Laddad (Follow me on Twitter)
    AspectJ in Action: Enterprise AOP with Spring Applications (2nd edition). Now available!

  3. #3
    Join Date
    Mar 2010
    Posts
    6

    Default

    Is this a permanent requirement, or just a stopgap until the next Spring release?

  4. #4
    Join Date
    Jun 2006
    Location
    SF Bay Area, California
    Posts
    524

    Default

    Adding aopalliance jar has been and will be a requirement. Prior to 3.0, Spring used to ship the required jars in a distribution (you still were required to add those jars to the classpath). There is a JIRA issue that will make such a distribution available in a future 3.x release.

    -Ramnivas
    Ramnivas Laddad (Follow me on Twitter)
    AspectJ in Action: Enterprise AOP with Spring Applications (2nd edition). Now available!

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •