ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Prasad Bhalerao <prasadbhalerao1...@gmail.com>
Subject Re: Cache configuration in case of Client mode
Date Thu, 05 Jul 2018 12:19:34 GMT
Hi Maxim,

My mistake, I did not phrase the problem correctly.

I am getting NullPointerException in my code because
ignite.cache(getCacheName())
is returning null on client node.

As I said I have not provided any cache configurations on client node
because I thought it is unnecessary.

So the question is.

Is it necessary to provide all cache configuration on client node as well?
If yes why?


Thanks,
Prasad

On Thu, Jul 5, 2018 at 5:23 PM Maxim Malygin <maxim.malygin@gmail.com>
wrote:

> Please show stack trace of your NPE.
>
> Regards,
> Maxim
>
> чт, 5 июл. 2018 г. в 14:48, Prasad Bhalerao <prasadbhalerao1983@gmail.com
> >:
>
>> Don't want to use that method.  I know that cache is already present on
>> server node as it is loaded by loaders and this ignite.cache method is
>> present in my common framework.
>>
>> Thanks,
>> Prasad
>>
>> On Thu, Jul 5, 2018, 5:14 PM Sambhaji Sawant <sambhajisawant17@gmail.com>
>> wrote:
>>
>>> try using
>>> ignite.getOrCreateCache("cacheName");
>>>
>>> On Thu, Jul 5, 2018 at 3:49 PM, Prasad Bhalerao <
>>> prasadbhalerao1983@gmail.com> wrote:
>>>
>>>> Hi,
>>>>
>>>> I have provided the cache configurations on ignite node which is
>>>> started in server mode,but other ignite node which started in client mode
>>>> does not have any cache configurations.
>>>>
>>>> Now case is cache is present on ignite server node. But when I access
>>>> the same cache from client node I get NullPointerException when I execute
>>>> following code on client node.
>>>>
>>>> ignite.cache(getCacheName())
>>>>
>>>> Is it necessary to provide all cache configuration on client node as
>>>> well?
>>>> If yes why?
>>>>
>>>> Thanks,
>>>> Prasad
>>>>
>>>
>>>

Mime
View raw message