On Tue, 2018-07-17 at 15:01 +0530, Hasini Witharana wrote: > Hi Robert, > > When I used the admin session I am getting an error like below. How > to > overcome this issue? > > "Bundle org.apache.sling.jcr.api is NOT whitelisted"
You should add this bundle to the LoginAdminWhitelist configuration, either by modifying the existing one at [1] or by creating a new one. You can also manage this using the web console. Hope this helps, Robert [1]: https://github.com/apache/sling-org-apache-sling-starter/blob/5b5076251be318b211b88a5ba6597cef75b8f5db/src/main/provisioning/sling.txt#L159 > > Thank You. > > On Tue, Jul 17, 2018 at 1:19 AM, Robert Munteanu <[email protected]> > wrote: > > > On Tue, 2018-07-17 at 00:40 +0530, Hasini Witharana wrote: > > > How to get the sling admin session from Sling Repository? > > > > > > I am using loginService(String s1, String s2) method and what > > > should > > > be s1 > > > and s2? > > > > You should be using loginAdminstrative(null). Although the method > > is > > deprecated now, it has its uses (and we should probably undeprecate > > it, > > see [1]). > > > > Robert > > > > [1]: https://issues.apache.org/jira/browse/SLING-7613 > > > > >
