SQLGrammarException: could not extract ResultSet

could not extract ResultSet; SQL [n/a]; nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet
org.springframework.dao.InvalidDataAccessResourceUsageException: could not extract ResultSet; SQL [n/a]; nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet
at org.springframework.orm.jpa.vendor.HibernateJpaDialect.convertHibernateAccessException(HibernateJpaDialect.java:261)
at org.springframework.orm.jpa.vendor.HibernateJpaDialect.translateExceptionIfPossible(HibernateJpaDialect.java:244)
at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.translateExceptionIfPossible(AbstractEntityManagerFactoryBean.java:488)
at org.springframework.dao.support.ChainedPersistenceExceptionTranslator.translateExceptionIfPossible(ChainedPersistenceExceptionTranslator.java:59)
at org.springframework.dao.support.DataAccessUtils.translateIfNecessary(DataAccessUtils.java:213)
at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:147)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at org.springframework.data.jpa.repository.support.CrudMethodMetadataPostProcessor$CrudMethodMetadataPopulatingMethodInterceptor.invoke(CrudMethodMetadataPostProcessor.java:133)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at org.springframework.data.repository.core.support.SurroundingTransactionDetectorMethodInterceptor.invoke(SurroundingTransactionDetectorMethodInterceptor.java:57)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213)
at com.sun.proxy.$Proxy107.findAll(Unknown Source)
at com.paoyou.util.jpa.JPAUtils.findListForPageBySearchParams(JPAUtils.java:107)
at com.paoyou.service.center.impl.ActivitiesDispatchFromWeb.ins_activityTemplate_query(ActivitiesDispatchFromWeb.java:5501)

今天Debug时遇到一个问题导致查询失败,后来找到原因:表新增了一个字段,实体类中添加了属性,但是对应的表无该字段。

类似的问题可以检查bean或者XXX.hbm.xml是否写错了 检查一下名称和类型是不是和sql中配置不一样

原文地址:https://www.cnblogs.com/guozuxin/p/11103953.html

时间: 2024-08-30 11:17:48

SQLGrammarException: could not extract ResultSet的相关文章

Exception occurred during processing request: could not extract ResultSet; SQL [n/a]; nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet

今天在编码的时候遇到了 Exception occurred during processing request: could not extract ResultSet; SQL [n/a]; nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet这个问题,也是找了老半天不懂什么原因,后来找了好多论坛,总结了一下,只要出现了sql的问题,基本都是bean或者XXX.

Caused by: org.hibernate.exception.SQLGrammarException: could not extract ResultSet

org.springframework.dao.InvalidDataAccessResourceUsageException: could not extract ResultSet; SQL [n/a]; nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet at org.springframework.orm.jpa.vendor.HibernateJpaDi

org.hibernate.exception.SQLGrammarException: could not extract ResultSet

这个故障的原因比较多: 1.如数据库中的字段和类中的字段类型不一致: 2.数据库dialect不够具体 myeclispe自动生成的是  org.hibernate.dialect.SQLServerDialect 如果连接的是SQLSERVER 2008 则可以写成org.hibernate.dialect.SQLServer2008Dialect

关于hibernate中提示can not create table ******

最近这两天,一直在搞hibernate,被 其中一个问题困扰了好久.在网上找了好久,一直都没有找到可行的方法,把jdk,jre,tomcat,装了拆,拆了装,可就是搞不好.实在是没有办法,又重新建了一个项目来测试,,从一点一滴开始试.所有的代码全部都手写,,,,可是问题依旧还在. 之所以一直没有找到解决办法,其实是自己的思维一直局限在一处,,,一直在想着hibernate只要把配置文件配置好,它就可以自己在数据库创建表结构,自己增删改查,相当的方便,可是自己 当时成功了,为什么这次却一而再再而三

Hibernate ORA-02289: 序列不存在

org.hibernate.exception.SQLGrammarException: could not extract ResultSet at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:80) at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(

异常记录(-)

执行插入操作的时候报错 could not extract ResultSet; SQL [n/a]; nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet ORA-02289: 序列不存在  没有序列操作的权限!!!

Hibernate ORA-02289: 序列不存在1

Hibernate ORA-02289: 序列不存在 转自http://www.cnblogs.com/zhaogd/p/5215242.html 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 org.hibernate.exception.SQLGrammarException: could not extract ResultSet     at

limits the number of elements in an IN predicate to 2100 entries.

org.hibernate.engine.jdbc.spi.SqlExceptionHelper 131 - [TxId : f68db5f5b-qmgnc^1561639897640^271530 , SpanId : 360544073895766848] The incoming tabular data stream (TDS) remote procedure call (RPC) protocol stream is incorrect. Too many parameters we

当JPA遇上MySQL表名全大写+全小写+驼峰+匈牙利四风格

我一直知道的MySQL在Linux上有字段名表名等的大小写问题,于是为了避免这个问题,选择了下划线和全小写,心说虽然咱用的是JPA,只要使用注解写清楚表名和字段名是大写的,不也没事么.例如这样 实际上证明,想象比搬砖生活丰富的多.亲们,我用JPA实现查表操作的时候,Exception跳出来说表不存在,因为表名是全小写的,我还能怎样┑( ̄Д  ̄)┍.接下来,折腾才刚刚开始--不妨看下日志,内心异常的沉重 2019-09-24 17:31:16.407 ERROR 25864 --- [ XNIO-