Using SPRING hibernate and JDBC templates in the same DAO
posted 7 years ago
I have a DAO implementation as:
Now I need to fetch some data using SPRING JDBC template in the same DAO implementation. I am working on a running application and it uses both SPRING hibernate and JDBC template for DAO implementations but never in the same DAO implementor. The usage i have seen for JDBC template in my app is sth. like:
As we cannot extend 2 classes in JAVA so i tried instantiating SimpleJdbcDaoSupport and using it as:
This gives me a null pointer exception at queryForObject line.
Any pointers as to what i might e doing wrong here would be greatly appreciated.