You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@sling.apache.org by JCR <jc...@proxymit.net> on 2023/01/26 16:02:20 UTC
Registring Nodetype with Apache Sling / Oak access error
Hi all,
I try to register custom nodetypes with Sling 11. This results in an
jackrabbit-oak access, however.
The issue is documented at
https://stackoverflow.com/questions/75228033/registring-nodetype-with-apache-sling-oak-access-error
.
No answers so far, any hints would be highly appreciated.
Thanks,
Juerg
Re: Registring Nodetype with Apache Sling / Oak access error
Posted by JCR <jc...@proxymit.net>.
Hi Robert
Thanks for the feedback!
I used Sling's default system admin user, so higher privileges are
likely difficult to obtain... All capabilities check methods on the JCR
session object take an abs path to a node, hence I didn't go into deeper
research as resource types do not have a path (to my modest knowledge).
However, the repoinit alternative worked, and I achieved the goal via
this mechanism.
But this also means that the cause of original error is still unsolved
(Oak access (denied...) error).
Best,
--Juerg
On 26.01.23 17:27, Robert Munteanu wrote:
> Hi Juerg,
>
> On Thu, 2023-01-26 at 17:02 +0100, JCR wrote:
>> Hi all,
>>
>> I try to register custom nodetypes with Sling 11. This results in an
>> jackrabbit-oak access, however.
>> The issue is documented at
>> https://stackoverflow.com/questions/75228033/registring-nodetype-with-apache-sling-oak-access-error
>>
>> .
>>
>> No answers so far, any hints would be highly appreciated.
> For the record, this is the code from the StackOverflow question:
>
> URL cndURL = new URL("http://localhost:8080/path/to/cnd-file");
> boolean result =
> NodeTypeLoader.registerNodeType(currentNode.getSession(), cndURL);
>
> I see that you used currentNode.getSession(), what kind of privileges
> does the session have?
>
> Also, have you considered using repoinit? See [1] and "register
> nodetypes".
>
> Thanks,
> Robert
>
> [1]:
> https://sling.apache.org/documentation/bundles/repository-initialization.html
Re: Registring Nodetype with Apache Sling / Oak access error
Posted by Robert Munteanu <ro...@apache.org>.
Hi Juerg,
On Thu, 2023-01-26 at 17:02 +0100, JCR wrote:
> Hi all,
>
> I try to register custom nodetypes with Sling 11. This results in an
> jackrabbit-oak access, however.
> The issue is documented at
> https://stackoverflow.com/questions/75228033/registring-nodetype-with-apache-sling-oak-access-error
>
> .
>
> No answers so far, any hints would be highly appreciated.
For the record, this is the code from the StackOverflow question:
URL cndURL = new URL("http://localhost:8080/path/to/cnd-file");
boolean result =
NodeTypeLoader.registerNodeType(currentNode.getSession(), cndURL);
I see that you used currentNode.getSession(), what kind of privileges
does the session have?
Also, have you considered using repoinit? See [1] and "register
nodetypes".
Thanks,
Robert
[1]:
https://sling.apache.org/documentation/bundles/repository-initialization.html