We are using the mix of annotation and xml configuration and we are facing issue of get bean class (DAO) -- spring 2.5

1. DAO class extends HibernateTemplate
2. Annotated DAO class
3. Try to invoke DAO.loadData()
4. Get null object exception.

Here is code sample:

Code:
@Repository
@Transactional
public class UserDaoImpl extends BaseHibernateDAO<TmUserPlan, Long> implements UserDao{
}
Try to call UserDaoImpl and autowire UserDao, none of them work:

Code:
-- not autowired , but configure bean class in xml file
public class ServiceImpl implements Service {
@Autowired UserDao userDao;

public void loadUsers(){
    userDao.loadUsers();  ---- failed -- null object.
}
}
Please share your thoughts if you handle the same situation.

thanks a lot.

Y