oak-run console is only meant to initialize a Oak ContentSession
(which differs from a JCR Session!) and does not initializes a full
feldged JCR session. So you cannot perform operations via JCR API. The
console is mostly meant to perform low level debugging and
manipulation of data.

What are you trying to achieve? If you can use the std JCR API then
prefer that but then yes oak-run console cannot be used


Chetan Mehrotra


On Wed, Feb 11, 2015 at 3:25 PM, Andrei Dulvac <[email protected]> wrote:
> Hi devs,
>
> I'm curious of the easiest way to copy a jcr node using the oak run  groovy
> console. I know that's easily achievable from the workspace by using the
> path and using the jcr Session:   session.getWorkspace().copy("/path/src",
> "/path/dst/");
> But from the oak run groovy console, all I have to start with is a
> org.apache.jackrabbit.oak.console.ConsoleSession. I can't seem to find a
> way to get the jcr workspace. Noob question 2: Should ConsoleSession
> implement Session?
>
> Thanks,
> Andrei

Reply via email to