Announcement Announcement Module
Collapse
No announcement yet.
java.lang.IllegalArgumentException: error at ::0 can't find referenced pointcut !!! Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • java.lang.IllegalArgumentException: error at ::0 can't find referenced pointcut !!!

    I have this aspect:

    Code:
    @Aspect
    public class mailAOP {
    	
    	@Pointcut("execution(* org.rol.services.ServizioStudente.aggiungiStudente(..))")
    	public void nuovoStudente(Studente studente){}
    		
    	@After("nuovoStudente(studente)")
    	public void messaggioRegistrazione(Studente studente){
    		System.out.println("HO CONCLUSO LA REGISTRAZIONE");
    	}
    }
    The ServizioStudente class is:
    Code:
    ...
    public boolean aggiungiStudente(Studente studente){.....}
    .....

    In xml...
    Code:
    ...
    <aop:aspectj-autoproxy/>
    <bean id="mailaop" class="org.rol.aop.mailAOP"/>
    ...
    I get by running:
    java.lang.IllegalArgumentException: error at ::0 can't find referenced pointcut nuovoStudente
    at org.aspectj.weaver.tools.PointcutParser.parsePoint cutExpression(PointcutParser.java:317)
    at org.springframework.aop.aspectj.AspectJExpressionP ointcut.buildPointcutExpression(AspectJExpressionP ointcut.java:195)
    at org.springframework.aop.aspectj.AspectJExpressionP ointcut.checkReadyToMatch(AspectJExpressionPointcu t.java:181)
    at org.springframework.aop.aspectj.AspectJExpressionP ointcut.getClassFilter(AspectJExpressionPointcut.j ava:162)
    at org.springframework.aop.support.AopUtils.canApply( AopUtils.java:202)
    at org.springframework.aop.support.AopUtils.canApply( AopUtils.java:256)
    at org.springframework.aop.support.AopUtils.findAdvis orsThatCanApply(AopUtils.java:288)

    why?
    thx
Working...
X