You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by "William.L" <wi...@gmail.com> on 2021/05/04 03:26:01 UTC

IgniteCheckedException: Requesting mapping from grid failed for [platformId=0, typeId=-1220482121]

Hi,

I used C# code (entity object class) to create and write to cache. And I am
trying to use Java code to read (corresponding object class) from cache but
running into IgniteCheckedException: 



Is this scenario supported?

Here's the C# entity class:


Here's the corresponding Java class:


I am enable to write to the cache from the Java side and then read from it.
The object written from the Java side does not show up in the SQL queries
(cache/table was created using the C# entity class).








--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Re: IgniteCheckedException: Requesting mapping from grid failed for [platformId=0, typeId=-1220482121]

Posted by Pavel Tupitsyn <pt...@apache.org>.
Hi William,

This scenario is supported, but requires a bit of extra care:

1. Class names should match on Java and C# sides, including
namespace/package
    Alternatively, enable simple name mapper on both sides so that
namespace/package part is ignored

2. Classes should be registered in Ignite.
    Registration happens automatically on first use (e.g. cache.put).
However, if you do cache.put on C# side,
    and cache.get on Java side, then Ignite on Java side does not yet know
this class.
    You can force class registration by calling
ignite.binary().toBinary(new UserDocument(...))

Similar question on StackOverflow, including demo projects:
https://stackoverflow.com/questions/44445387/apache-ignite-2-0-java-and-net-basicbinaryidmapper-no-longer-works

On Tue, May 4, 2021 at 6:46 PM Ilya Kasnacheev <il...@gmail.com>
wrote:

> Hello!
>
> Can you please share some simple reproducer project which highlights the
> issue?
>
> You can put it on github or similar.
>
> Did you enable simple name mapper, btw? The error is what you can expect
> when type names on Java and C# side do not match.
>
> Regards,
> --
> Ilya Kasnacheev
>
>
> вт, 4 мая 2021 г. в 06:26, William.L <wi...@gmail.com>:
>
>> Hi,
>>
>> I used C# code (entity object class) to create and write to cache. And I
>> am
>> trying to use Java code to read (corresponding object class) from cache
>> but
>> running into IgniteCheckedException:
>>
>>
>>
>> Is this scenario supported?
>>
>> Here's the C# entity class:
>>
>>
>> Here's the corresponding Java class:
>>
>>
>> I am enable to write to the cache from the Java side and then read from
>> it.
>> The object written from the Java side does not show up in the SQL queries
>> (cache/table was created using the C# entity class).
>>
>>
>>
>>
>>
>>
>>
>>
>> --
>> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>>
>

Re: IgniteCheckedException: Requesting mapping from grid failed for [platformId=0, typeId=-1220482121]

Posted by Ilya Kasnacheev <il...@gmail.com>.
Hello!

Can you please share some simple reproducer project which highlights the
issue?

You can put it on github or similar.

Did you enable simple name mapper, btw? The error is what you can expect
when type names on Java and C# side do not match.

Regards,
-- 
Ilya Kasnacheev


вт, 4 мая 2021 г. в 06:26, William.L <wi...@gmail.com>:

> Hi,
>
> I used C# code (entity object class) to create and write to cache. And I am
> trying to use Java code to read (corresponding object class) from cache but
> running into IgniteCheckedException:
>
>
>
> Is this scenario supported?
>
> Here's the C# entity class:
>
>
> Here's the corresponding Java class:
>
>
> I am enable to write to the cache from the Java side and then read from it.
> The object written from the Java side does not show up in the SQL queries
> (cache/table was created using the C# entity class).
>
>
>
>
>
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>