Expand my Community achievements bar.

SOLVED

javax.jcr.AccessDeniedException: OakAccess0000: Access denied

Avatar

Level 4

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

1 Accepted Solution

Avatar

Correct answer by
Level 9

Hi Kishore,

The session writing the accesstaken should have write access to

/etc/cloudservices/salesforce/*

Thanks,

View solution in original post

2 Replies

Avatar

Level 4

Hi, Kishore

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

Thanks! 

Avatar

Correct answer by
Level 9

Hi Kishore,

The session writing the accesstaken should have write access to

/etc/cloudservices/salesforce/*

Thanks,