Announcement Announcement Module
No announcement yet.
Problem with extending abstract aspect Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Problem with extending abstract aspect

    I have a simple abstract aspect:

    public abstract class HelloFromAspectJ {

    // abstract pointcut: no expression is defined
    public abstract void scope();

    @AfterReturning ("scope()")
    public void after() {

    and an aop.xml file:

    <concrete-aspect name="org.aspectprogrammer.hello.aspectj.Test" extends="org.aspectprogrammer.hello.aspectj.HelloF romAspectJ">
    <pointcut name="scope" expression="execution(* main(..))"/>

    <weaver options="-verbose -debug -showWeaveInfo">

    and this aspect doesn't put the advice after the method main().

    the console output:
    INFO: Found Spring's JVM agent for instrumentation
    [[email protected]] info AspectJ Weaver Version 1.6.0 built on Wednesday Apr 23, 2008 at 20:27:36 GMT
    [[email protected]] info register classloader [email protected]
    [[email protected]] info using configuration /D:/workspace_amedic/auditing/test/TestJavaAspectJSpring/bin/META-INF/aop.xml
    [[email protected]] info define aspect org.aspectprogrammer.hello.aspectj.Test
    [[email protected]] debug weaving 'org.aspectprogrammer.hello.aspectj.Test'
    [[email protected]] debug generating class 'org.aspectprogrammer.hello.aspectj.Test'
    [[email protected]] debug weaving ' cationContext$BeanPostProcessorChecker'
    [[email protected]] debug weaving 'org.springframework.context.HierarchicalMessageSo urce'
    [[email protected]] debug weaving ' sageSource'
    [[email protected]] debug weaving 'org.springframework.context.NoSuchMessageExceptio n'
    [[email protected]] debug weaving 'org.springframework.context.event.SimpleApplicati onEventMulticaster'
    [[email protected]] debug weaving 'org.springframework.context.event.AbstractApplica tionEventMulticaster'
    [[email protected]] debug weaving 'org.springframework.core.task.TaskExecutor'
    [[email protected]] debug weaving 'org.springframework.core.task.SyncTaskExecutor'
    [[email protected]] debug weaving 'org.springframework.context.ApplicationListener'
    [[email protected]] debug weaving 'org.springframework.beans.factory.SmartFactoryBea n'
    2008.05.15 16:17:29 istableBeanFactory preInstantiateSingletons
    INFO: Pre-instantiating singletons in [email protected]: defining beans [helloService,org.springframework.context.weaving.A spectJWeavingEnabler#0,loadTimeWeaver]; root of factory hierarchy
    [[email protected]] debug weaving 'org.springframework.context.event.SimpleApplicati onEventMulticaster$1'

    please help...

  • #2
    It's all working.I hade a conflict with my jar's.