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

Amit Jolly commented on IGNITE-1190:
------------------------------------

I normally get this error when I create objects using java double brace 
initialization and setting into ignite cache, example using below. 
{code:java}
public class TestSetup {
  public void doSetup(){
    Set ipAddresses = new HashSet<>(1){{ //THIS IS THE ISSUE
    add("0.0.0.0");
    }}; 

   Machine m1 = new Machine();
   m1.setIpAddresses(ipAddresses);
   cache.put(m1);
 }
}{code}
Now class Machine.java is there in all the JVM but TestSetup is not.
 
Don't use  java double brace initialization in such cases.
 

 

> org.apache.ignite.IgniteCheckedException: Failed to find class with given 
> class loader for unmarshalling (make sure same versions of all classes are 
> available on all nodes or enable peer-class-loading)
> ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: IGNITE-1190
>                 URL: https://issues.apache.org/jira/browse/IGNITE-1190
>             Project: Ignite
>          Issue Type: Bug
>          Components: cache
>            Reporter: xwcheng
>            Priority: Major
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to