I suspect that if ProdMiscDAO was an interface (is that?), You would not have this error. I believe that you probably have a class that receives proxies using cglib under the hood, doing magic, etc., And in the end it cannot be safely dropped to a parameter in the setter or constructor. Try programming in the interface and see if the error disappears.
Update: ProdMiscDAO not an interface. This is a class that extends SqlMappedClientDaoSupport .
Given this, I recommend trying the following:
- Rename
ProdMiscDAO to SqlMappedProdMiscDAO . - Extract the interface from
SqlMappedProdMiscDAO named ProdMiscDAO (for example, " class SqlMappedProdMiscDAO implements ProdMiscDAO ") - Go through all the code that uses
SqlMappedProdMiscDAO and change it to use ProdMiscDAO . - Configure spring to instantiate
SqlMappedProdMiscDAO , passing all the classes that need it.
This allows your DAO implementation to continue to extend SqlMappedClientDaoSupport , as well as have an interface. After switching all classes to using the interface instead of the spring class, you will not need to use cglib for the proxy server of your DAO, and the error should disappear.
Single shot
source share