ERROR org.hibernate.hql.internal.ast.ErrorCounter unexpected token: form 异常解决
ERROR org.hibernate.hql.internal.ast.ErrorCounter unexpected token: form 异常解决
根据异常提示:我找了我的MySQL语句:果然找到了

将FORM修改为FROM后运行就对了

这些都是粗心导致,希望我能记住这个错误。
我百度了一下,发现还有许多类似的错误
总结:
ERROR org.hibernate.hql.internal.ast.ErrorCounter :unexpected token: xxxx
解决办法:
1、首先检查自己的sql语句是否错写如(将xxxx错写成xxx)
2、检查关键字xxxx语句中是否漏写其他关键字如:and,
3、就是讲MySQL语句与hibernate的HQL语句弄混了,如MySQL语句中有limit,而hibernate中没有,它也不识别limit,要仔细查看对比自己的sql语句是否符合语法
ERROR org.hibernate.hql.internal.ast.ErrorCounter unexpected token: form 异常解决的更多相关文章
- org.hibernate.hql.internal.ast.QuerySyntaxException: XXX is not mapped
异常情况: 最近在把一个项目拆分多个 module 的时候数据库查询遇到这个异常:org.hibernate.hql.internal.ast.QuerySyntaxException: Identi ...
- SSH整合报错:org.hibernate.hql.internal.ast.QuerySyntaxException: User is not mapped[......]
非常诡异的报错,信息如下:org.hibernate.hql.internal.ast.QuerySyntaxException: User is not mapped [select count(* ...
- WebLogic使用SSH架构部署遇到org.hibernate.hql.internal.ast.HqlTok
其实这个问题在以前就遇到过,当时解决了,但今天在部署一个测试轻应用的时候一直没有想起来,特此记录一下. 这个问题出现在使用WebLogic(我使用的是10.3.5版本)发布SSH架构的应用.在操作数据 ...
- 继承映射中的java.lang.IllegalArgumentException: org.hibernate.hql.internal.ast.QuerySyntaxException: person is not mapped [FROM person]
继承映射中查询对象的过程中报错: java.lang.IllegalArgumentException: org.hibernate.hql.internal.ast.QuerySyntaxExcep ...
- java.lang.IllegalArgumentException: org.hibernate.hql.internal.ast.QuerySyntaxException: student is not mapped
Spring 5.0 +Jpa,使用@Query实现 自定义查询报错: java.lang.IllegalArgumentException: org.hibernate.hql.internal.a ...
- Spring Data JPA开发中遇到的问题1:org.hibernate.hql.internal.ast.QuerySyntaxException: DispatchShift is not mapped
org.hibernate.hql.internal.ast.QuerySyntaxException: T_D_SHIFT_DISPATCH is not mapped 错误原因: 没有映射到表,经 ...
- org.hibernate.hql.internal.ast.QuerySyntaxExceptionunexpected token: on near line 1
select d.content,count(s.status) from MesmachineStatus s , Mesmachinestatusdetail d where s.status=d ...
- org.hibernate.hql.internal.ast.QuerysyntaxException:user is not mapped [from User where user_code=? and user_password=?]
初学者,一个很低级的错误吧! 找不到映射,最后发现没把类的Hibernate映射文件 添加到Hibernate核心配置文件中去,所以报了这个异常! 在核心文件中添加映射 <mapping r ...
- JPA使用中遇到Caused by: org.hibernate.hql.internal.ast.QuerySyntaxException: XXX is not mapped
在写自定义查询时,Query注解中写的JPQL,表名和列名都应该是映射的Java类和属性,不能写表名或者字段名
随机推荐
- PL/SQL学习笔记之集合
一:PL/SQL集合 集合是一个有序且存有相同的类型数据的数据结构. PL/SQL提供了三种集合类型: 索引表(关联数组) 嵌套表 数组 二:索引表:一个索引表(也叫关联数组)是一组键 - 值对.每个 ...
- 全栈JavaScript之路(十九)HTML5 插入 html标记 ( 一 )innerHTML 与outerHTML
在须要给文档插入大量的html 标记下.通过DOM操作非常麻烦,你不仅要创建一系列的节点,并且还要小心地依照顺序把它们接结起来. 利用html 标签 插入技术,能够直接插入html代码字符串,简单.高 ...
- Rabbit五种消息队列学习(二) – 简单队列
队列结构图 P:消息的生产者 C:消息的消费者 红色:队列 生产者将消息发送到队列,消费者从队列中获取消息. 测试 1.连接MQ public static Connection getConnect ...
- C#设计模式 ---- 总结汇总
一.引言 C#版本的23种设计模式已经写完了,现在也到了一个该总结的时候了.说起设计模式,我的话就比较多了.刚开始写代码的时候,有需求就写代码来解决需求,如果有新的需求,或者需求变了,我就想当然的修改 ...
- spring mvc 传入中文参数乱码问题解决
一个简单的学习springmvc的demo中,当http请求传入中文参数时,在controller中接受到的参数就已经是乱码了,经百度一番解决方案如下: 1. get请求方式乱码解决 对于get方式, ...
- Atitit.如何文章写好 论文 文章 如何写好论文 技术博客
Atitit.如何文章写好 论文 文章 如何写好论文 技术博客 1. 原则 1 1.1. 有深度, 有广度 1 1.2. 业务通用性有通用性 尽可能向上抽象一俩层..业务通用性与语言通用性. 2 ...
- The best manual of how to use "The easiest Xdebug" addon for Firefox
Installation notes 0. Install the best Firefox add-on for remote debugging The easiest Xdebug. I'm n ...
- Asp.Net百度站长工具的主动推送功能
public static string PostUrl(string[] urls) { try { string formUrl = "http://data.zz.baidu.com/ ...
- git clone 后误删除了分离出来的文件怎么恢复?
git clone 后,会分离出项目的文件. 误删除了,可以使用以下命令恢复: #先检查一下git状态 git status #通过如下命令重新分离出文件 git checkout -f HEAD
- 树莓派mariadb 设置密码
参考: sudo mysql -u root -p select Host,User,plugin from mysql.user where User='root'; plugin(加密方式)是un ...