[
http://jira.jboss.com/jira/browse/JBAOP-589?page=all ]
Flavia Rainone updated JBAOP-589:
---------------------------------
Summary: Examples after-throwing and return-type are broken (was: Example
after-throwing is broken)
Description:
Apparently, some advice signature rule has changed and the examples were not updated. This
is the error I am getting with after-throwing example:
[java] Calling POJO->throwNothingMethod()
[java] ==================================
[java] Exception in thread "main"
org.jboss.aop.advice.NoMatchingAdviceException: No matching after-throwing advice called
'afterThrowingArg' could be found in Aspect for joinpoint Method[method=public
void POJO.throwNothingMethod()]
[java] On method 'public void
Aspect.afterThrowingArg(java.lang.Throwable,java.lang.String)'
[java] joinpoint has no arguments; unexpected @Arg-annotated parameter found
[java] at
org.jboss.aop.advice.annotation.AdviceMethodFactory.findAdviceMethod(AdviceMethodFactory.java:295)
[java] at
org.jboss.aop.instrument.JoinPointGenerator$AdviceSetups.<init>(JoinPointGenerator.java:1611)
[java] at
org.jboss.aop.instrument.JoinPointGenerator.initialiseAdviceInfosAndAddFields(JoinPointGenerator.java:537)
[java] at
org.jboss.aop.instrument.JoinPointGenerator.generateJoinpointClass(JoinPointGenerator.java:367)
[java] at
org.jboss.aop.instrument.JoinPointGenerator.doGenerateJoinPointClass(JoinPointGenerator.java:285)
[java] at
org.jboss.aop.instrument.JoinPointGenerator.access$300(JoinPointGenerator.java:77)
[java] at
org.jboss.aop.instrument.JoinPointGenerator$GenerateJoinPointClassAction$2.generateJoinPointClass(JoinPointGenerator.java:1729)
[java] at
org.jboss.aop.instrument.JoinPointGenerator.generateJoinPointClass(JoinPointGenerator.java:250)
[java] at
org.jboss.aop.GeneratedClassAdvisor.generateJoinPointClass(GeneratedClassAdvisor.java:1035)
[java] at
POJO$POJOAdvisor.throwNothingMethod_N_4745311337522673317(POJO$POJOAdvisor.java)
[java] at POJO.throwNothingMethod(POJO.java)
[java] at Driver.main(Driver.java:42)
And this is the example I am getting with return-type:
_run.loadtime.50:
[java]
[java] Calling POJO->getIntValue()
[java] ===========================
[java] >>> aroundDefaultSignature...
[java] >>> aroundAnnotatedParam...
[java] RUNNING POJO->getIntValue(): return 10
[java] <<< aroundAnnotatedParam: returning 5000
[java] <<< aroundDefaultSignature: returning invocation.invokeNext()
[java] >>> afterOverwriteReturnValue: returning 5000/5
[java] >>> afterVoid
[java] RECEIVED type:int value:1000
[java]
[java] Calling POJO->getList()
[java] =======================
[java] Exception in thread "main"
org.jboss.aop.advice.NoMatchingAdviceException: No matching around advice called
'aroundCollection' could be found in Aspect for joinpoint Method[method=public
java.util.List POJO.getList()]
[java] at
org.jboss.aop.advice.annotation.AdviceMethodFactory.findAdviceMethod(AdviceMethodFactory.java:283)
[java] at
org.jboss.aop.instrument.JoinPointGenerator$AdviceSetups.<init>(JoinPointGenerator.java:1611)
[java] at
org.jboss.aop.instrument.JoinPointGenerator.initialiseAdviceInfosAndAddFields(JoinPointGenerator.java:537)
[java] at
org.jboss.aop.instrument.JoinPointGenerator.generateJoinpointClass(JoinPointGenerator.java:367)
[java] at
org.jboss.aop.instrument.JoinPointGenerator.doGenerateJoinPointClass(JoinPointGenerator.java:285)
[java] at
org.jboss.aop.instrument.JoinPointGenerator.access$300(JoinPointGenerator.java:77)
[java] at
org.jboss.aop.instrument.JoinPointGenerator$GenerateJoinPointClassAction$2.generateJoinPointClass(JoinPointGenerator.java:1729)
[java] at
org.jboss.aop.instrument.JoinPointGenerator.generateJoinPointClass(JoinPointGenerator.java:250)
[java] at
org.jboss.aop.GeneratedClassAdvisor.generateJoinPointClass(GeneratedClassAdvisor.java:1035)
[java] at POJO$POJOAdvisor.getList_N_8997970376427247813(POJO$POJOAdvisor.java)
[java] at POJO.getList(POJO.java)
[java] at Driver.main(Driver.java:38)
was:
Apparently, some advice signature rule has changed and the example was not updated. This
is the error I am getting:
[java] Calling POJO->throwNothingMethod()
[java] ==================================
[java] Exception in thread "main"
org.jboss.aop.advice.NoMatchingAdviceException: No matching after-throwing advice called
'afterThrowingArg' could be found in Aspect for joinpoint Method[method=public
void POJO.throwNothingMethod()]
[java] On method 'public void
Aspect.afterThrowingArg(java.lang.Throwable,java.lang.String)'
[java] joinpoint has no arguments; unexpected @Arg-annotated parameter found
[java] at
org.jboss.aop.advice.annotation.AdviceMethodFactory.findAdviceMethod(AdviceMethodFactory.java:295)
[java] at
org.jboss.aop.instrument.JoinPointGenerator$AdviceSetups.<init>(JoinPointGenerator.java:1611)
[java] at
org.jboss.aop.instrument.JoinPointGenerator.initialiseAdviceInfosAndAddFields(JoinPointGenerator.java:537)
[java] at
org.jboss.aop.instrument.JoinPointGenerator.generateJoinpointClass(JoinPointGenerator.java:367)
[java] at
org.jboss.aop.instrument.JoinPointGenerator.doGenerateJoinPointClass(JoinPointGenerator.java:285)
[java] at
org.jboss.aop.instrument.JoinPointGenerator.access$300(JoinPointGenerator.java:77)
[java] at
org.jboss.aop.instrument.JoinPointGenerator$GenerateJoinPointClassAction$2.generateJoinPointClass(JoinPointGenerator.java:1729)
[java] at
org.jboss.aop.instrument.JoinPointGenerator.generateJoinPointClass(JoinPointGenerator.java:250)
[java] at
org.jboss.aop.GeneratedClassAdvisor.generateJoinPointClass(GeneratedClassAdvisor.java:1035)
[java] at
POJO$POJOAdvisor.throwNothingMethod_N_4745311337522673317(POJO$POJOAdvisor.java)
[java] at POJO.throwNothingMethod(POJO.java)
[java] at Driver.main(Driver.java:42)
Examples after-throwing and return-type are broken
--------------------------------------------------
Key: JBAOP-589
URL:
http://jira.jboss.com/jira/browse/JBAOP-589
Project: JBoss AOP
Issue Type: Bug
Security Level: Public(Everyone can see)
Affects Versions: 2.0.0.CR11
Reporter: Flavia Rainone
Assigned To: Flavia Rainone
Fix For: 2.0.0.GA
Apparently, some advice signature rule has changed and the examples were not updated.
This is the error I am getting with after-throwing example:
[java] Calling POJO->throwNothingMethod()
[java] ==================================
[java] Exception in thread "main"
org.jboss.aop.advice.NoMatchingAdviceException: No matching after-throwing advice called
'afterThrowingArg' could be found in Aspect for joinpoint Method[method=public
void POJO.throwNothingMethod()]
[java] On method 'public void
Aspect.afterThrowingArg(java.lang.Throwable,java.lang.String)'
[java] joinpoint has no arguments; unexpected @Arg-annotated parameter found
[java] at
org.jboss.aop.advice.annotation.AdviceMethodFactory.findAdviceMethod(AdviceMethodFactory.java:295)
[java] at
org.jboss.aop.instrument.JoinPointGenerator$AdviceSetups.<init>(JoinPointGenerator.java:1611)
[java] at
org.jboss.aop.instrument.JoinPointGenerator.initialiseAdviceInfosAndAddFields(JoinPointGenerator.java:537)
[java] at
org.jboss.aop.instrument.JoinPointGenerator.generateJoinpointClass(JoinPointGenerator.java:367)
[java] at
org.jboss.aop.instrument.JoinPointGenerator.doGenerateJoinPointClass(JoinPointGenerator.java:285)
[java] at
org.jboss.aop.instrument.JoinPointGenerator.access$300(JoinPointGenerator.java:77)
[java] at
org.jboss.aop.instrument.JoinPointGenerator$GenerateJoinPointClassAction$2.generateJoinPointClass(JoinPointGenerator.java:1729)
[java] at
org.jboss.aop.instrument.JoinPointGenerator.generateJoinPointClass(JoinPointGenerator.java:250)
[java] at
org.jboss.aop.GeneratedClassAdvisor.generateJoinPointClass(GeneratedClassAdvisor.java:1035)
[java] at
POJO$POJOAdvisor.throwNothingMethod_N_4745311337522673317(POJO$POJOAdvisor.java)
[java] at POJO.throwNothingMethod(POJO.java)
[java] at Driver.main(Driver.java:42)
And this is the example I am getting with return-type:
_run.loadtime.50:
[java]
[java] Calling POJO->getIntValue()
[java] ===========================
[java] >>> aroundDefaultSignature...
[java] >>> aroundAnnotatedParam...
[java] RUNNING POJO->getIntValue(): return 10
[java] <<< aroundAnnotatedParam: returning 5000
[java] <<< aroundDefaultSignature: returning invocation.invokeNext()
[java] >>> afterOverwriteReturnValue: returning 5000/5
[java] >>> afterVoid
[java] RECEIVED type:int value:1000
[java]
[java] Calling POJO->getList()
[java] =======================
[java] Exception in thread "main"
org.jboss.aop.advice.NoMatchingAdviceException: No matching around advice called
'aroundCollection' could be found in Aspect for joinpoint Method[method=public
java.util.List POJO.getList()]
[java] at
org.jboss.aop.advice.annotation.AdviceMethodFactory.findAdviceMethod(AdviceMethodFactory.java:283)
[java] at
org.jboss.aop.instrument.JoinPointGenerator$AdviceSetups.<init>(JoinPointGenerator.java:1611)
[java] at
org.jboss.aop.instrument.JoinPointGenerator.initialiseAdviceInfosAndAddFields(JoinPointGenerator.java:537)
[java] at
org.jboss.aop.instrument.JoinPointGenerator.generateJoinpointClass(JoinPointGenerator.java:367)
[java] at
org.jboss.aop.instrument.JoinPointGenerator.doGenerateJoinPointClass(JoinPointGenerator.java:285)
[java] at
org.jboss.aop.instrument.JoinPointGenerator.access$300(JoinPointGenerator.java:77)
[java] at
org.jboss.aop.instrument.JoinPointGenerator$GenerateJoinPointClassAction$2.generateJoinPointClass(JoinPointGenerator.java:1729)
[java] at
org.jboss.aop.instrument.JoinPointGenerator.generateJoinPointClass(JoinPointGenerator.java:250)
[java] at
org.jboss.aop.GeneratedClassAdvisor.generateJoinPointClass(GeneratedClassAdvisor.java:1035)
[java] at POJO$POJOAdvisor.getList_N_8997970376427247813(POJO$POJOAdvisor.java)
[java] at POJO.getList(POJO.java)
[java] at Driver.main(Driver.java:38)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira