The above exception occured because json parser used is deprecated, import org.json.simple.parser. is deprecated. Hence this does not work - JSONParser parser = new