Return-Path: Delivered-To: apmail-jackrabbit-users-archive@locus.apache.org Received: (qmail 45680 invoked from network); 27 May 2008 14:16:25 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 27 May 2008 14:16:25 -0000 Received: (qmail 99595 invoked by uid 500); 27 May 2008 14:16:26 -0000 Delivered-To: apmail-jackrabbit-users-archive@jackrabbit.apache.org Received: (qmail 99502 invoked by uid 500); 27 May 2008 14:16:26 -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 99491 invoked by uid 99); 27 May 2008 14:16:26 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 27 May 2008 07:16:26 -0700 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of frederic.v4x@gmail.com designates 72.14.220.153 as permitted sender) Received: from [72.14.220.153] (HELO fg-out-1718.google.com) (72.14.220.153) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 27 May 2008 14:15:36 +0000 Received: by fg-out-1718.google.com with SMTP id l27so2041032fgb.43 for ; Tue, 27 May 2008 07:15:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:references:subject:date:message-id:mime-version:content-type:x-mailer:x-mimeole:thread-index:in-reply-to; bh=INHGiMbdPArrjtYa21M3BVk7Hl6lAJmpRKjnEwTRky0=; b=mZZ/UeL19e0CAjAgOmIl1Djn0sKgaL99Qg9aLYtsJ0Gs8dHX7KQIxNYoZjW+zyBO1PJ0egc4/Oyuu5Z65+F5yDPocnWk3BRRMOQHkNg+MzktdAQ7f6Nf5JHK8QBJANOaRPDh/9zBI11gwOWkjorb3ZGpvsJHnc+M0kbrm2B3euU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:references:subject:date:message-id:mime-version:content-type:x-mailer:x-mimeole:thread-index:in-reply-to; b=CjT+0Pbuz4cD2jCbfZaCMmynqpuEaCiWEiPdW20OsYxDtYtyw4pwOkUm2ngnVJwMYjqyGX2Z6jpJkfeIg9UiSMN0o9Ih8rk1TSlRNk47zQRfAbti9Vub41diS6vqwfFJXK+JVQ6NrqNgRsUgKNSmuP8fohmIaLeuTS3rEmpqx7U= Received: by 10.86.26.11 with SMTP id 11mr3684245fgz.23.1211897750719; Tue, 27 May 2008 07:15:50 -0700 (PDT) Received: from earth ( [193.251.49.199]) by mx.google.com with ESMTPS id a37sm24471721fkc.14.2008.05.27.07.15.48 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 27 May 2008 07:15:49 -0700 (PDT) From: "Frederic BOY" To: References: Subject: importXML() fails with a ConstraintViolationException Date: Tue, 27 May 2008 16:15:47 +0200 Message-ID: <006b01c8c004$29e5fe40$4801a8c0@pessac.v4x.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_006C_01C8C014.ED6ECE40" X-Mailer: Microsoft Office Outlook 11 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198 thread-index: Aci//0zd1SbZeg2PS6+L3dJHMXBRZwABKIcQ In-Reply-To: X-Virus-Checked: Checked by ClamAV on apache.org ------=_NextPart_000_006C_01C8C014.ED6ECE40 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hi, Here's my problem: I have a repository organized as follows: root (jcr:system) |-- Video (mc:ItemType) | |-- Item1 (mc:VideoItem) | |-- Item2 (mc:VideoItem) | . | |-- ItemN (mc:VideoItem) |-- Audio (mc:ItemType) | |-- Item1 (mc:AudioItem) | |-- Item2 (mc:AudioItem) | . | |-- ItemN (mc:AudioItem) |-- Template (mc:ItemType) | |-- . In order to backup all my data, I call the following methods: session.exportSystemView("/Video", videoOut, true, false); session.exportSystemView("/Audio", audioOut, true, false); session.exportSystemView("/Template", templateOut, true, false); (It works like a charm: my 3 xml files are created properly) And on the other end, I try to import data by calling: session.importXML("/Video", videoIn, ImportUUIDBehavior.IMPORT_UUID_COLLISION_REPLACE_EXISTING); session.importXML("/Audio", audioIn, ImportUUIDBehavior.IMPORT_UUID_COLLISION_REPLACE_EXISTING); session.importXML("/Template", templateIn, ImportUUIDBehavior.IMPORT_UUID_COLLISION_REPLACE_EXISTING); On import, though my node types are correctly registered, I would get the following exception: ConstraintViolationException: no matching child node definition found for child node {}Video. Here is my CND file: [mc:AbstractMediaItem] > nt:base, mix:referenceable - mc:Title (string) primary - mc:Category (string) - mc:Tags (string) multiple - mc:Description (string) - mc:Comment (string) - mc:Source (string) - mc:Author (string) [mc:VideoItem] > mc:AbstractMediaItem + mc:WaveForm (mc:Resource) + mc:Thumbnail (mc:VideoThumbnail) multiple [mc:AudioItem] > mc:AbstractMediaItem + mc:WaveForm (mc:Resource) [mc:TemplateItem] > mc:AbstractMediaItem [mc:ItemType] + * (mc:AbstractMediaItem) I must have missed something . Could someone please help me? I'm kinda stuck here Thanks in advance ! Frederic Boy ------=_NextPart_000_006C_01C8C014.ED6ECE40--