EOFException From BinaryEntryStore When Calling BinaryEntry.getOriginalValue() (Doc ID 1334446.1)

Last updated on MARCH 08, 2017

Applies to:

Oracle Coherence - Version: 3.6.0 and later   [Release: AS10g and later ]
Information in this document applies to any platform.

Symptoms

A BinaryEntryStore calls BinaryEntry.getOriginalValue() from the store() method to access the previous value of an entry.

This is following the guidance given by Oracle in the Javadoc for BinaryEntryStore:

"Additionaly, for the purpose of the optimistic concurrency control,
implementations could rely on the entry's "previous" values: in the external
format using BinaryEntry.getOriginalValue() and in the internal format using
the BinaryEntry.getOriginalBinaryValue() methods (for store operations, a
value of null here would indicate an insert operation). "

Scenario

  1. Insert an entry for key k
  2. Sleep to allow write-behind. During write behind getOriginalValue() returns null.
  3. Clear the cache
  4. Re-insert entry with key k
  5. Sleep to allow write-behind. During write behind getOriginalValue() throws EOFException.

2011-05-23 11:21:37.662/9.365 Oracle Coherence GE 3.7.0.0 <Error>
(thread=WriteBehindThread:BinaryEntryStoreWrapper(Main$BinStore):DistributedCa
che, member=1): Failed to store key="k"
2011-05-23 11:21:37.662/9.365 Oracle Coherence GE 3.7.0.0 <Error>
(thread=WriteBehindThread:BinaryEntryStoreWrapper(Main$BinStore):DistributedCa
che, member=1): (Wrapped) java.io.EOFException
at com.tangosol.util.ExternalizableHelper.fromBinary(ExternalizableHelper.java:265)
at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache$ConverterFromBinary.convert(PartitionedCache.CDB:4)
at com.tangosol.net.cache.BackingMapBinaryEntry.getOriginalValue(BackingMapBinaryEntry.java:138)
at Main$BinStore.store(Main.java:52)
at com.tangosol.net.cache.ReadWriteBackingMap$BinaryEntryStoreWrapper.storeInternal(ReadWriteBackingMap.java:5976)
at com.tangosol.net.cache.ReadWriteBackingMap$StoreWrapper.store(ReadWriteBackingMap.java:4763)
at com.tangosol.net.cache.ReadWriteBackingMap$WriteThread.run(ReadWriteBackingMap.java:4166)
at com.tangosol.util.Daemon$DaemonWorker.run(Daemon.java:781)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.EOFException
at com.tangosol.io.AbstractByteArrayReadBuffer$ByteArrayBufferInput.readByte(AbstractByteArrayReadBuffer.java:327)
at com.tangosol.io.AbstractReadBuffer$AbstractBufferInput.readUnsignedByte(AbstractReadBuffer.java:435)
at com.tangosol.util.ExternalizableHelper.deserializeInternal(ExternalizableHelper.java:2719)
at com.tangosol.util.ExternalizableHelper.fromBinary(ExternalizableHelper.java:261)
... 8 more

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms