could not extract ResultSet; SQL [n/a]; nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet 错误原因是数据库存的和实体类写的不一致: 应该把30行转换成deptid ,就能正常取值了