Hi,

I checked the internet resources (google, sling website etc) as good as I can, but have not found a answer that I could follew to the following problem:

I want to add Nodes to a sling repository by a service component. The component references SlingRepository. After getting a Session from loginAdministrative (thanks to Bertrand Delacretaz who showed me that way) I check if the node in question is already added (parent.hasNode(name). If yes, I get it (getNode(name) else I add a new node to the parent node with addNode(name).

Because it is content I want to add the "sling:resourceType" property:

documentNode.setProperty("sling:resourceType", "thun/documents");

but get a ConstraintViolationException saying

no matching property definition found for {http://sling.apache.org/jcr/sling/1.0}resourceType

What am I doing wrong?

Thank you

Christian


--
**************************************
Christian Eugster
Grissian 14
I-39010 Tisens
0039 0473 420 873
0041 79 594 85 45
[email protected]

Reply via email to