I am using Spring with hibernate with jsf. I am getting null pointer exception when trying to get data from database. But when on first time load, my hibernateTemplate does contain value and can query data because the setSessionFactory is called to initialized. So how do I make the data source inject every time I query data from database?
My DaoImpl code are as below.
posted 11 years ago
Found that I need to get web application context to get Spring to inject the data source , something like below. Just want to know are there any other way to do this? Thanks.
The moth suit and wings road is much more exciting than taxes. Or this tiny ad: