cancel
Showing results for 
Search instead for 
Did you mean: 

This topic was created by mistake

iceja
Confirmed Champ
Confirmed Champ

Please delete this topic.

2 REPLIES 2

abhinavmishra14
World-Class Innovator
World-Class Innovator

The error comes when a node doesn't exists as indicated :

org.alfresco.service.cmr.repository.InvalidNodeRefException: Node does not exist

Are you sure that node exists in the repository where you are executing the code?

Also, it is a good idea to always check node existance before trying to extract node properties or performing any operation using the nodeRef on a node.

 NodeRef connectedDocument = new NodeRef(stringRepresentationOfaNode);

if (nodeService.exists(connectedDocument )) {
  Serializable nodePropMark =  nodeService.getProperty(connectedDocument, NDBaseDocumentModel.PROP_MARK)
} else {
  //LOG or report error
}
~Abhinav
(ACSCE, AWS SAA, Azure Admin)

I abolutely sure the node DOES exist, and I can see that node in NodeBrowser and the defined property also exists. Morover the same node works with similar code in certain place of programm. but fails in another. Probably there is something with environment.