Try to investigate in error logs , search for error related to this Servlet class in errortry to include debug logs in model file and check logs , I suspect resource.getValueMap().get("title",String.class); this might be giving null BTW you can use Sling model exporter for exporting data as jsonhttp...