Announcement Announcement Module
Collapse
No announcement yet.
aopalliance ClassNotFoundExceptions Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    you are missing aopalliance.jar file. they are in the lib part of the distribution.

    Comment


    • #3
      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.

      Comment


      • #4
        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...

        Comment


        • #5
          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.........

          Comment


          • #6
            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.

            Comment

            Working...
            X