I am using version 3.8.0 and I am getting following exception. I am using the ChronicleMap without much customization. I am currently prototyping to exhibit ChronicleMap as a viable option to share data between different JVM processes on the same box. I do not see any problem when I create an instance where I am putting stuff into the ChronicleMap. But, when, I try to use ChronicleMap mainly as a reader then I am seeing this exception everytime.
Exception in thread "main" java.lang.AssertionError: java.lang.IllegalArgumentException: No enum constant net.openhft.chronicle.hash.serialization.impl.StopBitSizeMarshaller.{}
at net.openhft.chronicle.core.util.ObjectUtils.convertTo0(ObjectUtils.java:142)
at net.openhft.chronicle.core.util.ObjectUtils.convertTo(ObjectUtils.java:130)
at net.openhft.chronicle.wire.ValueIn.object(ValueIn.java:440)
at net.openhft.chronicle.wire.TextWire$TextValueIn.objectWithInferredType(TextWire.java:2482)
at net.openhft.chronicle.wire.TextWire$TextValueIn.typedMarshallable(TextWire.java:2290)
at net.openhft.chronicle.hash.impl.VanillaChronicleHash.readMarshallableFields(VanillaChronicleHash.java:240)
at net.openhft.chronicle.map.VanillaChronicleMap.readMarshallableFields(VanillaChronicleMap.java:107)
at net.openhft.chronicle.hash.impl.VanillaChronicleHash.readMarshallable(VanillaChronicleHash.java:225)
at net.openhft.chronicle.wire.SerializationStrategies$1.readUsing(SerializationStrategies.java:22)
at net.openhft.chronicle.wire.TextWire$TextValueIn.marshallable(TextWire.java:2228)
at net.openhft.chronicle.wire.ValueIn.object(ValueIn.java:429)
at net.openhft.chronicle.wire.TextWire$TextValueIn.objectWithInferredType(TextWire.java:2482)
at net.openhft.chronicle.wire.TextWire$TextValueIn.typedMarshallable(TextWire.java:2290)
at net.openhft.chronicle.map.ChronicleMapBuilder.openWithExistingFile(ChronicleMapBuilder.java:1598)
at net.openhft.chronicle.map.ChronicleMapBuilder.createWithFile(ChronicleMapBuilder.java:1444)
at net.openhft.chronicle.map.ChronicleMapBuilder.recoverPersistedTo(ChronicleMapBuilder.java:1416)
at net.openhft.chronicle.map.ChronicleMapBuilder.createOrRecoverPersistedTo(ChronicleMapBuilder.java:1410)
Most likely reason is wrong version of chronicle-wire
dependency used. Chronicle Map 3.8.0 is proven to work with chronicle-bom:1.11.16
, which specifies Chronicle Wire version 1.3.6, but no other older or newer version of chronicle-bom
or Chronicle Wire.
Update. The new Chronicle Map 3.9.0 version shouldn't have this issue regardless Chronicle Wire version used.