org.springframework.orm.hibernate3.HibernateQueryException: HIS_RET_PRD_INFO is not mapped [From HIS_RET_PRD_INFO where evt_usr = 'admin' and evt_cate = 'LGON' order by evt_timestamp desc ]; nested exception is org.hibernate.hql.ast.QuerySyntaxException: HIS_RET_PRD_INFO is not mapped [From HIS_RET_PRD_INFO where evt_usr = 'admin' and evt_cate = 'LGON' order by evt_timestamp desc ]
时间: 2024-04-06 09:30:22 浏览: 189
这个异常是由于 Hibernate 在解析 HQL 语句时找不到 HIS_RET_PRD_INFO 映射的表导致的。可能是因为在 Hibernate 的配置文件中没有正确配置 HIS_RET_PRD_INFO 实体类映射的表名,或者实体类中的表名与数据库中的表名不一致导致的。请检查 Hibernate 的配置文件和实体类的注解或 XML 配置文件,确保正确地映射了 HIS_RET_PRD_INFO 表。
相关问题
org.springframework.orm.hibernate3.HibernateQueryException: unexpected token: * near line 1, column 8 [Select * From com.matrix.common.table.his.His_ret_prd_info where evt_usr = 'admin' and evt_cate = 'LGON' AND EVT_TIMESTAMP >= TO_TIMESTAMP('2023-06-09 09:32:40.0', 'yyyy-mm-dd hh24:mi:ss.ff6') order by evt_timestamp desc ]; nested exception is org.hibernate.hql.ast.QuerySyntaxException: unexpected token: * near line 1, column 8 [Select * From com.matrix.common.table.his.His_ret_prd_info where evt_usr = 'admin' and evt_cate = 'LGON' AND EVT_TIMESTAMP >= TO_TIMESTAMP('2023-06-09 09:32:40.0', 'yyyy-mm-dd hh24:mi:ss.ff6') order by evt_timestamp desc ]
这是一个 HibernateQueryException 异常,意味着在查询语句中出现了错误。具体来说,在查询语句中出现了意外的符号“*”,并且它在语句的第一行第八个字符附近。此外,异常信息中还提到了一个嵌套异常 QuerySyntaxException,意味着 Hibernate 在解析查询语句时遇到了语法错误。建议检查查询语句是否正确,并且尝试删除该查询语句中的“*”符号,改为指定需要查询的具体字段。
阅读全文
相关推荐
![rar](https://img-home.csdnimg.cn/images/20241231044955.png)
![zip](https://img-home.csdnimg.cn/images/20241231045053.png)
![rar](https://img-home.csdnimg.cn/images/20241231044955.png)
![doc](https://img-home.csdnimg.cn/images/20241231044833.png)
![zip](https://img-home.csdnimg.cn/images/20241231045053.png)
![zip](https://img-home.csdnimg.cn/images/20241231045053.png)
![docx](https://img-home.csdnimg.cn/images/20241231044901.png)
![zip](https://img-home.csdnimg.cn/images/20241231045053.png)
![zip](https://img-home.csdnimg.cn/images/20241231045053.png)
![zip](https://img-home.csdnimg.cn/images/20241231045053.png)
![zip](https://img-home.csdnimg.cn/images/20241231045053.png)
![docx](https://img-home.csdnimg.cn/images/20241231044901.png)