org.hibernate.exception.SQLGrammarException

could not extract ResultSet

Samebug tips1

Try downgrading PostgresSQL server to 9.5 or update your PostgresSQL driver to 9.4-1211 with the following command: <postgresql.version>9.4.1211</postgresql.version>

Don't give up yet. Our experts can help. Paste your full stack trace to get a solution.

Solutions on the web1396

  • via Coderanch by Thakur Sachin Singh, 7 months ago
    could not extract ResultSet
  • could not extract ResultSet
  • Stack trace

    • org.hibernate.exception.SQLGrammarException: could not extract ResultSet at org.jboss.resteasy.core.ExceptionHandler.handleApplicationException(ExceptionHandler.java:76)[resteasy-jaxrs-3.0.8.Final.jar:] at org.jboss.resteasy.core.ExceptionHandler.handleException(ExceptionHandler.java:212)[resteasy-jaxrs-3.0.8.Final.jar:] at org.jboss.resteasy.core.SynchronousDispatcher.writeException(SynchronousDispatcher.java:149)[resteasy-jaxrs-3.0.8.Final.jar:] at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:372)[resteasy-jaxrs-3.0.8.Final.jar:] at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:179)[resteasy-jaxrs-3.0.8.Final.jar:] at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:220)[resteasy-jaxrs-3.0.8.Final.jar:] at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:56)[resteasy-jaxrs-3.0.8.Final.jar:] at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:51)[resteasy-jaxrs-3.0.8.Final.jar:] at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)[jboss-servlet-api_3.1_spec-1.0.0.Final.jar:1.0.0.Final] at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:85)[undertow-servlet-1.0.15.Final.jar:1.0.15.Final] at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:130)[undertow-servlet-1.0.15.Final.jar:1.0.15.Final] at org.kie.remote.services.rest.jaxb.DynamicJaxbContextFilter.doFilter(DynamicJaxbContextFilter.java:63)[kie-remote-services-6.3.0.Final.jar:6.3.0.Final] at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:60)[undertow-servlet-1.0.15.Final.jar:1.0.15.Final] at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:132)[undertow-servlet-1.0.15.Final.jar:1.0.15.Final] at org.uberfire.ext.security.server.BasicAuthSecurityFilter.doFilter(BasicAuthSecurityFilter.java:61)[uberfire-servlet-security-0.7.3.Final.jar:0.7.3.Final] at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:60)[undertow-servlet-1.0.15.Final.jar:1.0.15.Final] at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:132)[undertow-servlet-1.0.15.Final.jar:1.0.15.Final] at org.uberfire.ext.security.server.SecureHeadersFilter.doFilter(SecureHeadersFilter.java:53)[uberfire-servlet-security-0.7.3.Final.jar:0.7.3.Final] at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:60)[undertow-servlet-1.0.15.Final.jar:1.0.15.Final] at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:132)[undertow-servlet-1.0.15.Final.jar:1.0.15.Final] at org.uberfire.ext.security.server.SecurityIntegrationFilter.doFilter(SecurityIntegrationFilter.java:45)[uberfire-servlet-security-0.7.3.Final.jar:0.7.3.Final] at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:60)[undertow-servlet-1.0.15.Final.jar:1.0.15.Final] at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:132)[undertow-servlet-1.0.15.Final.jar:1.0.15.Final] at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:85)[undertow-servlet-1.0.15.Final.jar:1.0.15.Final] at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:61)[undertow-servlet-1.0.15.Final.jar:1.0.15.Final] at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)[undertow-servlet-1.0.15.Final.jar:1.0.15.Final] at org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78) at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25)[undertow-core-1.0.15.Final.jar:1.0.15.Final] at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:113)[undertow-servlet-1.0.15.Final.jar:1.0.15.Final] at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:56)[undertow-servlet-1.0.15.Final.jar:1.0.15.Final] at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25)[undertow-core-1.0.15.Final.jar:1.0.15.Final] at io.undertow.security.handlers.AuthenticationConstraintHandler.handleRequest(AuthenticationConstraintHandler.java:51)[undertow-core-1.0.15.Final.jar:1.0.15.Final] at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:45)[undertow-core-1.0.15.Final.jar:1.0.15.Final] at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:61)[undertow-servlet-1.0.15.Final.jar:1.0.15.Final] at io.undertow.servlet.handlers.security.ServletSecurityConstraintHandler.handleRequest(ServletSecurityConstraintHandler.java:56)[undertow-servlet-1.0.15.Final.jar:1.0.15.Final] at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:58)[undertow-core-1.0.15.Final.jar:1.0.15.Final] at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:70)[undertow-servlet-1.0.15.Final.jar:1.0.15.Final] at io.undertow.security.handlers.SecurityInitialHandler.handleRequest(SecurityInitialHandler.java:76)[undertow-core-1.0.15.Final.jar:1.0.15.Final] at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25)[undertow-core-1.0.15.Final.jar:1.0.15.Final] at org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61) at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25)[undertow-core-1.0.15.Final.jar:1.0.15.Final] at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25)[undertow-core-1.0.15.Final.jar:1.0.15.Final] at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:240)[undertow-servlet-1.0.15.Final.jar:1.0.15.Final] at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:227)[undertow-servlet-1.0.15.Final.jar:1.0.15.Final] at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:73)[undertow-servlet-1.0.15.Final.jar:1.0.15.Final] at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:146)[undertow-servlet-1.0.15.Final.jar:1.0.15.Final] at io.undertow.server.Connectors.executeRootHandler(Connectors.java:177)[undertow-core-1.0.15.Final.jar:1.0.15.Final] at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:727)[undertow-core-1.0.15.Final.jar:1.0.15.Final] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[rt.jar:1.8.0_60] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[rt.jar:1.8.0_60] at java.lang.Thread.run(Thread.java:745)[rt.jar:1.8.0_60] Caused by: javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: could not extract ResultSet at org.hibernate.jpa.spi.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1763)[hibernate-entitymanager-4.3.5.Final.jar:4.3.5.Final] at org.hibernate.jpa.spi.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1677)[hibernate-entitymanager-4.3.5.Final.jar:4.3.5.Final] at org.hibernate.jpa.internal.QueryImpl.getResultList(QueryImpl.java:458)[hibernate-entitymanager-4.3.5.Final.jar:4.3.5.Final] at org.hibernate.jpa.criteria.compile.CriteriaQueryTypeQueryAdapter.getResultList(CriteriaQueryTypeQueryAdapter.java:67)[hibernate-entitymanager-4.3.5.Final.jar:4.3.5.Final] at org.kie.remote.services.rest.query.RemoteServicesCriteriaUtil.sharedCreateQueryAndCallApplyMetaCriteriaAndGetResult(RemoteServicesCriteriaUtil.java:273)[kie-remote-services-6.3.0.Final.jar:6.3.0.Final] at org.kie.remote.services.rest.query.RemoteServicesTaskQueryCriteriaUtil.createQueryAndCallApplyMetaCriteriaAndGetResult(RemoteServicesTaskQueryCriteriaUtil.java:115)[kie-remote-services-6.3.0.Final.jar:6.3.0.Final] at org.jbpm.services.task.persistence.TaskQueryCriteriaUtil.doCriteriaQuery(TaskQueryCriteriaUtil.java:222)[jbpm-human-task-jpa-6.3.0.Final.jar:6.3.0.Final] at org.kie.remote.services.rest.query.RemoteServicesQueryJPAService.doTaskSummaryQuery(RemoteServicesQueryJPAService.java:65)[kie-remote-services-6.3.0.Final.jar:6.3.0.Final] at org.kie.remote.services.rest.query.helpers.InternalTaskQueryHelper.doQueryAndCreateResultObjects(InternalTaskQueryHelper.java:129)[kie-remote-services-6.3.0.Final.jar:6.3.0.Final] at org.kie.remote.services.rest.query.helpers.InternalTaskQueryHelper.doQueryAndCreateResultObjects(InternalTaskQueryHelper.java:48)[kie-remote-services-6.3.0.Final.jar:6.3.0.Final] at org.kie.remote.services.rest.query.helpers.AbstractInternalQueryHelper.queryTaskOrProcInstAndAssociatedVariables(AbstractInternalQueryHelper.java:159)[kie-remote-services-6.3.0.Final.jar:6.3.0.Final] at org.kie.remote.services.rest.QueryResourceImpl.queryTasks(QueryResourceImpl.java:88)[kie-remote-services-6.3.0.Final.jar:6.3.0.Final] at org.kie.remote.services.rest.QueryResourceImpl$Proxy$_$$_WeldClientProxy.queryTasks(Unknown Source)[kie-remote-services-6.3.0.Final.jar:6.3.0.Final] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[rt.jar:1.8.0_60] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)[rt.jar:1.8.0_60] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[rt.jar:1.8.0_60] at java.lang.reflect.Method.invoke(Method.java:497)[rt.jar:1.8.0_60] at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:137)[resteasy-jaxrs-3.0.8.Final.jar:] at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:296)[resteasy-jaxrs-3.0.8.Final.jar:] at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:250)[resteasy-jaxrs-3.0.8.Final.jar:] at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:237)[resteasy-jaxrs-3.0.8.Final.jar:] at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:356)[resteasy-jaxrs-3.0.8.Final.jar:] ... 47 more Caused by: org.hibernate.exception.SQLGrammarException: could not extract ResultSet at org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:123)[hibernate-core-4.3.5.Final.jar:4.3.5.Final] at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:49)[hibernate-core-4.3.5.Final.jar:4.3.5.Final] at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:126)[hibernate-core-4.3.5.Final.jar:4.3.5.Final] at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:112)[hibernate-core-4.3.5.Final.jar:4.3.5.Final] at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.extract(ResultSetReturnImpl.java:89)[hibernate-core-4.3.5.Final.jar:4.3.5.Final] at org.hibernate.loader.Loader.getResultSet(Loader.java:2065)[hibernate-core-4.3.5.Final.jar:4.3.5.Final] at org.hibernate.loader.Loader.executeQueryStatement(Loader.java:1862)[hibernate-core-4.3.5.Final.jar:4.3.5.Final] at org.hibernate.loader.Loader.executeQueryStatement(Loader.java:1838)[hibernate-core-4.3.5.Final.jar:4.3.5.Final] at org.hibernate.loader.Loader.doQuery(Loader.java:909)[hibernate-core-4.3.5.Final.jar:4.3.5.Final] at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:354)[hibernate-core-4.3.5.Final.jar:4.3.5.Final] at org.hibernate.loader.Loader.doList(Loader.java:2553)[hibernate-core-4.3.5.Final.jar:4.3.5.Final] at org.hibernate.loader.Loader.doList(Loader.java:2539)[hibernate-core-4.3.5.Final.jar:4.3.5.Final] at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2369)[hibernate-core-4.3.5.Final.jar:4.3.5.Final] at org.hibernate.loader.Loader.list(Loader.java:2364)[hibernate-core-4.3.5.Final.jar:4.3.5.Final] at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:496)[hibernate-core-4.3.5.Final.jar:4.3.5.Final] at org.hibernate.hql.internal.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:387)[hibernate-core-4.3.5.Final.jar:4.3.5.Final] at org.hibernate.engine.query.spi.HQLQueryPlan.performList(HQLQueryPlan.java:231)[hibernate-core-4.3.5.Final.jar:4.3.5.Final] at org.hibernate.internal.SessionImpl.list(SessionImpl.java:1264)[hibernate-core-4.3.5.Final.jar:4.3.5.Final] at org.hibernate.internal.QueryImpl.list(QueryImpl.java:103)[hibernate-core-4.3.5.Final.jar:4.3.5.Final] at org.hibernate.jpa.internal.QueryImpl.list(QueryImpl.java:573)[hibernate-entitymanager-4.3.5.Final.jar:4.3.5.Final] at org.hibernate.jpa.internal.QueryImpl.getResultList(QueryImpl.java:449)[hibernate-entitymanager-4.3.5.Final.jar:4.3.5.Final] ... 66 more Caused by: org.postgresql.util.PSQLException: ERROR: missing FROM-clause entry for table "organizati2_" Position: 741 at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2182) at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1911) at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:173) at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:615) at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:465) at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:350) at org.jboss.jca.adapters.jdbc.WrappedPreparedStatement.executeQuery(WrappedPreparedStatement.java:462) at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.extract(ResultSetReturnImpl.java:80)[hibernate-core-4.3.5.Final.jar:4.3.5.Final] ... 82 more

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    Unknown user
    Once, 1 year ago
    Unknown user
    Once, 1 year ago
    Once, 1 month ago
    Unknown user
    2 times, 5 months ago
    Unknown user
    Once, 10 months ago
    94 more bugmates