ignite-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "cxw (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (IGNITE-1196) javax.cache.CacheException: class org.apache.ignite.IgniteException: Failed to parse query
Date Tue, 04 Aug 2015 15:42:04 GMT

    [ https://issues.apache.org/jira/browse/IGNITE-1196?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14653815#comment-14653815
] 

cxw edited comment on IGNITE-1196 at 8/4/15 3:41 PM:
-----------------------------------------------------

I got below exception when I try to execute a query , not sure its a bug or not, as I can
not find there is a forum to post such question so I simply crated a bug.


 SqlQuery sql = new SqlQuery(Person.class, "gender = ?");


Exception in thread "main" javax.cache.CacheException: class org.apache.ignite.IgniteException:
Failed to parse query: SELECT "PERSON".Person._key, "PERSON".Person._val FROM "PERSON".Person
WHERE gender = ?
	at org.apache.ignite.internal.processors.cache.IgniteCacheProxy.query(IgniteCacheProxy.java:581)
	at com.fangcang.CacheReader.main(CacheReader.java:48)
Caused by: class org.apache.ignite.IgniteException: Failed to parse query: SELECT "PERSON".Person._key,
"PERSON".Person._val FROM "PERSON".Person WHERE gender = ?
	at org.apache.ignite.internal.processors.query.GridQueryProcessor.queryTwoStep(GridQueryProcessor.java:624)
	at org.apache.ignite.internal.processors.cache.IgniteCacheProxy.query(IgniteCacheProxy.java:563)
	... 1 more
Caused by: class org.apache.ignite.IgniteCheckedException: Failed to parse query: SELECT "PERSON".Person._key,
"PERSON".Person._val FROM "PERSON".Person WHERE gender = ?
	at org.apache.ignite.internal.processors.query.GridQueryProcessor.executeQuery(GridQueryProcessor.java:1459)
	at org.apache.ignite.internal.processors.query.GridQueryProcessor.queryTwoStep(GridQueryProcessor.java:617)
	... 2 more
Caused by: javax.cache.CacheException: Failed to parse query: SELECT "PERSON".Person._key,
"PERSON".Person._val FROM "PERSON".Person WHERE gender = ?
	at org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.queryTwoStep(IgniteH2Indexing.java:852)
	at org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.queryTwoStep(IgniteH2Indexing.java:807)
	at org.apache.ignite.internal.processors.query.GridQueryProcessor$5.applyx(GridQueryProcessor.java:619)
	at org.apache.ignite.internal.processors.query.GridQueryProcessor$5.applyx(GridQueryProcessor.java:617)
	at org.apache.ignite.internal.util.lang.IgniteOutClosureX.apply(IgniteOutClosureX.java:36)
	at org.apache.ignite.internal.processors.query.GridQueryProcessor.executeQuery(GridQueryProcessor.java:1447)
	... 3 more
Caused by: org.h2.jdbc.JdbcSQLException: Column "GENDER" not found; SQL statement:
SELECT "PERSON".Person._key, "PERSON".Person._val FROM "PERSON".Person WHERE gender = ? [42122-175]
	at org.h2.message.DbException.getJdbcSQLException(DbException.java:332)
	at org.h2.message.DbException.get(DbException.java:172)
	at org.h2.message.DbException.get(DbException.java:149)
	at org.h2.expression.ExpressionColumn.optimize(ExpressionColumn.java:144)
	at org.h2.expression.Comparison.optimize(Comparison.java:177)
	at org.h2.command.dml.Select.prepare(Select.java:813)
	at org.h2.command.Parser.prepareCommand(Parser.java:240)
	at org.h2.engine.Session.prepareLocal(Session.java:436)
	at org.h2.engine.Session.prepareCommand(Session.java:379)
	at org.h2.jdbc.JdbcConnection.prepareCommand(JdbcConnection.java:1138)
	at org.h2.jdbc.JdbcPreparedStatement.<init>(JdbcPreparedStatement.java:70)
	at org.h2.jdbc.JdbcConnection.prepareStatement(JdbcConnection.java:267)
	at org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.queryTwoStep(IgniteH2Indexing.java:849)


