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

Reply via email to