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[] {NameValue.valueOf("mix:created")}); properties.put(“jcr:created”, Calendar.getInstance()); Resource dummy = resourceResolver.create(myResource, "dummy", properties); resourceResolver.commit(); I get the following exception: java.lang.IllegalArgumentException: Value can't be stored in the repository: org.apache.jackrabbit.value.NameValue@0 Can anyone tell me on how to add this on creation time? Thanks! Roy