You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by Vladimir <vl...@yandex.ru> on 2017/06/05 18:04:49 UTC

BinaryInvalidTypeException: Unknown pair [platformId=.., typeId=...] when using CacheJdbcPojoStoreFactory and read/write-through

Greetings!

Can anyone please help me with cache store feature? Once I add to my cache
config CacheJdbcPojoStoreFactory and enable read/write-through I can't get
any value from the cache because of the deserialization exception:

org.apache.ignite.binary.BinaryInvalidTypeException: Unknown pair
[platformId=0, typeId=-596981488]
	at
org.apache.ignite.internal.binary.BinaryContext.descriptorForTypeId(BinaryContext.java:701)
~[ignite-core-2.0.0.jar:2.0.0]
	at
org.apache.ignite.internal.binary.BinaryReaderExImpl.deserialize0(BinaryReaderExImpl.java:1745)
~[ignite-core-2.0.0.jar:2.0.0]
	at
org.apache.ignite.internal.binary.BinaryReaderExImpl.deserialize(BinaryReaderExImpl.java:1704)
~[ignite-core-2.0.0.jar:2.0.0]
	at
org.apache.ignite.internal.binary.BinaryObjectImpl.deserializeValue(BinaryObjectImpl.java:794)
~[ignite-core-2.0.0.jar:2.0.0]
	at
org.apache.ignite.internal.binary.BinaryObjectImpl.value(BinaryObjectImpl.java:142)
~[ignite-core-2.0.0.jar:2.0.0]
	at
org.apache.ignite.internal.processors.cache.CacheObjectContext.unwrapBinary(CacheObjectContext.java:273)
~[ignite-core-2.0.0.jar:2.0.0]
	at
org.apache.ignite.internal.processors.cache.CacheObjectContext.unwrapBinariesIfNeeded(CacheObjectContext.java:186)
~[ignite-core-2.0.0.jar:2.0.0]
	at
org.apache.ignite.internal.processors.cache.CacheObjectContext.unwrapBinariesIfNeeded(CacheObjectContext.java:170)
~[ignite-core-2.0.0.jar:2.0.0]
	at
org.apache.ignite.internal.processors.cache.GridCacheContext.unwrapBinariesIfNeeded(GridCacheContext.java:1719)
~[ignite-core-2.0.0.jar:2.0.0]
	at
org.apache.ignite.internal.processors.query.GridQueryCacheObjectsIterator.next(GridQueryCacheObjectsIterator.java:64)
~[ignite-core-2.0.0.jar:2.0.0]
	at
org.apache.ignite.internal.processors.query.GridQueryCacheObjectsIterator.next(GridQueryCacheObjectsIterator.java:29)
~[ignite-core-2.0.0.jar:2.0.0]
	at
org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing$9$1.next(IgniteH2Indexing.java:1542)
~[ignite-indexing-2.0.0.jar:2.0.0]
	at
org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing$9$1.next(IgniteH2Indexing.java:1536)
~[ignite-indexing-2.0.0.jar:2.0.0]
	at
org.apache.ignite.internal.processors.cache.QueryCursorImpl.getAll(QueryCursorImpl.java:113)
~[ignite-core-2.0.0.jar:2.0.0]

The same happens if I'm trying to get a value by cache.get()

And everything is ok if I do not enable read/write-through and do not set
CacheJdbcPojoStoreFactory in the cache config.

What's wrong?



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/BinaryInvalidTypeException-Unknown-pair-platformId-typeId-when-using-CacheJdbcPojoStoreFactory-and-rh-tp13384.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: BinaryInvalidTypeException: Unknown pair [platformId=.., typeId=...] when using CacheJdbcPojoStoreFactory and read/write-through

Posted by Vladimir <vl...@yandex.ru>.
Thanks. Looks like so. There is no class data in the file store. A workaround
might putting a value to the cache. That makes it working. But I don't want
to put any junk to my DB :)



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/BinaryInvalidTypeException-Unknown-pair-platformId-typeId-when-using-CacheJdbcPojoStoreFactory-and-rh-tp13384p13389.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: BinaryInvalidTypeException: Unknown pair [platformId=.., typeId=...] when using CacheJdbcPojoStoreFactory and read/write-through

Posted by Andrey Mashenkov <an...@gmail.com>.
Binary configuration is global and not related to cache. So, there is no
way to use it with NodeFilter.

You can try to disable configuration consistency check with JVM
option IGNITE_SKIP_CONFIGURATION_CONSISTENCY_CHECK,
but i'm not sure it will help.

On Tue, Jun 6, 2017 at 7:54 PM, Vladimir <vl...@yandex.ru> wrote:

> Thanks. A simple BinaryConfiguration has helped in the case of one isolated
> node or more nodes with the same configuration. The problem is that the
> storable cache is configured with the node filter. So, only several nodes
> share the cache. Another nodes aren't supposed to know anything about these
> manually configured types in the BinaryConfiguration and haven't such
> config. That causes:
>
> IgniteSpiException: Local node's binary configuration is not equal to
> remote
> node's binary configuration
>
> Can I anyhow bind BinaryConfiguration to certain cache with node filter,
> not
> to entire cluster?
>
>
>
>
> --
> View this message in context: http://apache-ignite-users.
> 70518.x6.nabble.com/BinaryInvalidTypeException-Unknown-pair-platformId-
> typeId-when-using-CacheJdbcPojoStoreFactory-and-rh-tp13384p13431.html
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>



-- 
Best regards,
Andrey V. Mashenkov

Re: BinaryInvalidTypeException: Unknown pair [platformId=.., typeId=...] when using CacheJdbcPojoStoreFactory and read/write-through

Posted by Vladimir <vl...@yandex.ru>.
Thanks. A simple BinaryConfiguration has helped in the case of one isolated
node or more nodes with the same configuration. The problem is that the
storable cache is configured with the node filter. So, only several nodes
share the cache. Another nodes aren't supposed to know anything about these
manually configured types in the BinaryConfiguration and haven't such
config. That causes:

IgniteSpiException: Local node's binary configuration is not equal to remote
node's binary configuration

Can I anyhow bind BinaryConfiguration to certain cache with node filter, not
to entire cluster?




--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/BinaryInvalidTypeException-Unknown-pair-platformId-typeId-when-using-CacheJdbcPojoStoreFactory-and-rh-tp13384p13431.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: BinaryInvalidTypeException: Unknown pair [platformId=.., typeId=...] when using CacheJdbcPojoStoreFactory and read/write-through

Posted by Andrey Mashenkov <an...@gmail.com>.
See documentation [1].

[1]
https://apacheignite.readme.io/docs/binary-marshaller#configuring-binary-objects

On Tue, Jun 6, 2017 at 12:28 PM, Vladimir <vl...@yandex.ru> wrote:

> >>> Try to add key\value classes in BinaryConfiguration.
>
> Btw any example?
>
>
>
> --
> View this message in context: http://apache-ignite-users.
> 70518.x6.nabble.com/BinaryInvalidTypeException-Unknown-pair-platformId-
> typeId-when-using-CacheJdbcPojoStoreFactory-and-rh-tp13384p13402.html
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>



-- 
Best regards,
Andrey V. Mashenkov

Re: BinaryInvalidTypeException: Unknown pair [platformId=.., typeId=...] when using CacheJdbcPojoStoreFactory and read/write-through

Posted by Vladimir <vl...@yandex.ru>.
>>> Try to add key\value classes in BinaryConfiguration.

Btw any example?



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/BinaryInvalidTypeException-Unknown-pair-platformId-typeId-when-using-CacheJdbcPojoStoreFactory-and-rh-tp13384p13402.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: BinaryInvalidTypeException: Unknown pair [platformId=.., typeId=...] when using CacheJdbcPojoStoreFactory and read/write-through

Posted by Andrey Mashenkov <an...@gmail.com>.
Here is a ticket for it [1].

[1] https://issues.apache.org/jira/browse/IGNITE-5411

On Mon, Jun 5, 2017 at 9:39 PM, Andrey Mashenkov <andrey.mashenkov@gmail.com
> wrote:

> HI,
>
> Seems, Ignite does not save binary metadata to store. So, you can't load
> data from store as metadata information is missed.
> Try to add key\value classes in BinaryConfiguration.
>
> On Mon, Jun 5, 2017 at 9:04 PM, Vladimir <vl...@yandex.ru> wrote:
>
>> Greetings!
>>
>> Can anyone please help me with cache store feature? Once I add to my cache
>> config CacheJdbcPojoStoreFactory and enable read/write-through I can't get
>> any value from the cache because of the deserialization exception:
>>
>> org.apache.ignite.binary.BinaryInvalidTypeException: Unknown pair
>> [platformId=0, typeId=-596981488]
>>         at
>> org.apache.ignite.internal.binary.BinaryContext.descriptorFo
>> rTypeId(BinaryContext.java:701)
>> ~[ignite-core-2.0.0.jar:2.0.0]
>>         at
>> org.apache.ignite.internal.binary.BinaryReaderExImpl.deseria
>> lize0(BinaryReaderExImpl.java:1745)
>> ~[ignite-core-2.0.0.jar:2.0.0]
>>         at
>> org.apache.ignite.internal.binary.BinaryReaderExImpl.deseria
>> lize(BinaryReaderExImpl.java:1704)
>> ~[ignite-core-2.0.0.jar:2.0.0]
>>         at
>> org.apache.ignite.internal.binary.BinaryObjectImpl.deseriali
>> zeValue(BinaryObjectImpl.java:794)
>> ~[ignite-core-2.0.0.jar:2.0.0]
>>         at
>> org.apache.ignite.internal.binary.BinaryObjectImpl.value(Bin
>> aryObjectImpl.java:142)
>> ~[ignite-core-2.0.0.jar:2.0.0]
>>         at
>> org.apache.ignite.internal.processors.cache.CacheObjectConte
>> xt.unwrapBinary(CacheObjectContext.java:273)
>> ~[ignite-core-2.0.0.jar:2.0.0]
>>         at
>> org.apache.ignite.internal.processors.cache.CacheObjectConte
>> xt.unwrapBinariesIfNeeded(CacheObjectContext.java:186)
>> ~[ignite-core-2.0.0.jar:2.0.0]
>>         at
>> org.apache.ignite.internal.processors.cache.CacheObjectConte
>> xt.unwrapBinariesIfNeeded(CacheObjectContext.java:170)
>> ~[ignite-core-2.0.0.jar:2.0.0]
>>         at
>> org.apache.ignite.internal.processors.cache.GridCacheContext
>> .unwrapBinariesIfNeeded(GridCacheContext.java:1719)
>> ~[ignite-core-2.0.0.jar:2.0.0]
>>         at
>> org.apache.ignite.internal.processors.query.GridQueryCacheOb
>> jectsIterator.next(GridQueryCacheObjectsIterator.java:64)
>> ~[ignite-core-2.0.0.jar:2.0.0]
>>         at
>> org.apache.ignite.internal.processors.query.GridQueryCacheOb
>> jectsIterator.next(GridQueryCacheObjectsIterator.java:29)
>> ~[ignite-core-2.0.0.jar:2.0.0]
>>         at
>> org.apache.ignite.internal.processors.query.h2.IgniteH2Index
>> ing$9$1.next(IgniteH2Indexing.java:1542)
>> ~[ignite-indexing-2.0.0.jar:2.0.0]
>>         at
>> org.apache.ignite.internal.processors.query.h2.IgniteH2Index
>> ing$9$1.next(IgniteH2Indexing.java:1536)
>> ~[ignite-indexing-2.0.0.jar:2.0.0]
>>         at
>> org.apache.ignite.internal.processors.cache.QueryCursorImpl.
>> getAll(QueryCursorImpl.java:113)
>> ~[ignite-core-2.0.0.jar:2.0.0]
>>
>> The same happens if I'm trying to get a value by cache.get()
>>
>> And everything is ok if I do not enable read/write-through and do not set
>> CacheJdbcPojoStoreFactory in the cache config.
>>
>> What's wrong?
>>
>>
>>
>> --
>> View this message in context: http://apache-ignite-users.705
>> 18.x6.nabble.com/BinaryInvalidTypeException-Unknown-pair-
>> platformId-typeId-when-using-CacheJdbcPojoStoreFactory-and-r
>> h-tp13384.html
>> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>>
>
>
>
> --
> Best regards,
> Andrey V. Mashenkov
>



-- 
Best regards,
Andrey V. Mashenkov

