[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] Problem in concrete-aspect implementation

Hello,

I am trying to implement concrete aspect in aop.xml but I am facing some problem. Here are the details:
My abstract aspect is:

public abstract aspect AspectA {
    pointcut executionFoo() : execution(* *.Foo(..));
    abstract pointcut callFoo();
    before() : executionFoo() {
        System.out.println("Entering Foo...");
    }
    after() : executionFoo() {
        System.out.println("Leaving Foo...");
    }
}

I want to define the definition of callFoo() in aop.xml at load time. Hence I am doing something like this:
<aspectj>
    <aspects>
        <concrete-aspect name="AspectAImpl" extends="AspectA">
             <pointcut name="callFoo" ex-pression="call(* *.Foo(..))"/>                              
        </concrete-aspect>
    </aspects>
</aspectj>

However on execution of aj ClassA, I am getting error message:
[WeavingURLClassLoader] error Attempt to concretize a non-abstract aspect: <concrete-aspect name='lo
ading.AspectAImpl' extends='AspectA'/> in aop.xml
[WeavingURLClassLoader] error Concrete-aspect 'loading.AspectAImpl' could not be registered
[WeavingURLClassLoader] warning failure(s) registering aspects. Disabling weaver for class loader or
g.aspectj.weaver.loadtime.WeavingURLClassLoader
Inside Foo!!

I am using aspect 1.5. Can somebody guide me in sorting out the problem? Am I missing something?

Thanks in advace,
Kunal Pathak.