Try by removing pjp from the list of argNames, and certainly the object
profiled must be a parameter of the advice doStuff
 

Cordialement / Best regards

Jean-Louis Pasturel


 


  _____  

De : aspectj-users-boun...@eclipse.org
[mailto:aspectj-users-boun...@eclipse.org] De la part de Stephan Knitelius
Envoyé : samedi 16 avril 2011 14:01
À : aspectj-users@eclipse.org
Objet : [aspectj-users] Cannot register non aspect JDK 1.7


Hi, 

I have just started playing with aspectj, I am really stuck on this error:

Cannot register non aspect: com$knitelius$aspect7$AOPMonitor ,
com.knitelius.aspect7.AOPMonitor
java.lang.RuntimeException: Cannot register non aspect:
com$knitelius$aspect7$AOPMonitor , com.knitelius.aspect7.AOPMonitor

AOPMonitor looks as follows (I am using 1.6.10)

@Aspect
public class AOPMonitor {
    
    @Around(value = "execution(* *(..)) && @annotation(profiled)", argNames
= "pjp,profiled")
    public Object doStuff(final ProceedingJoinPoint pjp) throws Throwable {
        System.out.println("point cut!!!");
        return pjp.proceed();
    }
}

Any help would be greatly appreciated.

Thanks in advanced,

Stephan

______________________________________
Stephan Knitelius
step...@knitelius.com



********************************************************************************
IMPORTANT.Les informations contenues dans ce message electronique y compris les 
fichiers attaches sont strictement confidentielles
et peuvent etre protegees par la loi.
Ce message electronique est destine exclusivement au(x) destinataire(s) 
mentionne(s) ci-dessus.
Si vous avez recu ce message par erreur ou s il ne vous est pas destine, 
veuillez immediatement le signaler  a l expediteur et effacer ce message 
et tous les fichiers eventuellement attaches.
Toute lecture, exploitation ou transmission des informations contenues dans ce 
message est interdite.
Tout message electronique est susceptible d alteration.
A ce titre, le Groupe France Telecom decline toute responsabilite notamment s 
il a ete altere, deforme ou falsifie.
De meme, il appartient au destinataire de s assurer de l absence de tout virus.

IMPORTANT.This e-mail message and any attachments are strictly confidential and 
may be protected by law. This message is
intended only for the named recipient(s) above.
If you have received this message in error, or are not the named recipient(s), 
please immediately notify the sender and delete this e-mail message.
Any unauthorized view, usage or disclosure ofthis message is prohibited.
Since e-mail messages may not be reliable, France Telecom Group shall not be 
liable for any message if modified, changed or falsified.
Additionally the recipient should ensure they are actually virus free.
********************************************************************************

_______________________________________________
aspectj-users mailing list
aspectj-users@eclipse.org
https://dev.eclipse.org/mailman/listinfo/aspectj-users

Reply via email to