SSH整合报错:org.hibernate.hql.ast.QuerySyntaxException: userinfo is not mapped [from userinfo]
来源:互联网 发布:mac找不到图片文件夹 编辑:程序博客网 时间:2024/06/08 14:24
报错信息:
org.hibernate.hql.ast.QuerySyntaxException: userinfo is not mapped [from userinfo]
可能原因:
1.Userinfo.hbm.xml配置文件没有加载到hibernate.cfg.xml的实体列表里面
2.Userinfo.hbm.xml配置文件文件的字段与数据库字段不一致,或者名称不一致导致
3.HQL语句不正确
public List<Userinfo> fenye(int page, int size ){
String hql = "from Userinfo";
List<Userinfo> list = hqldao.pageQuery(hql, page, size);
return list;
}
Userinfo是一个类,数据库的表名是 userinfo,不能写成 "from userinfo"
阅读全文
0 0
- SSH整合报错:org.hibernate.hql.ast.QuerySyntaxException: userinfo is not mapped [from userinfo]
- SSH报错:org.hibernate.hql.ast.QuerySyntaxException: User is not mapped [select o from User o where 1=1
- Hibernate查询报错:org.hibernate.hql.internal.ast.QuerySyntaxException: XXX is not mapped
- org.hibernate.hql.internal.ast.QuerySyntaxException: USER is not mapped 报错解决
- 使用hibernate的hql语句做查询报错 org.hibernate.hql.internal.ast.QuerySyntaxException: user is not mapped
- nested exception is org.hibernate.hql.ast.QuerySyntaxException: users is not mapped. [from users]
- nested exception is org.hibernate.hql.ast.QuerySyntaxException: Product is not mapped [from Product]
- org.hibernate.hql.ast.QuerySyntaxException is not mapped
- org.hibernate.hql.ast.QuerySyntaxException: myaddressbook is not mapped
- org.hibernate.hql.ast.QuerySyntaxException: Enroll is not mapped.
- org.hibernate.hql.ast.QuerySyntaxException: ? is not mapped
- org.hibernate.hql.ast.QuerySyntaxException:is not mapped
- org.hibernate.hql.ast.QuerySyntaxException: is not mapped 异常总结
- org.hibernate.hql.ast.QuerySyntaxException: is not mapped 异常总结 .
- org.hibernate.hql.ast.QuerySyntaxException is not mapped异常
- org.hibernate.hql.ast.QuerySyntaxException: Person is not mapped
- org.hibernate.hql.internal.ast.QuerySyntaxException: Exam is not mapped
- org.hibernate.hql.ast.QuerySyntaxException: UserType is not mapped
- HDU 2602 Bone Collector【01背包】
- 11。17 set
- Android MediaCodec 音频转码——硬编硬解
- 如何原样输出html标签
- U-net翻译
- SSH整合报错:org.hibernate.hql.ast.QuerySyntaxException: userinfo is not mapped [from userinfo]
- python: 迭代器 (Iterator)
- 欢迎使用CSDN-markdown编辑器
- caffe之blob_demo.cpp正常运行大法
- c学习笔记-作业-冒泡升序
- Mybatis 分页查询数据(借用map来封装参数)
- HDOJ 1016 Prime Ring Problem(DFS深度优先搜索)
- STM32加密库—ECC,ECDSA相关
- 第八章El表达式第四节el表达式对象操作