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.

Error occurred of serialization of kryo

See original GitHub issue
Caused by: com.esotericsoftware.kryo.KryoException: Class cannot be created (missing no-arg constructor): java.util.Arrays$ArrayList
Serialization trace:
keyHashes (org.redisson.RedissonLocalCachedMap$LocalCachedMapInvalidate)
	at com.esotericsoftware.kryo.Kryo$DefaultInstantiatorStrategy.newInstantiatorOf(Kryo.java:1310) ~[kryo-4.0.0.jar:na]
	at com.esotericsoftware.kryo.Kryo.newInstantiator(Kryo.java:1127) ~[kryo-4.0.0.jar:na]
	at com.esotericsoftware.kryo.Kryo.newInstance(Kryo.java:1136) ~[kryo-4.0.0.jar:na]
	at com.esotericsoftware.kryo.serializers.CollectionSerializer.create(CollectionSerializer.java:107) ~[kryo-4.0.0.jar:na]
	at com.esotericsoftware.kryo.serializers.CollectionSerializer.read(CollectionSerializer.java:111) ~[kryo-4.0.0.jar:na]
	at com.esotericsoftware.kryo.serializers.CollectionSerializer.read(CollectionSerializer.java:40) ~[kryo-4.0.0.jar:na]
	at com.esotericsoftware.kryo.Kryo.readObject(Kryo.java:734) ~[kryo-4.0.0.jar:na]
	at com.esotericsoftware.kryo.serializers.ObjectField.read(ObjectField.java:125) ~[kryo-4.0.0.jar:na]
	at com.esotericsoftware.kryo.serializers.FieldSerializer.read(FieldSerializer.java:540) ~[kryo-4.0.0.jar:na]
	at com.esotericsoftware.kryo.Kryo.readClassAndObject(Kryo.java:816) ~[kryo-4.0.0.jar:na]
	at org.redisson.codec.KryoCodec$1.decode(KryoCodec.java:112) ~[redisson-3.4.2.jar:na]
	at org.redisson.client.protocol.pubsub.PubSubMessageDecoder.decode(PubSubMessageDecoder.java:38) ~[redisson-3.4.2.jar:na]
	at org.redisson.client.handler.CommandDecoder.decode(CommandDecoder.java:283) ~[redisson-3.4.2.jar:na]
	at org.redisson.client.handler.CommandDecoder.decodeList(CommandDecoder.java:313) ~[redisson-3.4.2.jar:na]
	at org.redisson.client.handler.CommandDecoder.decode(CommandDecoder.java:302) ~[redisson-3.4.2.jar:na]
	at org.redisson.client.handler.CommandDecoder.decode(CommandDecoder.java:120) ~[redisson-3.4.2.jar:na]
	at io.netty.handler.codec.ReplayingDecoder.callDecode(ReplayingDecoder.java:367) ~[netty-codec-4.1.10.Final.jar:4.1.10.Final]
	... 20 common frames omitted

Source code about org.redisson.RedissonLocalCachedMap$LocalCachedMapInvalidate:

public static class LocalCachedMapInvalidate implements Serializable {
     
     private byte[] excludedId;
     private List<byte[]> keyHashes;

     public LocalCachedMapInvalidate() {
     }
     
     public LocalCachedMapInvalidate(byte[] excludedId, byte[]... keyHash) {
         super();
         this.keyHashes = Arrays.asList(keyHash);
         this.excludedId = excludedId;
     }
     
     public byte[] getExcludedId() {
         return excludedId;
     }
     
     public Collection<byte[]> getKeyHashes() {
         return keyHashes;
     }
     
 }

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
mrnikocommented, Jun 14, 2017

Fixed

0reactions
mrnikocommented, Jun 14, 2017

@johnou I always wondered why they didn’t register all these serializers by default.

Read more comments on GitHub >

github_iconTop Results From Across the Web

kryo serialization - Error during Java serialization
I'm trying to use Kryo (4.0. 0) for automatic serialization without making objects explicitly serializable. I'm getting the following error ...
Read more >
Kryo serialization failed - Cloudera Community - 226843
Getting below error while running spark job. Exception in thread "main" org.apache.spark.SparkException: Job aborted due to stage failure: ...
Read more >
How to specify interface type for serialization? - Google Groups
I am new to Kryo. I am getting error (can't serialize due to missing default constructor) when try to serialize an object of...
Read more >
Buffer overflow" while running mapping in Spark mode using ...
To resolve the issue, set the property 'spark.kryoserializer.
Read more >
Scoring a dataset results in error "com.esotericsoftware.kryo ...
BatchScore service result in error: org.apache.spark.SparkException: Kryo serialization failed: Buffer overflow. Available: 2, required: 8 ...
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