Unable to locate appropriate constructor on class 。。。各路英雄快看看
软件环境hibernate3.2 Spring2.5
Unable to locate appropriate constructor on class
DAO代码如下:
String selectHql = "select new TUser(user.userId,user.TOrganization,user.userName,user.gender, user.duty, user.phone,user.address,user.createdDate,user.remark) from TUser as user ";
//取得当前页的数据
List datas = getSession().createQuery(selectHql)
.setFirstResult(offset)
.setMaxResults(pagesize)
.list();
实体类
TUser含有对应的构造参数。
public TUser(Integer userId, TOrganization TOrganization, String userName,
Integer gender, String duty, String phone, String address,
Timestamp createdDate, String remark) {
this.userId = userId;
this.TOrganization = TOrganization;
this.userName = userName;
this.gender = gender;
this.duty = duty;
this.phone = phone;
this.address = address;
this.createdDate = createdDate;
this.remark = remark;
}
到底是什么原因????无参构造,属性方法齐全。
大家支招!