Hibernate或者ssh三大框架中出现 XXXX is not mapped问题
来源:互联网 发布:windows微信是什么 编辑:程序博客网 时间:2024/06/10 23:17
Hibernate或者ssh三大框架中出现 XXXX is not mapped问题
错误异常信息:
org.springframework.orm.hibernate3.HibernateQueryException: loginUser is not mapped [from loginUser order by userId]; nested exception is org.hibernate.hql.ast.QuerySyntaxException: loginUser is not mapped [from loginUser order by userId]
org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:664)
org.springframework.orm.hibernate3.HibernateAccessor.convertHibernateAccessException(HibernateAccessor.java:412)
org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:411)
org.springframework.orm.hibernate3.HibernateTemplate.executeWithNativeSession(HibernateTemplate.java:374)
org.springframework.orm.hibernate3.HibernateTemplate.find(HibernateTemplate.java:912)
org.springframework.orm.hibernate3.HibernateTemplate.find(HibernateTemplate.java:904)
com.data.dao.LoginMapDao.getAll(LoginMapDao.java:14)
com.data.service.LoginService.getAll(LoginService.java:20)
com.data.action.LoginAction.list(LoginAction.java:40)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
.......................................................
错误原因是这样的:
public List<Person> queryAllResulit() {// TODO Auto-generated method stub//这里的表面必须是和实体类中的类名是一样的,而不是和数据库表名一样String hql ="from person";List<Person> listperson = this.getHibernateTemplate().find(hql);return listperson;}
解决方案分析:你所查询的表名,是数据库的表。实际上这里要写实体类名(ssh中称持久化类名)
你改成你的实体类名就好了
- Hibernate或者ssh三大框架中出现 XXXX is not mapped问题
- SSH框架中hibernate 出现 user is not mapped 问题
- Hibernate 中出现 XXXX is not mapped 问题
- Hibernate 中出现 XXXX is not mapped 问题
- SSHE框架中hibernate出现user is not mapped问题
- Hibernate 中出现 users is not mapped 问题
- Hibernate 中出现 users is not mapped 问题
- Hibernate 中出现 users is not mapped 问题
- Hibernate 中出现 users is not mapped 问题
- Hibernate 中出现 GOOD is not mapped 问题
- hibernate 出现 is not mapped 问题
- hibernate 出现***is not mapped
- hibernate:运行时出现user is not mapped问题
- 解决Hibernate使用HQL查询出现is not mapped问题
- Hibernate 中出现 QuerySyntaxException: users is not mapped
- Hibernate 中出现 xxx表 is not mapped xxx的问题
- 关于在SSH框架整合时,使用hql语句查询出现 XXX is not mapped 的问题
- 关于hibernate的is not mapped问题
- JavaScript innerHTML的用法
- [MFC] 获取网页源代码
- 堆排序
- poj_1338
- 风雨程序路(一)
- Hibernate或者ssh三大框架中出现 XXXX is not mapped问题
- LeetCode Median of Two Sorted Arrays
- 关于Android Studio的Import Sample
- 杭电 5592 ZYB's Premutation(线段树求第k大数)
- Ubuntu下安装matlab应用程序图文教程(详细 全面)
- 网页中多个图标在一张图片上,使用css将各图标显示
- 模拟键盘效果页面
- HttpServlet cannot be resolved to a type
- java基础(包)