while accessing the node i am getting following error:
javax.jcr.RepositoryException: Not a relative path
i am newbie to AEM CQ5.i tried to google it. did not found any description about it.
Thanks in advance!
while accessing the node i am getting following error:
javax.jcr.RepositoryException: Not a relative path
i am newbie to AEM CQ5.i tried to google it. did not found any description about it.
Thanks in advance!
If you get a Node from the session object you have to use '/'
session.getNode( "/MyFolder" );
But if you use the root node you have to write
session.getRootNode().getNode( "MyFolder" );
//Remove the first / char - JCR API does not like that
String newPath = path.replaceFirst("/", "");
//USE JCR API TO get the Asset Data so we can move it to another JCR location
Node root = session.getRootNode();
Node fileNode = root.getNode(newPath);