[ https://issues.apache.org/jira/browse/IGNITE-4182?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15969072#comment-15969072 ]
ASF GitHub Bot commented on IGNITE-4182: ---------------------------------------- GitHub user rfqu opened a pull request: https://github.com/apache/ignite/pull/1798 IGNITE-4182: fixed detailed diagnostics from H2 driver retained as wrapper exception's message. You can merge this pull request into a Git repository by running: $ git pull https://github.com/rfqu/ignite master Alternatively you can review and apply these changes as the patch at: https://github.com/apache/ignite/pull/1798.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #1798 ---- commit a2b20dbff9a9d70b551e1ad47b079d777378ec4d Author: rfqu <r...@list.ru> Date: 2017-04-14T14:00:48Z fix for ticket IGNITE-4182 (Improve error output when query parsing failed). commit db1757d7fc2441de0584a1d96b5f0c9b359364cf Author: rfqu <r...@list.ru> Date: 2017-04-14T14:01:02Z Merge branch 'master' of https://github.com/apache/ignite ---- > Improve error output when query parsing failed. > ----------------------------------------------- > > Key: IGNITE-4182 > URL: https://issues.apache.org/jira/browse/IGNITE-4182 > Project: Ignite > Issue Type: Task > Affects Versions: 1.7 > Reporter: Igor Sapego > Priority: Minor > Fix For: 2.1 > > > There is no enough information in the exception when SLQ query can not be > parsed. In most cases we get something like this: > {noformat} > Failed to execute SQL query [reqId=2, req=OdbcQueryExecuteRequest > [cacheName=cache, sqlQry=SELECT a FROM B, args=[]]] > javax.cache.CacheException: class org.apache.ignite.IgniteException: Failed > to parse query: SELECT a FROM B > at > org.apache.ignite.internal.processors.cache.IgniteCacheProxy.query(IgniteCacheProxy.java:740) > at > org.apache.ignite.internal.processors.odbc.OdbcRequestHandler.executeQuery(OdbcRequestHandler.java:193) > at > org.apache.ignite.internal.processors.odbc.OdbcRequestHandler.handle(OdbcRequestHandler.java:104) > at > org.apache.ignite.internal.processors.odbc.OdbcNioListener.onMessage(OdbcNioListener.java:124) > at > org.apache.ignite.internal.processors.odbc.OdbcNioListener.onMessage(OdbcNioListener.java:33) > at > org.apache.ignite.internal.util.nio.GridNioFilterChain$TailFilter.onMessageReceived(GridNioFilterChain.java:270) > at > org.apache.ignite.internal.util.nio.GridNioFilterAdapter.proceedMessageReceived(GridNioFilterAdapter.java:107) > at > org.apache.ignite.internal.util.nio.GridNioAsyncNotifyFilter$3.body(GridNioAsyncNotifyFilter.java:95) > at > org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110) > at > org.apache.ignite.internal.util.worker.GridWorkerPool$1.run(GridWorkerPool.java:70) > at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) > at java.lang.Thread.run(Thread.java:745) > Caused by: class org.apache.ignite.IgniteException: Failed to parse query: > SELECT a FROM B > at > org.apache.ignite.internal.processors.query.GridQueryProcessor.queryTwoStep(GridQueryProcessor.java:749) > at > org.apache.ignite.internal.processors.cache.IgniteCacheProxy.query(IgniteCacheProxy.java:728) > ... 12 more > Caused by: class org.apache.ignite.IgniteCheckedException: Failed to parse > query: SELECT a FROM B > at > org.apache.ignite.internal.processors.query.GridQueryProcessor.executeQuery(GridQueryProcessor.java:1695) > at > org.apache.ignite.internal.processors.query.GridQueryProcessor.queryTwoStep(GridQueryProcessor.java:742) > ... 13 more > Caused by: class > org.apache.ignite.internal.processors.query.IgniteSQLException: Failed to > parse query: SELECT a FROM B > at > org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.queryTwoStep0(IgniteH2Indexing.java:1887) > at > org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.queryTwoStep(IgniteH2Indexing.java:1793) > at > org.apache.ignite.internal.processors.query.GridQueryProcessor$2.applyx(GridQueryProcessor.java:744) > at > org.apache.ignite.internal.processors.query.GridQueryProcessor$2.applyx(GridQueryProcessor.java:742) > at > org.apache.ignite.internal.util.lang.IgniteOutClosureX.apply(IgniteOutClosureX.java:36) > at > org.apache.ignite.internal.processors.query.GridQueryProcessor.executeQuery(GridQueryProcessor.java:1672) > ... 14 more > {noformat} > In this particular case, for example, we do not have table "B", nor we have > column "a", but you can't get it from the exception. -- This message was sent by Atlassian JIRA (v6.3.15#6346)