4 Replies Latest reply on Jun 2, 2003 12:30 PM by jlk

    pointcut class=".*" causes ClassDefNotFound

    jlk Newbie

      Is it not possible to cut across all classes? When I change example1 to:

      <interceptor-pointcut class=".*">

      It responds back with:

      Exception in thread "main" java.lang.NoClassDefFoundError: POJO

      I added debugging to the standalone SystemClassLoader, and here is the exception causing the CDNF:

      invocation target exception:
      java.lang.ClassCircularityError: org/jboss/aop/SimpleMetaData
      at org.jboss.aop.Advisor.(Unknown Source)
      at org.jboss.aop.ClassAdvisor.(Unknown Source)
      at org.jboss.aop.AspectManager.findClassAdvisor(Unknown Source)
      at org.jboss.aop.AspectManager.translate(Unknown Source)
      at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.aop.standalone.SystemClassLoader.loadClass(Unknown Source)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
      at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315)
      at org.jboss.aop.Advisor.(Unknown Source)
      at org.jboss.aop.ClassAdvisor.(Unknown Source)
      at org.jboss.aop.AspectManager.findClassAdvisor(Unknown Source)
      at org.jboss.aop.AspectManager.translate(Unknown Source)
      at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.aop.standalone.SystemClassLoader.loadClass(Unknown Source)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
      at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315)
      java.lang.NoClassDefFoundError: org/jboss/aop/SimpleMetaData
      at org.jboss.aop.Advisor.(Unknown Source)
      at org.jboss.aop.ClassAdvisor.(Unknown Source)
      at org.jboss.aop.AspectManager.findClassAdvisor(Unknown Source)
      at org.jboss.aop.AspectManager.translate(Unknown Source)
      at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.aop.standalone.SystemClassLoader.loadClass(Unknown Source)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
      at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315)

        • 1. Re: pointcut class=".*" causes ClassDefNotFound
          jlk Newbie

          sorry for the double post, the initial submittal came back with a corrupted page, so I thought it didn't get submitted.

          • 2. Re: pointcut class=".*" causes ClassDefNotFound
            Bill Burke Master

            You should be able to instrument everything. Probably a bug, I'll try it tonight.

            Bill

            • 3. Fixed now?
              Bill Burke Master

              I think I fix most of the problems. There were a few. Should work now. If not, let me know.

              • 4. Re: Fixed now?
                jlk Newbie

                Kinda.

                It appears that if the interceptor is itself pointcut then it gets into an infinite loop. A run cutting ".*O", which previously failed, now works.


                $ cat META-INF/jboss-aop.xml
                <?xml version="1.0" encoding="UTF-8"?>

                <interceptor-pointcut class=".*">



                </interceptor-pointcut>



                $ java $AOPL -classpath .:$AOP POJO
                java.lang.RuntimeException: java.lang.ClassNotFoundException: TracingInterceptor at org.jboss.aop.GenericInterceptorFactory.create(Unknown Source)
                at org.jboss.aop.Advisor.createInterceptorChain(Unknown Source)
                at org.jboss.aop.ClassAdvisor.rebuildInterceptorFactories(Unknown Source)
                at org.jboss.aop.Advisor.addInterceptorPointcut(Unknown Source)
                at org.jboss.aop.InterceptorPointcut.addAdvisor(Unknown Source)
                at org.jboss.aop.AspectManager.attachAdvisableAndInterceptorPointcuts(Unknown Source)
                at org.jboss.aop.AspectManager.findClassAdvisor(Unknown Source)
                at org.jboss.aop.AspectManager.translate(Unknown Source)
                at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                at java.lang.reflect.Method.invoke(Method.java:324)
                at org.jboss.aop.standalone.SystemClassLoader.loadClass(Unknown Source)
                at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
                at org.jboss.aop.GenericInterceptorFactory.create(Unknown Source)
                at org.jboss.aop.Advisor.createInterceptorChain(Unknown Source)
                at org.jboss.aop.ClassAdvisor.rebuildInterceptorFactories(Unknown Source)
                at org.jboss.aop.Advisor.addInterceptorPointcut(Unknown Source)
                at org.jboss.aop.InterceptorPointcut.addAdvisor(Unknown Source)
                at org.jboss.aop.AspectManager.attachAdvisableAndInterceptorPointcuts(Unknown Source)
                at org.jboss.aop.AspectManager.findClassAdvisor(Unknown Source)
                at org.jboss.aop.AspectManager.translate(Unknown Source)
                at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                at java.lang.reflect.Method.invoke(Method.java:324)
                at org.jboss.aop.standalone.SystemClassLoader.loadClass(Unknown Source)
                at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                at java.lang.reflect.Method.invoke(Method.java:324)
                at org.jboss.aop.standalone.SystemClassLoader.loadClass(Unknown Source)
                .... continues on endlessly ....