You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Stanislav Lukyanov (JIRA)" <ji...@apache.org> on 2019/07/19 08:16:00 UTC

[jira] [Commented] (IGNITE-11734) IgniteCache.replace(k, v, nv) requires classes when element is null

    [ https://issues.apache.org/jira/browse/IGNITE-11734?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16888683#comment-16888683 ] 

Stanislav Lukyanov commented on IGNITE-11734:
---------------------------------------------

[~v.pyatkov] I came across this issue and the fix, and I believe the test has a flaw. If `replace` throws an exception other than `ClassNotFoundException` then it will be ignored. Do you agree, or am I missing something?

> IgniteCache.replace(k, v, nv) requires classes when element is null
> -------------------------------------------------------------------
>
>                 Key: IGNITE-11734
>                 URL: https://issues.apache.org/jira/browse/IGNITE-11734
>             Project: Ignite
>          Issue Type: Bug
>          Components: cache
>            Reporter: Vladislav Pyatkov
>            Assignee: Vladislav Pyatkov
>            Priority: Major
>             Fix For: 2.8
>
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> For example execute this code:
> {code}
> cache.replace(i, new Entity(), new Entity())
> {code}
> when cache have not a value by the key.
> {noformat}
> Caused by: class org.apache.ignite.binary.BinaryInvalidTypeException: ClientP2P$Entity
> 			at org.apache.ignite.internal.binary.BinaryContext.descriptorForTypeId(BinaryContext.java:709)
> 			at org.apache.ignite.internal.binary.BinaryReaderExImpl.deserialize0(BinaryReaderExImpl.java:1756)
> 			at org.apache.ignite.internal.binary.BinaryReaderExImpl.deserialize(BinaryReaderExImpl.java:1715)
> 			at org.apache.ignite.internal.binary.BinaryObjectImpl.deserializeValue(BinaryObjectImpl.java:791)
> 			at org.apache.ignite.internal.binary.BinaryObjectImpl.value(BinaryObjectImpl.java:142)
> 			at org.apache.ignite.internal.processors.cache.GridCacheUtils.value(GridCacheUtils.java:1328)
> 			at org.apache.ignite.internal.processors.cache.CacheEntryPredicateContainsValue.apply(CacheEntryPredicateContainsValue.java:70)
> 			at org.apache.ignite.internal.processors.cache.CacheEntryPredicateContainsValue.apply(CacheEntryPredicateContainsValue.java:33)
> 			at org.apache.ignite.internal.processors.cache.GridCacheContext.isAllLocked(GridCacheContext.java:1322)
> 			... 31 more
> Caused by: java.lang.ClassNotFoundException: ClientP2P$Entity
> 			at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
> 			at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
> 			at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
> 			at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
> 			at java.lang.Class.forName0(Native Method)
> 			at java.lang.Class.forName(Class.java:348)
> 			at org.apache.ignite.internal.util.IgniteUtils.forName(IgniteUtils.java:8643)
> 			at org.apache.ignite.internal.MarshallerContextImpl.getClass(MarshallerContextImpl.java:374)
> 			at org.apache.ignite.internal.binary.BinaryContext.descriptorForTypeId(BinaryContext.java:700)
> 			... 39 more
> {noformat}



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)