chronicle-map version 3.27ea0
jna version 5.16.0
This is characteristic only if a custom serializer is present!
After the Map is created, the process writes the data and closes the Map.
After restarting, the Map is not opened from the file with the message
net.openhft.chronicle.core.util.ClassNotFoundRuntimeException: java.lang.ClassNotFoundException: failed to create instance of clazz=interface net.openhft.chronicle.hash.serialization.SizeMarshaller is it aliased?
at net.openhft.chronicle.wire.Wires.objectMap(Wires.java:943)
at net.openhft.chronicle.wire.Wires.object2(Wires.java:1106)
at net.openhft.chronicle.wire.Wires.object1(Wires.java:1049)
at net.openhft.chronicle.wire.Wires.object0(Wires.java:1013)
at net.openhft.chronicle.wire.ValueIn.object(ValueIn.java:1219)
at net.openhft.chronicle.map.VanillaChronicleMap.readMarshallableFields(VanillaChronicleMap.java:144)
at net.openhft.chronicle.hash.impl.VanillaChronicleHash.readMarshallable(VanillaChronicleHash.java:248)
at net.openhft.chronicle.wire.SerializationStrategies$1.readUsing(SerializationStrategies.java:67)
at net.openhft.chronicle.wire.TextWire$TextValueIn.marshallable(TextWire.java:2521)
at net.openhft.chronicle.wire.Wires.objectMap(Wires.java:946)
at net.openhft.chronicle.wire.Wires.object2(Wires.java:1106)
at net.openhft.chronicle.wire.ValueIn.object(ValueIn.java:1265)
at net.openhft.chronicle.wire.TextWire$TextValueIn.objectWithInferredType0(TextWire.java:2909)
at net.openhft.chronicle.wire.TextWire$TextValueIn.objectWithInferredType(TextWire.java:2854)
at net.openhft.chronicle.wire.TextWire$TextValueIn.typedMarshallable(TextWire.java:2600)
at net.openhft.chronicle.map.ChronicleMapBuilder.openWithExistingFile(ChronicleMapBuilder.java:1913)
at net.openhft.chronicle.map.ChronicleMapBuilder.createWithFile(ChronicleMapBuilder.java:1719)
at net.openhft.chronicle.map.ChronicleMapBuilder.createPersistedTo(ChronicleMapBuilder.java:1618)
valueMarshaller:
public class MySerialyser implements BytesWriter<MyObject[]>, BytesReader<MyObject[]>, ReadResolvable<MySerialyser> {
public ConstituentProxy[] read(Bytes input, @Nullable MyObject[] using) {
int len = input.readInt();
if (using == null)
using = new MyObject[len];
else
if (using.length != len)
using = Arrays.copyOf(using, len);
for (int i = 0; i < len; i++) {
if(using[i] == null)
using[i] = new MyObject();
using[i].uid = input.readLong();
...
}
return using;
}
public void write(Bytes out, @NotNull MyObject[] toWrite) {
out.writeInt(toWrite.length);
for (MyObject cp : toWrite) {
out.writeLong(cp.uid);
...
}
}
public ConstituentProxySerialyser readResolve() {
return this;
}
}
Can anyone tell me the cause? Or some advice? I can't understand what I'm doing wrong ...
Thanks
chronicle-map version 3.27ea0
jna version 5.16.0
This is characteristic only if a custom serializer is present!
After the Map is created, the process writes the data and closes the Map.
After restarting, the Map is not opened from the file with the message
valueMarshaller:
Can anyone tell me the cause? Or some advice? I can't understand what I'm doing wrong ...
Thanks