Results 1 to 6 of 6

Thread: aopalliance ClassNotFoundExceptions

  1. #1
    Join Date
    Aug 2009
    Posts
    7

    Default aopalliance ClassNotFoundExceptions

    I'm trying to get a simple aop interceptor to work. I'm using the latest spring framework 3.0.x. Here is a snippet from my context file:

    ...................
    <bean id="debugInterceptor" class="org.springframework.aop.interceptor.DebugIn terceptor">
    <property name="useDynamicLogger" value="true" />
    </bean>
    .....................

    When I deploy to tomcat, I get aopalliance exceptions like:

    Caused by: java.lang.NoClassDefFoundError: org/aopalliance/aop/Advice
    at java.lang.Class.getDeclaredMethods0(Native Method)
    at java.lang.Class.privateGetDeclaredMethods(Class.ja va:2427)
    at java.lang.Class.getDeclaredMethods(Class.java:1791 )
    at java.beans.Introspector$1.run(Introspector.java:12 72)
    ...............................

    I searched the spring dist directory, but there are no jar files containing aopalliance stuff. Why does the spring framework reference aopalliance classes, yet they are not included in the distribution?

    Am I missing something?

  2. #2
    Join Date
    Nov 2007
    Posts
    420

    Default

    you are missing aopalliance.jar file. they are in the lib part of the distribution.

  3. #3
    Join Date
    Aug 2009
    Posts
    7

    Default

    Strange. I don't show a lib folder in my distribution. And I don't see any aopalliance.jar files anywhere in my distribution. I'm using spring-framework-3.0.0.M3.

  4. #4
    Join Date
    Nov 2007
    Posts
    420

    Default

    do you have a lib folder in the distribution you downloaded? it would contain libraries that are used by Spring such as aopalliance, cglib, asm, hibernate...

  5. #5
    Join Date
    Aug 2009
    Posts
    7

    Default

    No, but there is a projects folder that contains source that refers to aopalliance stuff. Maybe I need to build that folder? I assumed everything would be built in the download. I suspect it's because I downloaded the dev release and not the production release....checking.........

  6. #6
    Join Date
    Aug 2009
    Posts
    7

    Default

    Yep, that was it. I downloaded the production release spring-framework-2.5.6.SEC01-with-dependencies.zip and it contains all the jar files I need. Thanks.

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
  •