Hello all,

I am trying to create an nt:unstructured resource programatically, which 
contains a jcr:created property, but I don’t seem to find a way to add this 
programatically, nor how to add a jcr:mixinType (which would make it possible).

I tried the following, but it isn’t working:

Resource myResource = resourceResolver.getResource("/myresource");
Map<String,Object> properties = new HashMap<String,Object>();
properties.put("jcr:primaryType", "nt:unstructured”);
properties.put("jcr:mixinTypes", new NameValue[] 
properties.put(“jcr:created”, Calendar.getInstance());
Resource dummy = resourceResolver.create(myResource, "dummy", properties);

I get the following exception:

java.lang.IllegalArgumentException: Value can't be stored in the repository: 

Can anyone tell me on how to add this on creation time?


Reply via email to