Search code examples
java-ee-6aspectjcdijboss-weld

CDI Weld and AspectJ - org.jboss.weld.exceptions.UnproxyableResolutionException


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).

If I remove AspectJ it works, but I don't want that. Please Help.


Solution

  • I got an answer from AspectJ's mailing list, they proposed adding a compile time flag if the method should be final or not, as a workaround. Thanks.