Caused by: org.hibernate.QueryException: query must begin with SELECT or FROM:
来源:互联网 发布:淘宝网哥弟正品女装 编辑:程序博客网 时间:2024/06/05 21:51
hibernate写hql删除实体时,报这个错误
Caused by: org.hibernate.QueryException: query must begin with SELECT or FROM:
原因:
hibernate配置文件中解析hibernate查询语言为2.x版本,
即
org.
hibernate 配置文件hibernate.cfg.xml里 解析hibernate 查询语言为2.X版本,
即: 属性hibernate.query.factory_class 对应的值为org.hibernate.hql.classic.ClassicQueryTranslatorFactory
将值改为3.x
org.hibernate.hql.ast.ASTQueryTranslatorFactory
即可!
修改后又报另一个错误
nested exception is java.lang.NoClassDefFoundError: antlr/ANTLRException
这是因为3.x版本比2.x版本多了一个jar包:antlr-2.7.6.jar
0 0
- Caused by: org.hibernate.QueryException: query must begin with SELECT or FROM:
- org.hibernate.QueryException: query must begin with SELECT or FROM: delete
- org.hibernate.QueryException: query must begin with SELECT or FROM: delete
- org.hibernate.QueryException: query must begin with SELECT or FROM: delete
- query must begin with SELECT or FROM
- query must begin with SELECT or FROM: delete 错误解决方法
- query must begin with SELECT or FROM: delete
- Hibernate之update(2)——报错query must begin with SELECT or FROM
- org.hibernate.QueryException: addEntity() or addScalar() must be called on a sql query before executing the query 问题的解决
- org.hibernate.QueryException: addEntity() or addScalar() must be called on a sql query before executing the query
- org.hibernate.QueryException: query must……的解决方案
- Caused by: org.hibernate.QueryException: could not resolve property
- org.hibernate.QueryException: addEntity() or addScalar() must be called on a sql query before executing the qury 问题的解决
- Caused by: org.hibernate.QueryException: ClassNotFoundException: org.hibernate.hql.ast.HqlToken
- Caused by: org.hibernate.MappingException: must specify an identifier type:
- Hibernate 中报错 org.hibernate.QueryException: Incorrect query syntax
- Caused by: org.hibernate.PropertyNotFoundException:
- ssh整合Caused by: org.hibernate.HibernateException: 'hibernate.dialect' must be set when no Connection
- 'release' is unavailable: not available in automat
- FIFO和Binder读取数据效率测试对比结果
- 软件能正常反编译,但不做任何改动也无法打包回的问题
- 网络拥塞控制
- android httpClient 支持HTTPS的2种处理方式
- Caused by: org.hibernate.QueryException: query must begin with SELECT or FROM:
- uname:查阅系统与核心相关资讯
- 实现AJAX的基本步骤
- 也许--汪国真
- 基础练习 分解质因数
- tomcat embed technolog log (for product)
- OCP 1Z0 051 8
- git-push(1) Manual Page
- 服务器提交了协议冲突. Section=ResponseStatusLine