Why use the JCR API here? Please stick to the Sling Resouce/ValueMap API wherever possible.