今天在写hql语句的时候出现了这个错误,然后一直运行到执行hql这儿就出错了。页面报500.

原hql如下:

String hql = "from SecWilldosetdate  where name = 'secEduplan'";

问题如下:

org.hibernate.QueryException: Unable to resolve path [SecWilldosetdate.name], unexpected token [SecWilldosetdate] [from com.sms.security.supervisionAssess.bean.SecWilldosetdate where SecWilldosetdate.name = 'secEduplan']
org.hibernate.hql.ast.tree.IdentNode.resolveAsNakedComponentPropertyRefLHS(IdentNode.java:)

折腾了好一会,最后加了个别名好了,不知道是什么原因。还是对hql不熟悉啊。

String hql = "from SecWilldosetdate s where s.name = 'secEduplan'";

org.hibernate.QueryException: Unable to resolve path [SecWilldosetdate.name],xxxxxxxx...异常处理的更多相关文章

  1. nested exception is org.hibernate.QueryException: could not resolve property

    SSH框架出现了下面的错误: nested exception is org.hibernate.QueryException: could not resolve property 检查了hbm.x ...

  2. org.hibernate.QueryException: could not resolve property

    org.hibernate.QueryException: could not resolve property HibernateSQLXML  org.hibernate.QueryExcepti ...

  3. org.hibernate.QueryException: could not resolve property: address of:

    Hibernate: select count(*) as y0_ from test.course this_ org.hibernate.QueryException: could not res ...

  4. 常见Hibernate报错处理:出现“org.hibernate.QueryException: could not resolve property”和 is not mapped和could not locate named parameter错误的解决

    正确写法: @Override @SuppressWarnings("unchecked") public List<Device> queryOSDevice(Str ...

  5. Hibernate-org.hibernate.QueryException: could not resolve property: code of:

    查询的时候有个属性跟表里的字段不符合,没有完全匹配上.

  6. Caused by: org.hibernate.boot.registry.selector.spi.StrategySelectionException: Unable to resolve name [org.hibernate.cache.ehcache.EhCacheRegionFactory] as strategy [org.hibernate.cache.spi.RegionFac

    警告: Exception encountered during context initialization - cancelling refresh attempt: org.springfram ...

  7. Error creating bean with name 'sessionFactory' defined in class path resource [applicationContext.xml]: Invocation of init method failed; nested exception is org.hibernate.HibernateException: Unable t

    spring与hibernate整合然后出现如下错误: org.springframework.beans.factory.BeanCreationException: Error creating ...

  8. 本地缺Android SDK版本20,Unable to resolve target 'android-20'

    解决方案一 本地缺Android SDK版本20,Unable to resolve target 'android-20' 通过SDK Manager安装一个Android 20. 解决方案二: L ...

  9. Android 开发 --Unable to resolve target 'android-19'

    Android 开发 --Unable to resolve target 'android-19' http://blog.csdn.net/love_javc_you/article/detail ...

随机推荐

  1. memcache 加载(对象)所遇到的问题。资源

    <?php $mem =new memcache(); if($mem->connect('127.0.0.1','11211')){ echo '连接OK'.'<br>'; ...

  2. 443. String Compression字符串压缩

    [抄题]: Given an array of characters, compress it in-place. The length after compression must always b ...

  3. Rails 和 Django 的深度技术对比

    我想以一个免责声明来开始下面的内容.我使用 Django开发网站已经有三年了,众所周知,我喜欢Django.我已经写了一个开源的应用程序( app),并且我已经将补丁发送到了Django.然而,我以尽 ...

  4. jquery遮罩层

    (function () { //遮罩层实现 zhe zhao ceng kexb 2016.2.24 $.extend($.fn, { mask: function (msg, maskDivCla ...

  5. Entity Framework 6.0 Tutorials(8):Custom Code-First Conventions

    Custom Code-First Conventions: Code-First has a set of default behaviors for the models that are ref ...

  6. C++ 中 dynamic_cast 浅析

    简述:dynamic_cast 操作符,将基类的指针或引用安全的转换为派生类的指针或引用.主要讲解,dynamic_cast操作符的原理.使用方式.编译器设置.返回值等相关知识. dynamic_ca ...

  7. (转)mongodb学习(翻译1)

    原文地址:http://www.cnblogs.com/Johnzhang/archive/2013/09/10/3313582.html 学习mongodb,试着翻译写,英语能力有限,希望大家指正, ...

  8. mybatis使用count返回int的方法

    <select id="countByExample" resultType="java.lang.Integer" > select count( ...

  9. duilib入门简明教程 -- VS环境配置(2)

        会SVN和配置VS环境的请跳过此篇~          既然是入门教程,那当然得基础点,因为搜索duilib相关资料时,发现有些小伙伴到处都是编译错误,以及路径配置错误等等,还有人不知道SVN ...

  10. Backup--查看备份的历史记录

    --==================================================== --查看数据库备份的详细信息:时间存储地址最大/最小LSN SELECT * FROM m ...