Hi, what do you mean by export the data... do you mean "get" ?
I "get" domain arrays within arrays using a custom FromData method like this:
public MyObject FromPdx(IPdxInstance pdx)
{
MyString = (string) pdx.GetField("MyType");
MyChar = Convert.ToChar(pdx.GetField("MyChar"));
MyInt = Convert.ToInt32(pdx.GetField("MyInt"));
MyArray = FromPdxToMyArray(size, pdx.GetField("MyArray"));
return this;
}
public IMyArray[] FromPdxToMyArray(int size, object o)
{
IList<object> objList = (List<object>)o;
MyArray[] elements = new MyArray[size];
int c = 0;
foreach (object o2 in objList)
{
elements[c] = new MyArray().FromPdx((IPdxInstance)o2);
c++;
}
return elements;
}
Then in the MyArray().FromPdx(IPdxInstance) there's a repeat of the MyObject
FromPdx(pdx) method to get the array elements. If there were further arrays
within arrays then the FromPdx() stack like this. It works for me.
Cheers.
From: Claudiu Balciza [mailto:[email protected]]
Sent: 29 October 2020 16:44
To: [email protected]
Subject: A ClassNotFoundException was thrown while trying to deserialize cached
value
This email has reached the company via an external source.
Please be cautious opening any attachments or links.
Hi,
I have this springboot application where I store and retrieve complex objects
in geode (...array lists within array lists...).
I serialize the objects with DataSerializable and DataSerializer and use
compression (the default snappy compressor).
It all works fine.
But when I try to export the data I get: java.io.IOException:
org.apache.geode.cache.execute.FunctionException:
org.apache.geode.SerializationException: A ClassNotFoundException was thrown
while trying to deserialize cached value.
I packed all the domain classes in a jar and deployed the jar on the cluster
(all classes have the toData and fromData methods)
I still get the exception above.
What am I doing wrong?
Claudiu Balciza