Re: BinaryInvalidTypeException: Unknown pair [platformId=.., typeId=...] when using CacheJdbcPojoStoreFactory and read/write-through

Posted by Andrey Mashenkov <an...@gmail.com>.
HI,

Seems, Ignite does not save binary metadata to store. So, you can't load
data from store as metadata information is missed.
Try to add key\value classes in BinaryConfiguration.

On Mon, Jun 5, 2017 at 9:04 PM, Vladimir <vl...@yandex.ru> wrote:

> Greetings!
>
> Can anyone please help me with cache store feature? Once I add to my cache
> config CacheJdbcPojoStoreFactory and enable read/write-through I can't get
> any value from the cache because of the deserialization exception:
>
> org.apache.ignite.binary.BinaryInvalidTypeException: Unknown pair
> [platformId=0, typeId=-596981488]
>         at
> org.apache.ignite.internal.binary.BinaryContext.descriptorForTypeId(
> BinaryContext.java:701)
> ~[ignite-core-2.0.0.jar:2.0.0]
>         at
> org.apache.ignite.internal.binary.BinaryReaderExImpl.deserialize0(
> BinaryReaderExImpl.java:1745)
> ~[ignite-core-2.0.0.jar:2.0.0]
>         at
> org.apache.ignite.internal.binary.BinaryReaderExImpl.deserialize(
> BinaryReaderExImpl.java:1704)
> ~[ignite-core-2.0.0.jar:2.0.0]
>         at
> org.apache.ignite.internal.binary.BinaryObjectImpl.deserializeValue(
> BinaryObjectImpl.java:794)
> ~[ignite-core-2.0.0.jar:2.0.0]
>         at
> org.apache.ignite.internal.binary.BinaryObjectImpl.value(
> BinaryObjectImpl.java:142)
> ~[ignite-core-2.0.0.jar:2.0.0]
>         at
> org.apache.ignite.internal.processors.cache.CacheObjectContext.
> unwrapBinary(CacheObjectContext.java:273)
> ~[ignite-core-2.0.0.jar:2.0.0]
>         at
> org.apache.ignite.internal.processors.cache.CacheObjectContext.
> unwrapBinariesIfNeeded(CacheObjectContext.java:186)
> ~[ignite-core-2.0.0.jar:2.0.0]
>         at
> org.apache.ignite.internal.processors.cache.CacheObjectContext.
> unwrapBinariesIfNeeded(CacheObjectContext.java:170)
> ~[ignite-core-2.0.0.jar:2.0.0]
>         at
> org.apache.ignite.internal.processors.cache.GridCacheContext.
> unwrapBinariesIfNeeded(GridCacheContext.java:1719)
> ~[ignite-core-2.0.0.jar:2.0.0]
>         at
> org.apache.ignite.internal.processors.query.GridQueryCacheObjectsIterator.
> next(GridQueryCacheObjectsIterator.java:64)
> ~[ignite-core-2.0.0.jar:2.0.0]
>         at
> org.apache.ignite.internal.processors.query.GridQueryCacheObjectsIterator.
> next(GridQueryCacheObjectsIterator.java:29)
> ~[ignite-core-2.0.0.jar:2.0.0]
>         at
> org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing$9$1.next(
> IgniteH2Indexing.java:1542)
> ~[ignite-indexing-2.0.0.jar:2.0.0]
>         at
> org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing$9$1.next(
> IgniteH2Indexing.java:1536)
> ~[ignite-indexing-2.0.0.jar:2.0.0]
>         at
> org.apache.ignite.internal.processors.cache.QueryCursorImpl.getAll(
> QueryCursorImpl.java:113)
> ~[ignite-core-2.0.0.jar:2.0.0]
>
> The same happens if I'm trying to get a value by cache.get()
>
> And everything is ok if I do not enable read/write-through and do not set
> CacheJdbcPojoStoreFactory in the cache config.
>
> What's wrong?
>
>
>
> --
> View this message in context: http://apache-ignite-users.
> 70518.x6.nabble.com/BinaryInvalidTypeException-Unknown-pair-platformId-
> typeId-when-using-CacheJdbcPojoStoreFactory-and-rh-tp13384.html
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>



-- 
Best regards,
Andrey V. Mashenkov