This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Using SPRING hibernate and JDBC templates in the same DAO

 
Gaurav tyagigaurav
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

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.

Thanks
Tyagi
 
St├ęphane Beaufort
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Java implemenation :



XML declaration :



 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic