ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vladislav Pyatkov <vldpyat...@gmail.com>
Subject Re: Question about Class Not found
Date Thu, 03 Nov 2016 12:22:21 GMT
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 <devis.balsemin@flexvalley.com>
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<String,Client>...
> cacheCfg.setBackups(0);
> cacheCfg.setName(ctx.name());
> cacheCfg.setCacheMode(PARTITIONED);
>
>
> When i use a Query
>
>         QueryCursor<List&lt;?>> qryx = cache
>
>                                .query(new SqlFieldsQuery("select * from " +
> valueType.getSimpleName()));
>                         List<V> list = new ArrayList<V>();
>                         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

Mime
View raw message