这个问题绊了我两次跟头,作为一个3年多开发经验的人,甚是尴尬

java.lang.IllegalArgumentException: org.hibernate.hql.ast.QuerySyntaxException: SmsTemplate is not mapped [select o from SmsTemplate o where o.templateCode = ?1 and o.disabled = ?2]

此问题为找不到映射文件,

解决方式为:在persistence.xml中配置SmsTemplate的PO路径!!!!!

我要罚自己喝完两大杯水

XXX is not mapped的更多相关文章

  1. 关于Hibernate XXX is not mapped 错误

    我的实体类是这么配置的 @Entity(name="EntityName")  //必须,name为可选,对应数据库中一的个表 就会出现 XXX is not mapped.   ...

  2. hibernate:XXX is not mapped

    hibernate:XXX is not mapped  检查项目中是否将hbm.xml引入

  3. 使用hql当异常查询:Xxx is not mapped[from Xxx where ...]

    采用当今项目hql询问.出现    QingAoCenterInfo is not mapped[from QingAoCenterInfo where...] 显然地Hibernate映射关系出现了 ...

  4. org.hibernate.hql.internal.ast.QuerySyntaxException: XXX is not mapped

    异常情况: 最近在把一个项目拆分多个 module 的时候数据库查询遇到这个异常:org.hibernate.hql.internal.ast.QuerySyntaxException: Identi ...

  5. Hibernate 中出现表名(XXX) is not mapped 问题

    今天晚上自己试着用Hibernate去搭建一个Web工程,然后去实现一个简单的登录.通过Hibernate?做查询操作的时候总是报出这样的错:users is?not?mapped. 于是乎去检查了下 ...

  6. org.hibernate.hql.ast.QuerySyntaxException: XXX is not mapped

    因为 String sql2 = "select s from Student s where s.clazz.name=:name"; 此处的 Student 应该为类名.hql ...

  7. JPA使用中遇到Caused by: org.hibernate.hql.internal.ast.QuerySyntaxException: XXX is not mapped

    在写自定义查询时,Query注解中写的JPQL,表名和列名都应该是映射的Java类和属性,不能写表名或者字段名

  8. HQL中出现XXX is not mapped的错误

    我的代码如下 @Test public void testCollection(){ String hql = "from Order where orderItems is not emp ...

  9. 实体类和数据表的映射异常(XXX is not mapping[ ])

    在使用SSH框架开发过程,使用hibernate框架提供的工具类实现与数据库数据交互,在执行cmd操作时,如果出现以下异常: org.hibernate.hql.ast.QuerySyntaxExce ...

随机推荐

  1. javascript 重构alert()

    javascript问题,关于重构window.alert()后,然后调用window原本的window.alert()的方法 大神们,问个问题,如果在script标签的第一行散写,重构了window ...

  2. Java.WeakReference-SoftReference-PhantomReference

    Weak Reference, Soft Reference, Phantom Reference 1. Introduction "Weak reference objects, whic ...

  3. vs视图引入命名空间设置方法

    解决: 1.@using在cshtml的最上面,加上一句: @using Puzzle.Framework.Common 2.在View文件夹下面的web.config里面加: <system. ...

  4. python httplib2应用get post

    import httplib2,time #装饰器方法,用于记录方法消耗时间 #推荐将print 改成log def timer(func):     def _warpper(self,*argv) ...

  5. php mysql 丢失更新

    php mysql 丢失更新问题,搜索整个互联网,很少有讲到,也许和php程序员出身一般都是非科班出身有关系吧. 另外php程序一般都是简单数据,很少有并发一致性问题,所以大家都没有谁专门提出这个问题 ...

  6. nginx设置代理配置

    server {                 listen  8086;                 resolver 8.8.8.8;                 location /{ ...

  7. centos nfs配置备忘

    [需求]web应用需要部署在两台机器,图片目录共用,MySQL共用. [环境]Server: 192.168.168.10Client: 192.168.168.20 [配置步骤]1.在两台机器上安装 ...

  8. Java中TreeMap的基本操作

    TreeSet有四种种构造函数可以初始化 在代码中主要列出了常用的三种: 构造方法摘要 TreeSet()           构造一个新的空 set,该 set 根据其元素的自然顺序进行排序. Tr ...

  9. redis 的一主二从三哨兵模式

    概述 在部署redis 的时候,如果redis宕机,缓存将不可用,redis提供了哨兵模式保证redis实现高可用. 即一台主机两台从机,三台哨兵主机,如果主实例宕机,哨兵将将一台从机升级为主机.实现 ...

  10. mongoDB的安装与连接

    1.安装mongoDB 官网下载安装: https://www.mongodb.com/download-center/community 安装时选择自定义设置,安装到C盘program Files文 ...