Actually, the HibernateDaoSupport Javadoc says:
Convenient super class for Hibernate data access objects.
Requires a SessionFactory to be set, providing a HibernateTemplate based on it to subclasses. Can alternatively be initialized directly via a HibernateTemplate, to reuse the latter's settings like SessionFactory, exception translator, flush mode, etc.
This base class is mainly intended for HibernateTemplate usage but can also be used when working with SessionFactoryUtils directly, e.g. in combination with HibernateInterceptor-managed Sessions. Convenience getSession and releaseSession methods are provided for that usage style.
This class will create its own HibernateTemplate if only a SessionFactory is passed in. The allowCreate flag on that HibernateTemplate will be true by default. A custom HibernateTemplate instance can be used through overriding createHibernateTemplate.
So the configuration you've used should work without having to manually inject a HibernateTemplate. This technique is standard and is demonstrated in the PetClinic sample app. All the DaoSupport classes work this way. Perhaps something else is missing that is causing the NPE. Maybe
you should post the full stack trace.
BTW, DriverManagerDataSource is not a pooling DataSource and is meant primarily for
testing. PetClinic shows alternative DataSource definitions that provide pooled Connections you can use in a production environment.
kktec<br />SCJP, SCWCD, SCJD<br />"What we observe is not nature itself, but nature exposed to our method of questioning." - Werner Heisenberg