org.springframework.http.converter.HttpMessageNotWritableException: Could not write JSON: (was java.lang.NullPointerException) (through reference chain: in.xyz.sync.dto.ClassRoom["id"]); nested exception is com.fasterxml.jackson.databind.JsonMappingException: (was java.lang.NullPointerException) (through reference chain: in.xyz.sync.dto.ClassRoom["id"])
import java.util.List;
import org.codehaus.jackson.annotate.JsonIgnoreProperties;
import org.codehaus.jackson.map.annotate.JsonSerialize;
@JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
public class ClassRoom extends CommonResponse {
private long classId;
private String clientClassRoomId;
private long instituteId;
private long teacherId;
private String className;
private long handleId;
private int archived;
private int deleted;
private String creationTime;
private String modifiedTime;
private int type;
private String classCode;
private List<Student> student;
private String handle;
private String firstName;
}