Hi all,

 

I developed an Aspect library with @AspectJ syntax and I use it via CTW to 
weave an application. I know that because I used java compiler, aspectOf and 
hasAspect are not generated, so I tried to use Aspects utility class to 
instantiate Aspect classes in Spring.

 

Here is the Spring xml fragment:

…

<bean class="org.aspectj.lang.Aspects" id="outputMessageLogger" 
factory-method="aspectOf">

    <constructor-arg type="java.lang.Class" 
value="logging.OutputMessageLoggerAspect "/>

...

 

During startup this exception is thrown:

Factory method [public static java.lang.Object 
org.aspectj.lang.Aspects.aspectOf(java.lang.Class) throws 
org.aspectj.lang.NoAspectBoundException] threw exception; nested exception is 
org.aspectj.lang.NoAspectBoundException: Exception while initializing 
logging.OutputMessageLoggerAspect: java.lang.NoSuchMethodException: 
com.cadit.xas.aop.logging.OutputMessageLoggerAspect.aspectOf()

 

Is there something wrong in the way I use Aspects utility class?

 

Many thanks in advance,

Andrea

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

Reply via email to