File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Spring and the fly likes Using SPRING hibernate and JDBC templates in the same DAO Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Using SPRING hibernate and JDBC templates in the same DAO" Watch "Using SPRING hibernate and JDBC templates in the same DAO" New topic
Author

Using SPRING hibernate and JDBC templates in the same DAO

Gaurav tyagigaurav
Greenhorn

Joined: Jul 30, 2008
Posts: 15
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

Joined: Nov 18, 2008
Posts: 1
Java implemenation :



XML declaration :



 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Using SPRING hibernate and JDBC templates in the same DAO
 
Similar Threads
Error: Error registering bean with name 'transactionManager'
org.hibernate.MappingException: Unknown entity:
Sychronization problem with hibernate and weblogic 9.2 JTA
Hibernate problem
Error: Hibernate operation: could not retrieve snapshot