Hi,
I am new to AOP and have been trying for a while to get this working so any help would be...well, helpful.
I have a domain object which I have annotated with @Configurable.
I have included this domain object in the spring-beans file and set the scope to prototype. I have also been foreced to make it abstract=true, otherwise I get an error that the class could not be constructed (as there is no no-arg constructor) .
My Spring beans file includes the XML <context:spring-configured/>
I have a aop.xml file in META-INF with the following options
I have put the following plugin into my Maven POMCode:<!DOCTYPE aspectj PUBLIC "-//AspectJ//DTD//EN" "http://www.eclipse.org/aspectj/dtd/aspectj.dtd"> <aspectj> <weaver options="-verbose -Xset:weaveJavaxPackages=true"> <include within="x.y.z.*"/> </weaver> </aspectj>
And I have set up a test case - which I run with the param : -javaagent:c:/tmp/aspectjweaver-1.6.8.jarCode:<plugins> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>aspectj-maven-plugin</artifactId> <configuration> <source>1.5</source> <target>1.5</target> <aspectLibraries> <aspectLibrary> <groupId>org.springframework</groupId> <artifactId>spring-aspects</artifactId> </aspectLibrary> </aspectLibraries> </configuration> <executions> <execution> <goals> <goal>compile</goal> <!-- use this goal to weave all your main classes --> <goal>test-compile</goal> <!-- use this goal to weave all your test classes --> </goals> </execution> </executions> </plugin>
When I run my test I am able to step through the code and see that AspectJ does indeed intercept my construcuted object, and it does inject the correct property into the object.
Unfortunately it fails on BeanConfigurerSupport.checkExposedObject The error message is:
Can anyone please help me? I really really want to get this working and I'm so close....Code:Post-processor tried to replace bean instance of type [x.y.z.StructureStorageImpl] with (proxy) object of type [$Proxy31] - not supported for aspect-configured classes!


Reply With Quote