Announcement Announcement Module
No announcement yet.
@configurable & Exception in Post-processor Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • @configurable & Exception in Post-processor


    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
    <!DOCTYPE aspectj PUBLIC "-//AspectJ//DTD//EN" 
    	 <weaver options="-verbose -Xset:weaveJavaxPackages=true">
              <include  within="x.y.z.*"/>
    I have put the following plugin into my Maven POM
    					<!-- use this goal to weave all your main classes -->
    					<!-- use this goal to weave all your test classes -->
    And I have set up a test case - which I run with the param : -javaagent:c:/tmp/aspectjweaver-1.6.8.jar

    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:

    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!
    Can anyone please help me? I really really want to get this working and I'm so close....

  • #2

    I have the cause, but not the solution.......

    <tx:annotation-driven transaction-manager="transactionManager"/>

    Causes this to happen.....The domain object I am creating contains beans which contain DAO's and transationctional annotations......

    Still looking for a solution to the problem though....


    • #3

      <tx:annotation-driven transaction-manager="transactionManager" mode="aspectj"/>