Return-Path: Delivered-To: apmail-jackrabbit-users-archive@locus.apache.org Received: (qmail 99938 invoked from network); 6 Apr 2007 14:00:28 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 6 Apr 2007 14:00:28 -0000 Received: (qmail 40983 invoked by uid 500); 6 Apr 2007 14:00:34 -0000 Delivered-To: apmail-jackrabbit-users-archive@jackrabbit.apache.org Received: (qmail 40973 invoked by uid 500); 6 Apr 2007 14:00:34 -0000 Mailing-List: contact users-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@jackrabbit.apache.org Delivered-To: mailing list users@jackrabbit.apache.org Received: (qmail 40964 invoked by uid 99); 6 Apr 2007 14:00:34 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Apr 2007 07:00:34 -0700 X-ASF-Spam-Status: No, hits=0.3 required=10.0 tests=MAILTO_TO_SPAM_ADDR,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of the.mindstorm.mailinglist@gmail.com designates 209.85.132.244 as permitted sender) Received: from [209.85.132.244] (HELO an-out-0708.google.com) (209.85.132.244) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Apr 2007 07:00:26 -0700 Received: by an-out-0708.google.com with SMTP id d18so1413471and for ; Fri, 06 Apr 2007 07:00:05 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=YCOLxHb0qxYrfIW3s4XVhXdJrTNJv7/fgtee5i3v1IIaK+V6eGjat8vK7S7HNsmAn9KhIu5S7kac47yQMAR2gpMJjoTHkXvvibl6Cu3Ug71dMc84vjMyLPXO/6hOjN3i9rI7VCvuH6pxZ0P3kJbyL1g8jkKE6xiwTgB0D+NOJU0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=WERTsnHx1gfiHhTC0RnvLMct5PmRd7rjE7v6CIL+dwgp2r3H4/Msv1SizOQJfc2kkzeIVeJ71zL+HnA2xJvjMWZsdJA36yx4znZouZoEgRxnf2jy+o4nyjztMI6pgQsLrhd9iW6VVik/P2hJeWgQ+WlOsE9SwKqmZrJTBjoc2UE= Received: by 10.114.176.1 with SMTP id y1mr1210547wae.1175868004200; Fri, 06 Apr 2007 07:00:04 -0700 (PDT) Received: by 10.115.48.16 with HTTP; Fri, 6 Apr 2007 07:00:04 -0700 (PDT) Message-ID: Date: Fri, 6 Apr 2007 17:00:04 +0300 From: "=?UTF-8?Q?Alexandru_Popescu_=E2=98=80?=" To: users@jackrabbit.apache.org Subject: Re: Setting JCR:CREATED Fails In-Reply-To: <446706.41857.qm@web55202.mail.re4.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <446706.41857.qm@web55202.mail.re4.yahoo.com> X-Virus-Checked: Checked by ClamAV on apache.org On 4/6/07, Julian wrote: > bump, please help me get off Slide. > > ----- Original Message ---- > From: Julian > To: users@jackrabbit.apache.org > Sent: Wednesday, April 4, 2007 1:09:22 PM > Subject: Setting JCR:CREATED Fails > > Hi, > > I am porting my content repository from one system to jackrabbit. While doing this I want to keep the created dates intact, but I get an > error when importing files (nt:file) into the repository. The error indicates the property jcr:created doesn't exist (see stack below, also I have tried setting jcr:autoCreated), but when I omit the code to set the property on the node before saving it, I have no problems. Is there a way around to set this value or do I need to make a custom node type to set the value? > > > Thanks, > Julian > > > no matching property definition found for {http://www.jcp.org/jcr/1.0}created > Caused by: > javax.jcr.nodetype.ConstraintViolationException: no matching property definition found for {http://www.jcp.org/jcr/1.0}created > at org.apache.jackrabbit.core.nodetype.EffectiveNodeType.getApplicablePropertyDef(EffectiveNodeType.java:771) > at org.apache.jackrabbit.core.NodeImpl.getApplicablePropertyDefinition(NodeImpl.java:926) > at org.apache.jackrabbit.core.NodeImpl.getOrCreateProperty(NodeImpl.java:457) > at org.apache.jackrabbit.core.NodeImpl.getOrCreateProperty(NodeImpl.java:407) > at org.apache.jackrabbit.core.NodeImpl.setProperty(NodeImpl.java:2362) > .... > > > > > According to the spec: 6.7.22.5 nt:hierarchyNode: PropertyDefinition Name jcr:created RequiredType DATE ValueConstraints [] DefaultValue null s AutoCreated true Mandatory false OnParentVersion INITIALIZE Protected true Multiple false As you see the property is protected so you cannot set it yourself. bests, ./alex -- .w( the_mindstorm )p. _____________________________________ Alexandru Popescu, OSS Evangelist TestNG/Groovy/AspectJ/WebWork/more... Information Queue ~ www.InfoQ.com