java.lang.IllegalArgumentException: The implementation of the provided ElasticsearchSinkFunction is not serializable. The object probably contains or references non-serializable fields.

2018-03-27 Thread chandresh pancholi
Flow Producer -> Kafka(Avro) -> Flink Connector with Avro deseriser -> FLink -> ES Kafka - Latest version Flink : 1.4.2 ES: 5.5.2 @Service public class FlinkStream { @Autowired private ClientService clientService; @Autowired private AppConfig appConfig; @PostConstruct pu

Re: java.lang.IllegalArgumentException: The implementation of the provided ElasticsearchSinkFunction is not serializable. The object probably contains or references non-serializable fields.

2018-03-27 Thread Chesnay Schepler
Your anonymous ElasticsearchSinkFunction accesses the client variable that is defined outside of the function. For the function to be serializable, said Client must be as well. I suggest to turn your function into a named class with a constructor that accepts the indexName. On 27.03.2018 12:1

Re: java.lang.IllegalArgumentException: The implementation of the provided ElasticsearchSinkFunction is not serializable. The object probably contains or references non-serializable fields.

2018-03-27 Thread chandresh pancholi
Hi, Thank you for the response. I have made the suggested changes But now I am getting "Caused by: java.lang.NoClassDefFoundError: scala/Product$class" I am running my application on SpringBoot 2.0 version. Is there better platform to run Flink Code? Caused by: java.lang.NoClassDefFoundError: sca