I have the following XML cross cutting definition in my context:
<bean name="/Details.htm" class="com.DetailServlet">
<property name="myPerfLogger" ref="perfLogger"></property>
</bean>
<bean id="perfLogger" class="com.PerformanceLogger"/>
<bean id="methodLogger" class="com.MethodLogger"/>
<aop:config>
<aop:pointcut id="loggingPointcut" expression="within(com..*)"/>
<aop:aspect id="loggingAspect" ref="methodLogger">
<aop:before method="methodEnterLog"
pointcut-ref="loggingPointcut" />
<aop:after-returning method="methodExitLog"
pointcut-ref="loggingPointcut" returning="returnValue" />
<aop:after-throwing method="methodExceptionLog"
pointcut-ref="loggingPointcut" throwing="exception" />
</aop:aspect>
</aop:config>
Where the PerformanceLogger class extends java.util.TreeMap. During startup of my server I get a complaint that the type of the proxy class is no longer the correct type for the myPerfLogger property (exception below). I'm using a WAS 6 jdk (jre 1.4) and spring version 2.5. If I remove the aop configuration, then the classes all load correctly and I'm able to access that class fully.
Caused by: java.lang.IllegalArgumentException: Cannot convert value of type [$Proxy21 implementing java.util.Map,java.lang.Cloneable,java.io.Serializable,org.springframework.aop.SpringProxy,org.springframework.aop.framework.Advised] to required type [com.PerformanceLogger] for property 'myPerfLogger': no matching editors or conversion strategy found at org.springframework.beans.TypeConverterDelegate.convertIfNecessary(TypeConverterDelegate.java:231) at org.springframework.beans.TypeConverterDelegate.convertIfNecessary(TypeConverterDelegate.java:138) at org.springframework.beans.BeanWrapperImpl.convertForProperty(BeanWrapperImpl.java:386)