question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Coherence 12.2.1.4.7 with Bucket4j 6.2.0 fails with java.io.IOException: Unknown type id 768

See original GitHub issue

We 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:closed
  • Created 2 years ago
  • Comments:7

github_iconTop GitHub Comments

1reaction
nikhilvaishnavicommented, Oct 8, 2021

@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

0reactions
vladimir-bukhtoyarovcommented, Oct 7, 2021

I will check compatibility tomorrow

Read more comments on GitHub >

github_iconTop Results From Across the Web

Coherence 12.2.1.4.7 with Bucket4j 6.2.0 fails with java.io ...
Coherence 12.2.1.4.7 with Bucket4j 6.2.0 fails with java.io.IOException: Unknown type id 768 #176. nikhilvaishnavi opened this issue on Sep 24, ...
Read more >
Coherence Cluster POF Serialization Error Caused By ...
Coherence Cluster POF Serialization Error Caused By: Portable(java.io.StreamCorruptedException): Unknown User Type: NNNN (Doc ID 2430081.1).
Read more >
Bandwidth (bucket4j-core 6.2.0 API) - javadoc.io
Adds bandwidth that restricts to consume not often 1000 tokens per 1 minute and not often than 100 tokens per second Bucket bucket...
Read more >
bucket4j - bytemeta
Coherence 12.2.1.4.7 with Bucket4j 6.2.0 fails with java.io.IOException: Unknown type id 768. nikhil2209. nikhil2209 CLOSED · Updated 1 year ago ...
Read more >
Bucket4j 7.5.0 Reference
Bucket4j is a Java rate-limiting library that is mainly based on the token-bucket algorithm, which is by the de-facto standard for ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found