This topic was created by mistake

Showing results for 
Search instead for 
Did you mean: 
Active Member II

This topic was created by mistake

Please delete this topic.

2 Replies

Re: Why I can not access the property?

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
(ACSCE, AWS SAA, Azure Admin)
Active Member II

Re: Why I can not access the property?

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.