javax.jcr.nodetype.ConstraintViolationException: no matching property definition found for {}id
Hi,
I have been trying to add some node and write some properties through java code.
I am getting the following error “javax.jcr.nodetype.ConstraintViolationException: no matching property definition found for {}id”.
Could somebody tell me why it happens and how to solve error?
Here is my sample code :
Session session = this.repository.loginAdministrative(null);
Node root = session.getRootNode();
Node content = root.getNode("content");
Node customerRoot = null;
customerRoot = content.getNode("customer");
Node custNode = customerRoot.addNode("customer"+firstName+lastName+custId);
custNode.setProperty("id", custId);
custNode.setProperty("firstName", firstName);
custNode.setProperty("lastName", lastName);
custNode.setProperty("phone", phone);
custNode.setProperty("desc", desc);
session.save();
session.logout();
Thanks,
Anderson