Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 09407200BB1 for ; Thu, 3 Nov 2016 13:22:29 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 07C06160AFF; Thu, 3 Nov 2016 12:22:29 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 286D5160AFE for ; Thu, 3 Nov 2016 13:22:28 +0100 (CET) Received: (qmail 61860 invoked by uid 500); 3 Nov 2016 12:22:27 -0000 Mailing-List: contact user-help@ignite.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@ignite.apache.org Delivered-To: mailing list user@ignite.apache.org Received: (qmail 61850 invoked by uid 99); 3 Nov 2016 12:22:27 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Nov 2016 12:22:27 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 6CB1EC0DAE for ; Thu, 3 Nov 2016 12:22:26 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.88 X-Spam-Level: * X-Spam-Status: No, score=1.88 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id 0kxaXlh9lzlx for ; Thu, 3 Nov 2016 12:22:24 +0000 (UTC) Received: from mail-yw0-f179.google.com (mail-yw0-f179.google.com [209.85.161.179]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 05E315F4EB for ; Thu, 3 Nov 2016 12:22:24 +0000 (UTC) Received: by mail-yw0-f179.google.com with SMTP id t125so41814226ywc.1 for ; Thu, 03 Nov 2016 05:22:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=9gMXGgrelNyMTUmLwjA5dgH6r71tCCWaCDuMcvCoDoo=; b=XuVo8iX9NwUvHyE4CdTLHTlfh6UCfRw2wspgaTVdxze14iAVW0dfyOYr671UiZ5vhW Kh3QjOcBNumCnxGTDboFdRkWMavas4MgOWIZKaHb39iDiYo18daEuSFZfA1kAJlP3Wpy /fxGvpr7htfb4sVZEqAD/xbLZN5gUGzxhkK38I8Wmsw9Zr4mu9UyoXmtMlCSCXRgjiT5 qZAeohS0pXx+XIUDPGQAjKdqJhyn/eGQpI4wytgcgiqmwCHfWyaMVonn+DxpAXL2lB9e /fU+q/cYOVcwtZBABoI6yIHcUz0oH9o7ebgjSsab83PqJBIpArDEd5XyqVVm49zEOseN U+Ig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=9gMXGgrelNyMTUmLwjA5dgH6r71tCCWaCDuMcvCoDoo=; b=nCsUnt27M4aBpCggCXAaQ/oys6E+Kb+2tp5izL/ZG9tGzRDXb+RMbodNTU9XPvwScO oPQUzljS4KRfFxek/yF6712znjN9zKLQb9//YbnpmKhaCb+iohVXiitW4XykmRKlul5r 1GAm9BpS9cqqJGpY8UPr1N4HCPH/CDTkznna+3ysTdpowvdAr6Lv2YiUd6yd/qYd1jX9 U1ZI8VmG4dPnY77UE5LRq6n0FPJcCcfmKCHu6jf326PQKTUPXmG+7Vt0LlZ4hi8ZdJ+N iHgEZNWqYSSQVk38r0gcqJb/qD9GsMAwiVnS1LiutrdyHcfsJNOP17srdEfVtsL4mCdD JryQ== X-Gm-Message-State: ABUngvdpgfGAiEBkdWTmXCmhKPWgWLX/68XIfwES9HYcExx/m9cL8Hj/I4f/M7lQQKz9GpIx+Ft4lt5zxatYJg== X-Received: by 10.129.164.198 with SMTP id b189mr6935927ywh.294.1478175742047; Thu, 03 Nov 2016 05:22:22 -0700 (PDT) MIME-Version: 1.0 Received: by 10.37.44.10 with HTTP; Thu, 3 Nov 2016 05:22:21 -0700 (PDT) In-Reply-To: <1478172554083-8685.post@n6.nabble.com> References: <1478172554083-8685.post@n6.nabble.com> From: Vladislav Pyatkov Date: Thu, 3 Nov 2016 15:22:21 +0300 Message-ID: Subject: Re: Question about Class Not found To: user@ignite.apache.org Content-Type: multipart/alternative; boundary=94eb2c129c78053e8b0540649ccc archived-at: Thu, 03 Nov 2016 12:22:29 -0000 --94eb2c129c78053e8b0540649ccc Content-Type: text/plain; charset=UTF-8 Hi, I can only guess which class in was not found, but I think you have not loaded jar on each nodes. You have several tricks: 1) Copy jar into classpath on each nodes 2) Turn on peertopeer class loader[1]. 3) Use query entry [2], without field annotation and method setIndexTypes [1]: o.a.i.configuration.IgniteConfiguration#setPeerClassLoadingEnabled [2]: https://apacheignite.readme.io/docs/sql-queries#configuring-sql-indexes-using-queryentity On Thu, Nov 3, 2016 at 2:29 PM, devis76 wrote: > Hi, > i have a simple Pojo > > public class Client implements Serializable > private static final long serialVersionUID = 2747772722162744232L; > @QuerySqlField > private final Date registrationDate; > @QuerySqlField(index = true) > private final String lwersion; > ... > > I have create simple Cache... > cacheCfg.setBackups(0); > cacheCfg.setName(ctx.name()); > cacheCfg.setCacheMode(PARTITIONED); > > > When i use a Query > > QueryCursor> qryx = cache > > .query(new SqlFieldsQuery("select * from " + > valueType.getSimpleName())); > List list = new ArrayList(); > for (List row : qryx) { > logger.trace("Query {} List size {}", > cache.getName(), row.size()); > logger.trace("Query {} List size {} {}", > cache.getName(), row.get(0), > row.get(1)); > logger.trace("Query Cache {} Key found {} > {}", cache.getName(), > row.get(0)); > list.add((V) row.get(1)); > } > qryx.close(); > return list; > > When i run this query with a single node all works fine. > > When i'll start second Karaf the "last node started" throw a Class Not > Found.... > have you any suggestion please? > > > > > > > -- > View this message in context: http://apache-ignite-users. > 70518.x6.nabble.com/Question-about-Class-Not-found-tp8685.html > Sent from the Apache Ignite Users mailing list archive at Nabble.com. > -- Vladislav Pyatkov --94eb2c129c78053e8b0540649ccc Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi,

I can only guess which class i= n was not found, but I think you have not loaded jar on each nodes.
You have several tricks:
1) Copy jar into classpath on each no= des
2) Turn on peertopeer class loader[1].
3) Use query= entry [2], without field annotation and method setIndexTypes
[1]: o.a.i.configuration.IgniteConfiguration#setPeerClassLoadin= gEnabled
=

On Th= u, Nov 3, 2016 at 2:29 PM, devis76 <devis.balsemin@flexvalley.= com> wrote:
Hi,
i have a simple Pojo

public class Client implements Serializable
private static final long serialVersionUID =3D 2747772722162744232L;
@QuerySqlField
private final Date registrationDate;
@QuerySqlField(index =3D true)
private final String lwersion;
...

I have create simple Cache<String,Client>...
cacheCfg.setBackups(0);
cacheCfg.setName(ctx.name());
cacheCfg.setCacheMode(PARTITIONED);


When i use a Query

=C2=A0 =C2=A0 =C2=A0 =C2=A0 QueryCursor<List&lt;?>> qryx =3D c= ache
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0.query(new SqlFieldsQuery("select * from " +
valueType.getSimpleName()));
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 List<V> list =3D new ArrayList<V>();
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 for (List<?> row : qryx) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 logger.trace("Query {} List siz= e {}", cache.getName(), row.size());
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 logger.trace("Query {} List siz= e {} {}", cache.getName(), row.get(0),
row.get(1));
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 logger.trace("Query Cache=C2=A0= {} Key found {} {}", cache.getName(),
row.get(0));
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 list.add((V) row.get(1));
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 }
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 qryx.close();
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 return list;

When i run this query with a single node all works fine.

When i'll start second Karaf the "last node started" throw a = Class Not
Found....
have you any suggestion please?






--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Ques= tion-about-Class-Not-found-tp8685.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.



--
Vladislav Pyatkov
--94eb2c129c78053e8b0540649ccc--