HI TEAM,
How to resolve the unsatisfied status to satisfied for Resource Resolver. Below is the screenshot of resource resolver service.In this I'm using OSGI annotation.
@Reference (org.osgi.service.component.annotations.Reference;)
protected ResourceResolver resourceResolver;(org.apache.sling.api.resource.ResourceResolver;)
Thanks & Regards,
Ashwini
Views
Replies
Total Likes
Dear Ashwini,
Resource Resolver can be retrieved from Resource Resolver Factory API[0], please change your implementation to
@Referece
ResourceResolverFactory factory; //, then you can use factory to retrieve ResourceResolver for your needs.
[0] ResourceResolverFactory (Apache Sling 7 API)
Regards,
Peter
Views
Replies
Total Likes
The proper code to obtain a ResourceResolver is:
@Component
public
class
EmployeeImpl
implements
EmployeeInter {
/** Default log. */
protected
final
Logger log = LoggerFactory.getLogger(
this
.getClass());
private
Session session;
//Inject a Sling ResourceResolverFactory
@Reference
private
ResourceResolverFactory resolverFactory;
public
String getEmployeeData()
{
Employee employee =
null
;
List<Employee> employList =
new
ArrayList<Employee>();
Map<String, Object> param =
new
HashMap<String, Object>();
param.put(ResourceResolverFactory.SUBSERVICE,
"datawrite"
);
ResourceResolver resolver =
null
;
try
{
//Invoke the adaptTo method to create a Session used to create a QueryManager
resolver = resolverFactory.getServiceResourceResolver(param);
See - Adobe Experience Manager Help | Querying Adobe Experience Manager 6.4 JCR data
Views
Replies
Total Likes
Thanks for the response
Views
Replies
Total Likes
What AEM-version is this?
Views
Replies
Total Likes
6.3 version
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies
Views
Like
Replies
Views
Like
Replies