org.hibernate.QueryException: JPA-style positional param was not an integral ordinal; nested exception is java.lang.IllegalArgumentException: org.hibernate.QueryException: JPA-style positional param was not an integral ordinal

在用jpa nativequery语句中,用spring junit测试发现报错:JPA-style positional param was not an integral ordinal。。。。。。

经过百度与自己代码调试发现:多是sql之间的空格问题,或者sql拼接问题,还有可能是sql语句后面不能有分号。

org.hibernate.QueryException: JPA-style positional param was not an integral ordinal; nested exception is java.lang.IllegalArgumentException: org.hibernate.QueryException: JPA-style positional param w的更多相关文章

  1. 解决Could not open Hibernate Session for transaction; nested exception is java.lang.NoClassDefFoundError: org/hibernate/engine/transaction/spi/TransactionContext

    我使用的是5.2.8的hibernate的jar包,运行的时候却报错Could not open Hibernate Session for transaction; nested exception ...

  2. jpa语句报 org.springframework.dao.InvalidDataAccessApiUsageException: Parameter with that position [2] did not exist; nested exception is java.lang.IllegalArgumentException: Parameter with that position

    @Query("SELECT area from Area AS area WHERE area.state=0 AND area.name like %?1% ")Area fi ...

  3. 解决Exception:Could not open Hibernate Session for transaction; nested exception is java.lang.NoClassDefFoundError: org/hibernate/engine/transaction/spi/TransactionContext

    原因是配置文件中 <bean id="transactionManager" class="org.springframework.orm.hibernate4.H ...

  4. nested exception is java.lang.NoClassDefFoundError: org/hibernate/validator/resourceloading/ResourceBundleLocator

    原来的hibernate-validator-5.3.0.Final.jar里没有这个接口,换成 hibernate-validator-4.1.0.Final.jar 就好了

  5. spring boot配置spring-data-jpa的时候报错CannotCreateTransactionException: Could not open JPA EntityManager for transaction; nested exception is java.lang.NoSuchMethodError

    org.springframework.transaction.CannotCreateTransactionException: Could not open JPA EntityManager f ...

  6. 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 ...

  7. 继承映射中的java.lang.IllegalArgumentException: org.hibernate.hql.internal.ast.QuerySyntaxException: person is not mapped [FROM person]

    继承映射中查询对象的过程中报错: java.lang.IllegalArgumentException: org.hibernate.hql.internal.ast.QuerySyntaxExcep ...

  8. SpringBoot启动报:Caused by: java.lang.IllegalArgumentException: At least one JPA metamodel must be present!

    使用spring boot对项目改造,启动报错: Caused by: java.lang.IllegalArgumentException: At least one JPA metamodel m ...

  9. 解决报错:JPA-style positional param was not an integral ordinal;

    org.hibernate.QueryException: JPA-style positional param was not an integral ordinal; nested excepti ...

随机推荐

  1. 中文多分类 BERT

    直接把自己的工作文档导入的,由于是在外企工作,所以都是英文写的 Steps: git clone https://github.com/google-research/bert prepare dat ...

  2. Ngnix日志分析

    Ngnix日志分析 cat用来读取日志内容 grep进行匹配的文本搜索 wc则进行最终的统计 grep与命令格式: grep -E “a.*b” file,ab条件同时成立 grep或命令的格式为:g ...

  3. SeaJS入门教程系列之完整示例(三)

    一个完整的例子上文说了那么多,知识点比较分散,所以最后我打算用一个完整的SeaJS例子把这些知识点串起来,方便朋友们归纳回顾.这个例子包含如下文件: 1.index.html——主页面.2.sea.j ...

  4. cf1108e 线段树区间更新+扫描线

    /* 有点像扫描线 思路:从左到右枚举每个点,枚举到点i时,把所有以i为起点的区间的影响删去 再加上以i-1为结尾的区间的影响 */ #include<bits/stdc++.h> usi ...

  5. Fiddler抓包10-会话框添加查看get与post请求类型

    前言 在使用fiddler抓包的时候,查看请求类型get和post每次只有点开该请求,在Inspectors才能查看get和post请求,不太方便.于是可以在会话框直接添加请求方式. 一.添加会话框菜 ...

  6. Android Strings.xml To CSV / Excel互转

    Android Strings.xml To CSV/Excel互转https://blog.csdn.net/hzxpyjq/article/details/50686983https://blog ...

  7. [转] css自定义字体font-face的兼容和使用

    @Font-face目前浏览器的兼容性: Webkit/Safari(3.2+) TrueType/OpenType TT (.ttf) .OpenType PS (.otf): Opera (10+ ...

  8. 编译linux内核以及添加系统调用的全过程

    参考链接: https://www.zybuluo.com/hakureisino/note/514321# 北京邮电大学操作系统实验: https://wenku.baidu.com/view/6d ...

  9. 浅谈html5 video 移动端填坑记

    这篇文章主要介绍了浅谈html5 video 移动端填坑记,小编觉得挺不错的,现在分享给大家,也给大家做个参考.一起跟随小编过来看看吧 本文介绍了html5 video 移动端填坑记,分享给大家,具体 ...

  10. rsync的man手册(未完成)

    本文是man rsync的官方手册译文,版本是3.1.2. 本文没打算翻译每个option,常用的option已经在另一篇文章rsync基础中有描述. 一开始的翻译过程比较顺畅,越到后面越难以理解,侧 ...