Thanks for your suggestions.
I have been fighting with this all day and think I have found the solution. I went back through my Spring books and saw that they were passing the datasource to the sessionFactory in the applicationContext.
Code below:
Code:
<bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<!-- ADDED THIS PROPERTY: -->
<property name="dataSource"><ref bean="dataSource" /></property>
<property name="configLocation" value="classpath:hibernate.cfg.xml"></property>
</bean>
This code was originally generated by MyEclipse so I didn't think I would need to change it.
I have been repeatedly taking the line above out and putting it back and have been able to replicate the problem repeatedly so I am pretty sure it is the cause of the problem.
Thanks again for your help - it is much appreciated.