public List findobjectList(String sql)
{
//Session s=this.getHibernateTemplate().getSessionFactory().openSession();
Session s=this.getSession();
List list= s.createSQLQuery(sql).list();
releaseSession(s);
return list;
}select   distinct   cl.classesName,s.studentsNumber ,s.studentsName,aa.scoresNo,an.answersscore ,cd.count,kk.count  from  users u  right join  students s  on  s.studentsUserId=u.usersId  right  join  classes cl   on  s.classesId=cl.classesId left  join courses c  on cl.coursesid=c.coursesid  left join   academicyears a on c.academicyearsId=a.academicyearsId  left join   ( select sc.scoresNo,s.studentsId studentsId from students s,scores sc,scoreCatygorys scc   where  sc.studentsId=s.studentsId and  sc.scoreCategorysId=scc.scoreCategorysId and  scc.scoreCategoryName='期末成绩' ) aa on s.studentsId=aa.studentsId   left join (select count(*) count,s.studentsId studentsId  from attendances  a,students s,users u where   a.studentsId=s.studentsId and s.studentsUserId=u.usersId    and a.attendancesqk='旷课') kk on  s.studentsId=kk.studentsId    left  join answers an on an.studentsId=s.studentsId   left join (select count(*) count,s.studentsId studentsId from attendances  a,students s,users u  where   a.studentsId=s.studentsId and s.studentsUserId=u.usersId  and a.attendancesqk='迟到' ) cd  on s.studentsId=cd.studentsId where   a.usersId=2
这是sql语句!不知道是不是sql出问题了,还是哪里出问题了