Coherence 12.2.1.4.7 with Bucket4j 6.2.0 fails with java.io.IOException: Unknown type id 768
See original GitHub issueWe recently upgraded to bucket4j 6.2.0 from previous 4.10.0 and started noticing the below error whenever we execute this code - `// init bucket registry NamedCache<String, GridBucketState> cache = CacheFactory.getCache(“RateLimit”);
//Proxy manager / weak pointer to buckets. ProxyManager<String> buckets = Bucket4j.extension(Coherence.class).proxyManagerForCache(cache); Optional<BucketConfiguration> existingConfigurationOptional = buckets.getProxyConfiguration(requestKey);`
We have added all the required serializers as listed in the documentation here - https://github.com/vladimir-bukhtoyarov/bucket4j/blob/master/doc-pages/coherence.md
Error stack trace -
java.lang.RuntimeException: java.io.IOException: Unknown type id 768 at com.tangosol.util.ExternalizableHelper.fromBinary(ExternalizableHelper.java:416) at com.tangosol.util.ExternalizableHelper.fromBinary(ExternalizableHelper.java:349) at com.tangosol.coherence.component.net.extend.RemoteNamedCache$ConverterFromBinary.convert(RemoteNamedCache.CDB:4) at com.oracle.common.collections.ConverterCollections$ConverterMap.get(ConverterCollections.java:1558) at com.tangosol.coherence.component.net.extend.RemoteNamedCache.get(RemoteNamedCache.CDB:1) at com.tangosol.coherence.component.util.SafeNamedCache.get(SafeNamedCache.CDB:1) at io.github.bucket4j.grid.coherence.CoherenceProxy.getConfiguration(CoherenceProxy.java:81) at io.github.bucket4j.grid.coherence.CoherenceProxyManager.getProxyConfiguration(CoherenceProxyManager.java:64) at Caused by: java.io.IOException: Unknown type id 768 at com.tangosol.io.pof.ConfigurablePofContext.deserialize(ConfigurablePofContext.java:385) at com.tangosol.io.Serializer.deserialize(Serializer.java:89) at com.tangosol.util.ExternalizableHelper.deserializeInternal(ExternalizableHelper.java:3204) at com.tangosol.util.ExternalizableHelper.fromBinary(ExternalizableHelper.java:412) ... 27 more Caused by: java.lang.IllegalStateException: Unknown type id 768 at io.github.bucket4j.serialization.DataStreamAdapter.readObject(DataStreamAdapter.java:118) at io.github.bucket4j.serialization.DataStreamAdapter.readObject(DataStreamAdapter.java:109) at io.github.bucket4j.serialization.DataStreamAdapter.readObject(DataStreamAdapter.java:49) at io.github.bucket4j.grid.GridBucketState$1.deserialize(GridBucketState.java:44) at io.github.bucket4j.grid.GridBucketState$1.deserialize(GridBucketState.java:40) at io.github.bucket4j.grid.coherence.pof.AbstractBucket4jPofSerializer.deserialize(AbstractBucket4jPofSerializer.java:76) at com.tangosol.io.pof.PofBufferReader.readAsObject(PofBufferReader.java:3619) at com.tangosol.io.pof.PofBufferReader.readObject(PofBufferReader.java:2890) at com.tangosol.io.pof.ConfigurablePofContext.deserialize(ConfigurablePofContext.java:379) ... 30 more
Issue Analytics
- State:
- Created 2 years ago
- Comments:7
Top GitHub Comments
@vladimir-bukhtoyarov I think I may have found the root cause. We have the coherence cache cluster as a separate docker image. What I have come to understand is every time client changes, we need to rebuilt the coherence docker image to pick up any pof related changes as well. We need to rebuild it with the new client version of bucket4j which resolves this issue. Thanks for looking into this
I will check compatibility tomorrow