My spring boot rest application has a controller with the below method. It uses hibernate internally to get data from Oracle DB. My issue is that, when I invoke this service, it returns a HTTP ERROR 500. But there aren't any errors logged anywhere and the debug log in the below code prints the entire Job object without any issues. I debugged and saw that the job object is returning as well.
I doubt some data is causing issue when converting the Job object to json, but how do I find which field is causing the issue ?
Is there a way to log issues occuring during the json conversion ?
@GetMapping(params = {"jobId"})
@ResponseBody
public Job findById(long jobId) {
Job job = jobHistoryService.findById(jobId);
log.debug(job.toString());
return job;
}