
Originally Posted by
Dave Syer
If SampleManager has an interface it will work out of the box. Otherwise you need to enable proxy-target-class in your tx config. please cross post in the Spring Framework Forum for more help (it's nothing to do with Batch).
Confirmed.
Your class must implement an interface. I encountered the same issue when assigning a <util:map> with <String, MyCustomClass> to my service class. I've applied AOP but Spring keeps throwing a "no matching editors or conversions strategy found" exception.
It turns out my service class has a map property that doesn't use an interface. For example, Map<String, MyCustomClass>. I changed it to an interface: Map<String, ICustomClass>. (Of course you need to create the interface which is trivial).
Code:
<bean id="versionService" class="my.service.VersionService"
p:animalDAOMap-ref="animalDAOMap" />
<util:map id="animalDAOMap">
<entry key="dog" value-ref="dogDAO"/>
<entry key="cat" value-ref="catDAO"/>
<entry key="monkey" value-ref="monkeyDAO"/>
</util:map>
On my VersionService, I have an animalDAOMap property declared as
Code:
private Map animalDAOMap<String, CustomDAO>
CustomDAO is not an interface! This works fine but when applying AOP, I get the error. Solution: You must convert the CustomDAO to an interface!