0

I am getting below error:

Failed to parse: could not instantiate '<pigUDF>' with arguments
'null' while using UDFContext for json parsing.
.
.
Caused by: java.io.EOFException: No content to map to Object due to
end of input

Of course, not getting error while parsing json without use of UDFContext.

Method written in this way:

private static final String JSON_FILE= "json_file";

private void loadJSONInUDFContext() throws JsonProcessingException, FileNotFoundException, IOException {    

            UDFContext udfContext = UDFContext.getUDFContext();
            Properties properties = 
              udfContext.getUDFProperties([pigUDF.class);

            List<TopicAndIndicator> list = JSONLoader.parseJSON();              

            properties.put(JSON_FILE, list);
}

I am not getting error while running on local, but getting while running on server.

halfer
  • 19,824
  • 17
  • 99
  • 186
  • Please read [Under what circumstances may I add “urgent” or other similar phrases to my question, in order to obtain faster answers?](//meta.stackoverflow.com/q/326569) - the summary is that this is not an ideal way to address volunteers, and is probably counterproductive to obtaining answers. Please refrain from adding this to your questions. – halfer Dec 11 '17 at 09:41
  • Can anyone please help. It is getting urgent. – Devendra Paratwar Dec 12 '17 at 11:10
  • It is urgent for you, but not for anyone else. Perhaps someone might help, but remember they are volunteers, as I have already pointed out. You would be best to carry on researching the problem you have while waiting for a reply - don't just dump the problem here and wait. Often when I ask a question, the process of writing it up and creating an [mcve] helps me fix it myself. – halfer Dec 12 '17 at 11:28

0 Answers0