处理异常:org.hibernate.hql.internal.ast.QuerySyntaxException
2016-12-20 00:00
316 查看
异常信息
使用HibernateTemplate的hql语句查询时,出现以下情况:org.hibernate.hql.internal.ast.QuerySyntaxException: unexpected token: member near line 1, column 6 [from member where name=?]
分析处理
这是因为hql语句中的 member 是数据库中表的名字,应该改为对应实体类的名称。备注:本帖来自hi_jade,本着程序员的专业精神学习、整理、编写、分享,并持续完善,知识无价,请以诚实严谨的态度对待本文,尊重他人劳动成果,如转载请注明来源,欢迎批评指正!
个人博客地址:https://my.oschina.net/jiangyf
GitHub地址:https://github.com/github-jade
相关文章推荐
- Caused by: org.hibernate.hql.internal.ast.QuerySyntaxException: person is not Mapped问题解决
- org.hibernate.hql.internal.ast.QuerySyntaxException: XXX is not mapped [from XXX]
- org.hibernate.hql.internal.ast.QuerySyntaxException: Exam is not mapped
- org.hibernate.hql.internal.ast.QuerySyntaxException: unexpected token: u near line 1, column 55 [fro
- 出现org.hibernate.hql.internal.ast.QuerySyntaxException: goodsinfo is not mapped [from goodsinfo错误
- 异常积累:org.hibernate.hql.internal.ast.QuerySyntaxException: unexpected token:
- 异常收集-org.hibernate.hql.internal.ast.QuerySyntaxException: activityinfo is not mapped
- org.hibernate.hql.internal.ast.QuerySyntaxException: appUser is not mapped
- org.hibernate.hql.internal.ast.QuerySyntaxException(1)
- 关于hibernate中的错误:Exception in thread "main" org.hibernate.hql.internal.ast.QuerySyntaxException: tb_e
- org.hibernate.hql.internal.ast.QuerySyntaxException: XXXXis not mapped [from XXXX]
- Exception in thread "main" org.hibernate.hql.internal.ast.QuerySyntaxException: unexpected token:
- org.hibernate.hql.internal.ast.QuerySyntaxException: userinfo is not mapped [from userinfo u where u
- org.hibernate.hql.internal.ast.QuerySyntaxException: USER is not mapped 报错解决
- org.hibernate.hql.internal.ast.QuerySyntaxException
- Hibernate查询报错:org.hibernate.hql.internal.ast.QuerySyntaxException: XXX is not mapped
- org.hibernate.hql.internal.ast.QuerySyntaxException: table is not mapped
- exception is org.hibernate.hql.internal.ast.QuerySyntaxException: Driver is not mapped...的坑
- org.hibernate.hql.internal.ast.QuerySyntaxException: unexpected token: * near line 1, column 8
- Caused by: org.hibernate.hql.internal.ast.QuerySyntaxException: Student is not mapped