配置没有问题,登录的时候出错,后台提示这个错,如何解决

来源:2-2 SSH-案例:登录功能代码实现

曾许诺_殇

2016-11-09 16:14

ERROR - Exception occurred during processing request: tb_staff is not mapped [from tb_staff where username=? and password=?]; nested exception is org.hibernate.hql.ast.QuerySyntaxException: tb_staff is not mapped [from tb_staff where username=? and password=?]

写回答 关注

5回答

  • 慕粉4348652
    2016-11-19 12:10:13
    已采纳

    from后面是实体名o(╯□╰)o

  • 慕粉4348652
    2016-11-19 12:01:09

    搞错,是from 后面 表名首字母大写或者是别的原因,反正我遇到同样问题是这样解决的

  • 慕粉4348652
    2016-11-19 11:35:49

    hql语句:from 表名,这里的表名是映射文件名

    伪何_殇訫

    谢谢,但是我很不理解为什么要写表名 以前都是数据库里的名字呢

    2016-12-02 16:02:21

    共 1 条回复 >

  • 曾许诺_殇
    2016-11-14 10:03:58

    值都对上了,但还是提示这个错误ERROR - Exception occurred during processing request: tb_staff is not mapped [from tb_staff where username=? and password=?]; nested exception is org.hibernate.hql.ast.QuerySyntaxException: tb_staff is not mapped [from tb_staff where username=? and password=?]

  • lichen1391
    2016-11-11 09:25:43

    username和password的值对上了吗,都传递到hql语句中了吗

基于SSH实现员工管理系统之案例实现篇

SSH框架整合案例之实现篇,手把手带你实现员工管理系统

50209 学习 · 346 问题

查看课程

相似问题