I had same problem as vanhre asked in Spring forum, but in my case I couldn't change the constructor.
I'm using Spring java configuration, so it was initializing ok during jetty start, but in runtime, when I executed the functionality with my aspect it failed with exactly the same exception from the forum.
I found later, that I need aspectjrt dependency in my pom.
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjrt</artifactId>
<version>1.6.12</version>
</dependency>
edit: Missing dependency was an error, but real problem is Eclipse + aspects combination. When I used Eclipse to build my aspect class this error occurred. Additionally when I compiled class the aspect advice was for, aspect was not called.
solution: you have to use maven to build your application (I'd be glad if someone find solution for Eclipse, because I'm sure I'll forget this)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With