Hi,
I have also the same problem.
Today only I tried using JSF/Sprng/Hibernate but when i use Dao isntance from the service implementation class i also get the Null Pointer Exception.
Below is the method from the LoginServiceImpl class:
private LoginDao loginDao;
public void setLoginDao(LoginDao loginDao)
{
this.loginDao = loginDao;
}
public User login(
String username, String password) throws Exception
{
User user = null;
try
{
user = this.loginDao.getUser(username);
...................
The configuration made in the applicationContext.xml is as follows
<!-- Login DAO object: Hibernate implementation -->
<bean id="loginDao" class="com.model.dao.hibernateimpl.LoginDaoHibernateImpl">
<property name="hibernateTemplate"><ref bean="hibernateTemplate"/></property>
</bean>
<!-- User Service Defintion -->
<bean id="loginService" class="com.model.service.impl.LoginServiceImpl">
<property name="loginDao"><ref local="loginDao"/></property>
</bean>
I will be also grateful if anyone figure out where am going wrong.
[ February 02, 2006: Message edited by: Sahil Saxena ]