Hi,
I am trying to write and read in a Kafka topic a user-defined class (that implements serializable, and all the fields are serializable). Everything works fine when I am executing the program in the IDE or with the mvn exec command. When I try to execute the program in standalone mode I get the ClassNotFoundException. More specifically I get the exception only during the deserialization parts : @Overridepublic TheGlobalModel deserialize(byte[] message) throws IOException {outlierDetection.network.TheGlobalModel model;model = (outlierDetection.network.TheGlobalModel) SerializationUtils.deserialize(message);return model;} It seems that the problem lies in the deserialize method. If I remove it and simply return "new TheGlobalModel()" the exception is not thrown. I don´t understand why in this case the program seems to be aware of the existence of the class, I guess the problem is in the deserialize function. I only know this method for sending a serializable class through Kafka, I would be glad to hear other ways. Thanks in advance for your time. Cheers Paolo |
Hi Paolo, do you get the ClassNotFoundException for TheGlobalModel or for another class?2017-07-26 16:14 GMT+02:00 Paolo Cristofanelli <[hidden email]>:
|
Hi,
Best, Aljoscha
On 27. Jul 2017, at 09:52, Fabian Hueske <[hidden email]> wrote: |
Free forum by Nabble | Edit this page |