This content has been marked as final.
Show 2 replies
-
1. Re: Exception on call pointcut
kabirkhan Sep 28, 2005 5:06 AM (in response to chlabreu)Hmm, it should work. Do you have a simple code example demonstrating the behaviour?
-
2. Re: Exception on call pointcut
chlabreu Oct 14, 2005 6:07 PM (in response to chlabreu)The (not so obvious to me) problem is that I was using MethodInvocation where I should use MethodCalledByMethodInvocation in advice declararion parameter. But now I'm having a new problem. If I switch from execution to call pointcuts an exception is thrown from the constructor of the calling class if the class has a superclass wich gets the same advice binding (it calls the method too but not inside constructor).
Caused by: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.RuntimeException: for class: xxx.xxx.SUF at org.jboss.aop.ClassAdvisor.resolveCallerMethodInfo(ClassAdvisor.java:1311) at xxx.xxx.CadastroUF.<clinit>(CadastroUF.java) ... 25 more Caused by: java.lang.RuntimeException: java.lang.RuntimeException: for class: xxx.xxx.SUF at org.jboss.aop.pointcut.CallMatcher.visit(CallMatcher.java:60) at org.jboss.aop.pointcut.ast.ASTCall.jjtAccept(ASTCall.java:21) at org.jboss.aop.pointcut.MatcherHelper.visit(MatcherHelper.java:77) at org.jboss.aop.pointcut.MatcherHelper.matches(MatcherHelper.java:72) at org.jboss.aop.pointcut.PointcutExpression.matchesCall(PointcutExpression.java:209) at org.jboss.aop.ClassAdvisor.resolveCallerMethodInfo(ClassAdvisor.java:1297) ... 26 more Caused by: java.lang.RuntimeException: for class: xxx.xxx.SUF at org.jboss.aop.AspectManager.getTempClassAdvisorIfNotExist(AspectManager.java:984) at org.jboss.aop.pointcut.CallMatcher.visit(CallMatcher.java:53) ... 31 more Caused by: java.lang.NoSuchFieldException: aop$classAdvisor$aop at java.lang.Class.getDeclaredField(Class.java:1854) at org.jboss.aop.AspectManager.getTempClassAdvisorIfNotExist(AspectManager.java:978) ... 32 more