Bug 349149

Summary: CDI Weld and AspectJ - org.jboss.weld.exceptions.UnproxyableResolutionException
Product: [Tools] AspectJ Reporter: Cosmin <cosminvacaroiu>
Component: CompilerAssignee: aspectj inbox <aspectj-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: major    
Priority: P3 CC: aclement
Version: 1.6.10   
Target Milestone: 1.6.12   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Cosmin CLA 2011-06-12 11:39:46 EDT
I get this error when using AspectJ and CDI.

org.jboss.weld.exceptions.UnproxyableResolutionException: WELD-001437 Normal scoped bean class myPackageName.myClassName is not proxyable because the type is final or it contains a final method static final java.lang.String myPackageName.myClassName.myMethodName_aroundBody0(myPackageName.myClassName.,org.aspectj.lang.JoinPoint).

This is because AspectJ somehow adds a final method in my class.
Andy suggested to  add the option to make them non-final (a compile time flag).

Thanks
Comment 1 Andrew Clement CLA 2011-06-13 14:22:34 EDT
new option committed.  -Xset:avoidFinal=true - this will avoid making the around advice infra methods final.  Should be in a dev build in the next day or so.