Dear all,
I have problems in struts1 web project on web logic 12.1.3.. It throw exception as below mention. Previously no problem but today it throws this.
public class SPropertyDAO extends BaseHibernateDAO {
public List findByProperty(
String propertyName, Object value) {
log.debug("finding SProperty instance with property: " + propertyName
+ ", value: " + value);
try {
String queryString = "from SProperty as model where model."
+ propertyName + "= ?";
Line 89 --> Query queryObject = getSession().createQuery(queryString);
<-- Throw exception here, 29 Jun 2017 16:20:36,218 [ERROR]
<-- (SPropertyDAO.java:93) - find by property name failed
<-- java.lang.NullPointerException
<-- at com.aeon.awip.hibernate.SPropertyDAO.findByProperty(SPropertyDAO.java:89)
queryObject.setParameter(0, value);
return queryObject.list();
} catch (RuntimeException re) {
log.error("find by property name failed", re);
throw re;
}
}
}
//-------------------------------------------------------------------
package com.aeon.awip.hibernate;
import org.hibernate.Session;
/**
* Data access object (DAO) for domain model
* @author MyEclipse Persistence Tools
*/
public class BaseHibernateDAO implements IBaseHibernateDAO {
public Session getSession() {
return HibernateSessionFactory.getSession();
}
}