For best performance Kryo serializer requires user to register all custom classes as in this example.