报错汇总1

报错集锦1
  nested exception is org.hibernate.hql.ast.QuerySyntaxException:
见天搞了那么久,原来
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
		Date date = java.sql.Date.valueOf(format.format(new Date()));
		String hql = "from EmpPrivilege where employeeId = " + employee_ID
				+ "and startTime <=" + date;
 

这段代码报错是因为 form后面跟的是个完整的类名,包括package.所以应该应该改为
 
com.ymjin.po.EmpPrivilege

这样就解决了

 org.springframework.dao.InvalidDataAccessResourceUsageException: could not execute query; nested exception is org.hibernate.exception.SQLGrammarException: could not execute query


这个问题的解决方案很简单,主要是因为数据库中不存在相关的表或者列
1 楼 finallygo 2010-11-18  
这个可以不用"完整的类名,包括package"啊,初步怀疑可能是配置文件有问题,或者是你有两个相同的类名
2 楼 yushl 2010-11-18  
不知所云,好吧,我承认我被标题误导了。。。。。。。。。。。
3 楼 yulidrff 2010-11-18  
好吧,我是来看楼主头像的。