I'm trying to upgrade an application to use the latest version of Spring. It currently uses Spring 3.0.7 and Hibernate 3.5.6. I'm able to successfully upgrade it to Spring 3.2.8, but if I upgrade it to Spring 4, I get compilation errors like the following:
[ERROR] /Users/mraible/dev/foo-upgrades/foo-core/src/main/java/com/company/foo/dao/companydb/impl/hibernate/InFaxDAOImpl.java:[71,82] incompatible types
[ERROR] required: java.util.List<com.company.foo.common.domain.FaxPage>
[ERROR] found: java.util.List<capture#49 of ?>
The method call looks like the following:
List<FaxPage> faxPages = getHibernateTemplate().findByNamedQueryAndNamedParam(queryName, hqlParams, values);
I can fix the compilation error by casting to the list type, but that doesn't seem right.
List<FaxPage> faxPages = (List<FaxPage>) getHibernateTemplate().findByNamedQueryAndNamedParam(queryName, hqlParams, values);
What is it about Spring 4 that breaks HibernateDaoSupport so it's not backwards compatible?
>when(...)` on your test fixtures.
– Zero Distraction Sep 10 '14 at 07:57