When I try reading JSON file from DAM using resolver factory I am getting null pointer.
Tried many ways. I am using servlet call.
Solved! Go to Solution.
Views
Replies
Total Likes
@lk08
Try reading it using service user.
You can create a systme user by going to /crx/exlporer and then later assign the read/write permissions in /useradmin
Once you are done creating the user, try the resolverFactory code to get the resource resolver and then resource out of it.
Map<String, Object> param = new HashMap<>();
param.put(ResourceResolverFactory.SUBSERVICE, "serviceUser");
ResourceResolver resourceResolver = resolverFactory.getServiceResourceResolver(param);
Happy Coding!!
Thanks,
Nikhil
@lk08
Try reading it using service user.
You can create a systme user by going to /crx/exlporer and then later assign the read/write permissions in /useradmin
Once you are done creating the user, try the resolverFactory code to get the resource resolver and then resource out of it.
Map<String, Object> param = new HashMap<>();
param.put(ResourceResolverFactory.SUBSERVICE, "serviceUser");
ResourceResolver resourceResolver = resolverFactory.getServiceResourceResolver(param);
Happy Coding!!
Thanks,
Nikhil
Views
Replies
Total Likes
Views
Replies
Total Likes
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies