javax.jcr.AccessDeniedException: OakAccess0000: Access denied | Community
Skip to main content
kishore_polsani
Level 4
April 19, 2017
Solved

javax.jcr.AccessDeniedException: OakAccess0000: Access denied

  • April 19, 2017
  • 2 replies
  • 2276 views

Hi,

We have integrated AEM with salesforce, we are able to pull data from Salesforce from the dispatcher URL. Sometime we are getting below exception after reconnecting to salesforce from cloud config we are not seeing below error.

Exception:
com.adobe.cq.mcm.salesforce.SalesforceException: Repository Exception in Searching SFDC Leads javax.jcr.AccessDeniedException: OakAccess0000: Access denied
        at com.adobe.cq.mcm.salesforce.SalesforceLeadSearch.search(SalesforceLeadSearch.java:87)

Code:

String configPath = cloudConfig.getPath();
          Resource configResource = resolver.getResource(configPath);
          Node configNode = ((Node)configResource.adaptTo(Node.class)).getNode("jcr:content");
          configNode.setProperty("accesstoken", client.getAccessToken());
          configNode.getSession().save();

 

Thanks,

Kishore

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by MC_Stuff

Hi Kishore,

The session writing the accesstaken should have write access to

/etc/cloudservices/salesforce/*

Thanks,

2 replies

vjetty
Level 4
April 19, 2017

Hi, Kishore

It seems like permission issue. Please provide proper permissions on your repository.

Thanks! 

MC_Stuff
MC_StuffAccepted solution
Level 10
April 20, 2017

Hi Kishore,

The session writing the accesstaken should have write access to

/etc/cloudservices/salesforce/*

Thanks,