Return-Path: X-Original-To: apmail-ignite-user-archive@minotaur.apache.org Delivered-To: apmail-ignite-user-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D772E17C8F for ; Fri, 19 Jun 2015 11:34:18 +0000 (UTC) Received: (qmail 22486 invoked by uid 500); 19 Jun 2015 11:34:18 -0000 Delivered-To: apmail-ignite-user-archive@ignite.apache.org Received: (qmail 22442 invoked by uid 500); 19 Jun 2015 11:34:18 -0000 Mailing-List: contact user-help@ignite.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@ignite.incubator.apache.org Delivered-To: mailing list user@ignite.incubator.apache.org Received: (qmail 22432 invoked by uid 99); 19 Jun 2015 11:34:18 -0000 Received: from Unknown (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 19 Jun 2015 11:34:18 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 48B411A5BDE for ; Fri, 19 Jun 2015 11:34:18 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.9 X-Spam-Level: ** X-Spam-Status: No, score=2.9 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=3, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-eu-west.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id 2wTFJi-Zn35p for ; Fri, 19 Jun 2015 11:34:08 +0000 (UTC) Received: from mail-lb0-f172.google.com (mail-lb0-f172.google.com [209.85.217.172]) by mx1-eu-west.apache.org (ASF Mail Server at mx1-eu-west.apache.org) with ESMTPS id B7FFF20F3F for ; Fri, 19 Jun 2015 11:34:07 +0000 (UTC) Received: by lbbqq2 with SMTP id qq2so70234509lbb.3 for ; Fri, 19 Jun 2015 04:34:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=mvuqEd8b3S+j95Zh3MY4Gkb8CrliimJitaXqB8SzPzE=; b=CVV/9XAYseiFEU7skYLRVZ6A+/RCMN/F2p8ZfGkwQB7KQK8z+356TxYInHph+loeFi f8zT3R3bDPZ3r4fwHlpE1o33JHycxejaSLYCeLmqkhOF8OW+zYW1BX/WrUxI9JCq/anR JRUhNwu6DfOEJzo9iteCFBLQKRvMcLKbb9tSw8KdsLrwIlsbyn8MypBO0vcDxhz98UmT 0ZZoc3sqZONOPkon5nIAEDI7YSNFdL77zvznijumSNRROvV7nZPah6t52a12gz1+hb30 UW5PwFmfZZdevRi75AV0XaSDzVAsr19NC3FM4qghtl6pjclUk/dHCiKyCrYHic57x7JP 2iQQ== MIME-Version: 1.0 X-Received: by 10.112.126.101 with SMTP id mx5mr12213822lbb.35.1434713647166; Fri, 19 Jun 2015 04:34:07 -0700 (PDT) Received: by 10.112.158.196 with HTTP; Fri, 19 Jun 2015 04:34:07 -0700 (PDT) In-Reply-To: References: <1434550965231-511.post@n6.nabble.com> Date: Fri, 19 Jun 2015 14:34:07 +0300 Message-ID: Subject: Re: SQLCacheQuery Problem From: Isaeed Mohanna To: user@ignite.incubator.apache.org Content-Type: multipart/alternative; boundary=001a11c36b9c4b3cf30518dd4d77 --001a11c36b9c4b3cf30518dd4d77 Content-Type: text/plain; charset=UTF-8 Thats great. Thank you :) On Fri, Jun 19, 2015 at 12:48 PM, Yakov Zhdanov wrote: > I have added warning panel to the page. Please take a look. > > --Yakov > > 2015-06-18 18:03 GMT+03:00 Isaeed Mohanna : > >> I did not see that coming.... Thank you very much.... >> A note in Query section of the docmentation will help as well >> http://apacheignite.readme.io/v1.1/docs/cache-queries >> >> >> On Wed, Jun 17, 2015 at 8:52 PM, Alexey Goncharuk < >> alexey.goncharuk@gmail.com> wrote: >> >>> Add module ignite-indexing to the classpath of your project, it should >>> work fine after that. I will create a ticket to make sure Ignite throws a >>> proper error message when indexing is not in the classpath. >>> >>> 2015-06-17 7:22 GMT-07:00 Isaeed Mohanna : >>> >>>> Hi >>>> *I am using Ignite 1.0.0, I have a cache defined with the following >>>> configuration (defined at startup):* >>>> CacheConfiguration CacheConfig = new CacheConfiguration<>(); >>>> CacheConfig .setName("myCache"); >>>> CacheConfig .setCacheMode(CacheMode.REPLICATED); >>>> CacheConfig .setAtomicityMode(CacheAtomicityMode.ATOMIC); >>>> CacheConfig .setIndexedTypes(UUID.class, MyClass.class); >>>> *The class MyClass looks as follows:* >>>> public class MyClass implements Externalizable { >>>> @QuerySqlField(index = true) >>>> private UUID id; >>>> private UUID anotherId; >>>> @QuerySqlField(index = true) >>>> private Date time; >>>> .. setters/ getters and some other fields >>>> } >>>> *I am trying to perform sql query on my cache using the following:* >>>> IgniteCache reportsSchedule = ignite.cache("myCache"); >>>> SqlQuery sqlQuery = new SqlQuery>>> MyClass>(MyClass.class, "time <= ?"); >>>> QueryCursor> cursor = >>>> myCache.query(sqlQuery.setArgs(new Date())); >>>> >>>> *However I keep getting the following exception:* >>>> Caused by: class org.apache.ignite.IgniteException: Failed to find SQL >>>> table >>>> for type: MyClass >>>> at >>>> >>>> org.apache.ignite.internal.processors.closure.GridClosureProcessor$C2.execute(GridClosureProcessor.java:1699) >>>> at >>>> >>>> org.apache.ignite.internal.processors.job.GridJobWorker$2.call(GridJobWorker.java:478) >>>> at >>>> >>>> org.apache.ignite.internal.util.IgniteUtils.wrapThreadLoader(IgniteUtils.java:6069) >>>> at >>>> >>>> org.apache.ignite.internal.processors.job.GridJobWorker.execute0(GridJobWorker.java:472) >>>> >>>> *MyClass and UUID are defined in the configuration as an indexed type, >>>> also >>>> annotated as so in MyClass definition however i still receive this >>>> exception. Any idea what am i missing?* >>>> >>>> >>>> >>>> -- >>>> View this message in context: >>>> http://apache-ignite-users.70518.x6.nabble.com/SQLCacheQuery-Problem-tp511.html >>>> Sent from the Apache Ignite Users mailing list archive at Nabble.com. >>>> >>> >>> >> > --001a11c36b9c4b3cf30518dd4d77 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Thats great. Thank you :)
=
On Fri, Jun 19, 2015 at 12:48 PM, Yakov Zhda= nov <yzhdanov@apache.org> wrote:
I have added warning panel to the page. Please ta= ke a look.

--Yakov

2015-06-18 18:03 GMT+03:00 Isaeed Mohanna <= isaeedm@gmail.com>:
I did not see that coming.... Thank you very much....
A note = in Query section of the docmentation will help as well

=

On Wed, Jun 17, 2015 at 8:52 PM, Alexey Goncharuk &l= t;alexey.go= ncharuk@gmail.com> wrote:
<= div dir=3D"ltr">Add module ignite-indexing to the classpath of your project= , it should work fine after that. I will create a ticket to make sure Ignit= e throws a proper error message when indexing is not in the classpath.

2015-0= 6-17 7:22 GMT-07:00 Isaeed Mohanna <isaeedm@gmail.com>:
<= blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px= #ccc solid;padding-left:1ex">Hi
*I am using Ignite 1.0.0, I have a cache defined with the following
configuration (defined at startup):*
CacheConfiguration<?, ?> CacheConfig =3D new CacheConfiguration<&g= t;();
CacheConfig .setName("myCache");
CacheConfig .setCacheMode(CacheMode.REPLICATED);
CacheConfig .setAtomicityMode(CacheAtomicityMode.ATOMIC);
CacheConfig .setIndexedTypes(UUID.class, MyClass.class);
*The class MyClass looks as follows:*
public class MyClass implements Externalizable {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 @QuerySqlField(index =3D true)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 private UUID id;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 private UUID anotherId;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 @QuerySqlField(index =3D true)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 private Date time;
=C2=A0 .. setters/ getters and some other fields
}
*I am trying to perform sql query on my cache using the following:*
IgniteCache<UUID, MyClass> reportsSchedule =3D ignite.cache("myC= ache");
SqlQuery<UUID, MyClass> sqlQuery =3D new SqlQuery<UUID,
MyClass>(MyClass.class, "time <=3D ?");
QueryCursor<Entry&lt;UUID, MyClass>> cursor =3D
myCache.query(sqlQuery.setArgs(new Date()));

*However I keep getting the following exception:*
Caused by: class org.apache.ignite.IgniteException: Failed to find SQL tabl= e
for type: MyClass
=C2=A0 =C2=A0 =C2=A0 =C2=A0 at
org.apache.ignite.internal.processors.closure.GridClosureProcessor$C2.execu= te(GridClosureProcessor.java:1699)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 at
org.apache.ignite.internal.processors.job.GridJobWorker$2.call(GridJobWorke= r.java:478)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 at
org.apache.ignite.internal.util.IgniteUtils.wrapThreadLoader(IgniteUtils.ja= va:6069)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 at
org.apache.ignite.internal.processors.job.GridJobWorker.execute0(GridJobWor= ker.java:472)

*MyClass and UUID are defined in the configuration as an indexed type, also=
annotated as so in MyClass definition however i still receive this
exception. Any idea what am i missing?*



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/SQLCacheQuery-Probl= em-tp511.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.




--001a11c36b9c4b3cf30518dd4d77--