was (Author: cxw):
I got below exception when I try to execute a query , not sure its a bug or not, as I can
not find there is a forum to post such question so I simply crated a bug.


 SqlQuery sql = new SqlQuery(Person.class, "gender = ?");

Person.java
-----------------------
public class Person implements Serializable {

    String name;

    Integer age;


    Integer gender;


    String p1;


    String p2;

}



Exception in thread "main" javax.cache.CacheException: class org.apache.ignite.IgniteException:
Failed to parse query: SELECT "PERSON".Person._key, "PERSON".Person._val FROM "PERSON".Person
WHERE gender = ?
	at org.apache.ignite.internal.processors.cache.IgniteCacheProxy.query(IgniteCacheProxy.java:581)
	at com.fangcang.CacheReader.main(CacheReader.java:48)
Caused by: class org.apache.ignite.IgniteException: Failed to parse query: SELECT "PERSON".Person._key,
"PERSON".Person._val FROM "PERSON".Person WHERE gender = ?
	at org.apache.ignite.internal.processors.query.GridQueryProcessor.queryTwoStep(GridQueryProcessor.java:624)
	at org.apache.ignite.internal.processors.cache.IgniteCacheProxy.query(IgniteCacheProxy.java:563)
	... 1 more
Caused by: class org.apache.ignite.IgniteCheckedException: Failed to parse query: SELECT "PERSON".Person._key,
"PERSON".Person._val FROM "PERSON".Person WHERE gender = ?
	at org.apache.ignite.internal.processors.query.GridQueryProcessor.executeQuery(GridQueryProcessor.java:1459)
	at org.apache.ignite.internal.processors.query.GridQueryProcessor.queryTwoStep(GridQueryProcessor.java:617)
	... 2 more
Caused by: javax.cache.CacheException: Failed to parse query: SELECT "PERSON".Person._key,
"PERSON".Person._val FROM "PERSON".Person WHERE gender = ?
	at org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.queryTwoStep(IgniteH2Indexing.java:852)
	at org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.queryTwoStep(IgniteH2Indexing.java:807)
	at org.apache.ignite.internal.processors.query.GridQueryProcessor$5.applyx(GridQueryProcessor.java:619)
	at org.apache.ignite.internal.processors.query.GridQueryProcessor$5.applyx(GridQueryProcessor.java:617)
	at org.apache.ignite.internal.util.lang.IgniteOutClosureX.apply(IgniteOutClosureX.java:36)
	at org.apache.ignite.internal.processors.query.GridQueryProcessor.executeQuery(GridQueryProcessor.java:1447)
	... 3 more
Caused by: org.h2.jdbc.JdbcSQLException: Column "GENDER" not found; SQL statement:
SELECT "PERSON".Person._key, "PERSON".Person._val FROM "PERSON".Person WHERE gender = ? [42122-175]
	at org.h2.message.DbException.getJdbcSQLException(DbException.java:332)
	at org.h2.message.DbException.get(DbException.java:172)
	at org.h2.message.DbException.get(DbException.java:149)
	at org.h2.expression.ExpressionColumn.optimize(ExpressionColumn.java:144)
	at org.h2.expression.Comparison.optimize(Comparison.java:177)
	at org.h2.command.dml.Select.prepare(Select.java:813)
	at org.h2.command.Parser.prepareCommand(Parser.java:240)
	at org.h2.engine.Session.prepareLocal(Session.java:436)
	at org.h2.engine.Session.prepareCommand(Session.java:379)
	at org.h2.jdbc.JdbcConnection.prepareCommand(JdbcConnection.java:1138)
	at org.h2.jdbc.JdbcPreparedStatement.<init>(JdbcPreparedStatement.java:70)
	at org.h2.jdbc.JdbcConnection.prepareStatement(JdbcConnection.java:267)
	at org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.queryTwoStep(IgniteH2Indexing.java:849)

> javax.cache.CacheException: class org.apache.ignite.IgniteException: Failed to parse
query
> ------------------------------------------------------------------------------------------
>
>                 Key: IGNITE-1196
>                 URL: https://issues.apache.org/jira/browse/IGNITE-1196
>             Project: Ignite
>          Issue Type: Bug
>          Components: SQL
>            Reporter: cxw
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message