You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Benjamin Brown <be...@thisisnumero.com> on 2010/07/07 11:59:59 UTC
ItemImpl.validateTransientItems preventing import
I have a system view export that I'd like to import using session.importXML with UUID_IMPORT_COLLISSION_REPLACE_EXISTING unfortunately the method ItemImpl.validateTransientItems keeps throwing an exception:
javax.jcr.nodetype.ConstraintViolationException: /jcr:root: mandatory child node {http://www.jcp.org/jcr/1.0}system does not exist
Technically this is correct, the transient view does not contain this node because jackrabbit cannot import protected system nodes.
So Catch 22, how do I export and then import jackrabit's root if
i) It won't import system nodes.
ii) Complains anyway if the system node is missing (i.e. that provided by the import)?
Am I missing something obvious here? The repository only has its own existing system nodes prior to import.
Thanks,
Benjamin
RE: ItemImpl.validateTransientItems preventing import
Posted by Benjamin Brown <be...@thisisnumero.com>.
Hi Stefan,
Don't worry it was a user error - I was importing content at the first node in the export rather than the parent of the first node in the export, i.e. I was importing /cms:Content at /cms:Content instead of /
Thanks for your help,
Benjamin
-----Original Message-----
From: stefan.guggisberg@gmail.com [mailto:stefan.guggisberg@gmail.com] On Behalf Of Stefan Guggisberg
Sent: 07 July 2010 12:51
To: users@jackrabbit.apache.org
Subject: Re: ItemImpl.validateTransientItems preventing import
hi benjamin,
On Wed, Jul 7, 2010 at 12:19 PM, Benjamin Brown
<be...@thisisnumero.com> wrote:
> Hi Stefan,
>
> Okay so I've tried exporting a top level node under the root however its now complaining that I don't have the base path I am importing with, i.e. javax.jcr.PathNotFoundException: /cms:Content
>
> /cms:Content is the top level path I exported from (and can see in the system view xml) and I expected to be imported?
i am not sure i can follow you here. do you mind providing some lines of code?
cheers
stefan
>
> Thanks,
>
> Benjamin
>
> -----Original Message-----
> From: stefan.guggisberg@gmail.com [mailto:stefan.guggisberg@gmail.com] On Behalf Of Stefan Guggisberg
> Sent: 07 July 2010 11:06
> To: users@jackrabbit.apache.org
> Subject: Re: ItemImpl.validateTransientItems preventing import
>
> On Wed, Jul 7, 2010 at 11:59 AM, Benjamin Brown
> <be...@thisisnumero.com> wrote:
>> I have a system view export that I'd like to import using session.importXML with UUID_IMPORT_COLLISSION_REPLACE_EXISTING unfortunately the method ItemImpl.validateTransientItems keeps throwing an exception:
>>
>> javax.jcr.nodetype.ConstraintViolationException: /jcr:root: mandatory child node {http://www.jcp.org/jcr/1.0}system does not exist
>>
>> Technically this is correct, the transient view does not contain this node because jackrabbit cannot import protected system nodes.
>>
>> So Catch 22, how do I export and then import jackrabit's root if
>
> you can't ;) you'll have to export/import your top-level application
> nodes separately.
>
> cheers
> stefan
>
>>
>> i) It won't import system nodes.
>>
>> ii) Complains anyway if the system node is missing (i.e. that provided by the import)?
>>
>> Am I missing something obvious here? The repository only has its own existing system nodes prior to import.
>>
>> Thanks,
>>
>> Benjamin
>>
> ______________________________________________________________________
> This email has been scanned for viruses by www.epagency.net
> If you consider this email spam, please forward it to spam@epagency.net
> ______________________________________________________________________
>
______________________________________________________________________
This email has been scanned for viruses by www.epagency.net
If you consider this email spam, please forward it to spam@epagency.net
______________________________________________________________________
Re: ItemImpl.validateTransientItems preventing import
Posted by Stefan Guggisberg <st...@day.com>.
hi benjamin,
On Wed, Jul 7, 2010 at 12:19 PM, Benjamin Brown
<be...@thisisnumero.com> wrote:
> Hi Stefan,
>
> Okay so I've tried exporting a top level node under the root however its now complaining that I don't have the base path I am importing with, i.e. javax.jcr.PathNotFoundException: /cms:Content
>
> /cms:Content is the top level path I exported from (and can see in the system view xml) and I expected to be imported?
i am not sure i can follow you here. do you mind providing some lines of code?
cheers
stefan
>
> Thanks,
>
> Benjamin
>
> -----Original Message-----
> From: stefan.guggisberg@gmail.com [mailto:stefan.guggisberg@gmail.com] On Behalf Of Stefan Guggisberg
> Sent: 07 July 2010 11:06
> To: users@jackrabbit.apache.org
> Subject: Re: ItemImpl.validateTransientItems preventing import
>
> On Wed, Jul 7, 2010 at 11:59 AM, Benjamin Brown
> <be...@thisisnumero.com> wrote:
>> I have a system view export that I'd like to import using session.importXML with UUID_IMPORT_COLLISSION_REPLACE_EXISTING unfortunately the method ItemImpl.validateTransientItems keeps throwing an exception:
>>
>> javax.jcr.nodetype.ConstraintViolationException: /jcr:root: mandatory child node {http://www.jcp.org/jcr/1.0}system does not exist
>>
>> Technically this is correct, the transient view does not contain this node because jackrabbit cannot import protected system nodes.
>>
>> So Catch 22, how do I export and then import jackrabit's root if
>
> you can't ;) you'll have to export/import your top-level application
> nodes separately.
>
> cheers
> stefan
>
>>
>> i) It won't import system nodes.
>>
>> ii) Complains anyway if the system node is missing (i.e. that provided by the import)?
>>
>> Am I missing something obvious here? The repository only has its own existing system nodes prior to import.
>>
>> Thanks,
>>
>> Benjamin
>>
> ______________________________________________________________________
> This email has been scanned for viruses by www.epagency.net
> If you consider this email spam, please forward it to spam@epagency.net
> ______________________________________________________________________
>
RE: ItemImpl.validateTransientItems preventing import
Posted by Benjamin Brown <be...@thisisnumero.com>.
Hi Stefan,
Okay so I've tried exporting a top level node under the root however its now complaining that I don't have the base path I am importing with, i.e. javax.jcr.PathNotFoundException: /cms:Content
/cms:Content is the top level path I exported from (and can see in the system view xml) and I expected to be imported?
Thanks,
Benjamin
-----Original Message-----
From: stefan.guggisberg@gmail.com [mailto:stefan.guggisberg@gmail.com] On Behalf Of Stefan Guggisberg
Sent: 07 July 2010 11:06
To: users@jackrabbit.apache.org
Subject: Re: ItemImpl.validateTransientItems preventing import
On Wed, Jul 7, 2010 at 11:59 AM, Benjamin Brown
<be...@thisisnumero.com> wrote:
> I have a system view export that I'd like to import using session.importXML with UUID_IMPORT_COLLISSION_REPLACE_EXISTING unfortunately the method ItemImpl.validateTransientItems keeps throwing an exception:
>
> javax.jcr.nodetype.ConstraintViolationException: /jcr:root: mandatory child node {http://www.jcp.org/jcr/1.0}system does not exist
>
> Technically this is correct, the transient view does not contain this node because jackrabbit cannot import protected system nodes.
>
> So Catch 22, how do I export and then import jackrabit's root if
you can't ;) you'll have to export/import your top-level application
nodes separately.
cheers
stefan
>
> i) It won't import system nodes.
>
> ii) Complains anyway if the system node is missing (i.e. that provided by the import)?
>
> Am I missing something obvious here? The repository only has its own existing system nodes prior to import.
>
> Thanks,
>
> Benjamin
>
______________________________________________________________________
This email has been scanned for viruses by www.epagency.net
If you consider this email spam, please forward it to spam@epagency.net
______________________________________________________________________
Re: ItemImpl.validateTransientItems preventing import
Posted by Stefan Guggisberg <st...@day.com>.
On Wed, Jul 7, 2010 at 11:59 AM, Benjamin Brown
<be...@thisisnumero.com> wrote:
> I have a system view export that I'd like to import using session.importXML with UUID_IMPORT_COLLISSION_REPLACE_EXISTING unfortunately the method ItemImpl.validateTransientItems keeps throwing an exception:
>
> javax.jcr.nodetype.ConstraintViolationException: /jcr:root: mandatory child node {http://www.jcp.org/jcr/1.0}system does not exist
>
> Technically this is correct, the transient view does not contain this node because jackrabbit cannot import protected system nodes.
>
> So Catch 22, how do I export and then import jackrabit's root if
you can't ;) you'll have to export/import your top-level application
nodes separately.
cheers
stefan
>
> i) It won't import system nodes.
>
> ii) Complains anyway if the system node is missing (i.e. that provided by the import)?
>
> Am I missing something obvious here? The repository only has its own existing system nodes prior to import.
>
> Thanks,
>
> Benjamin
>