question about exporting and importing via JCR api

View: New views
6 Messages — Rating Filter:   Alert me  

question about exporting and importing via JCR api

by Betty Chang-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi --

Am I supposed to be able to export and import my complete repository using JCR calls?
I used Session.exportSystemView() to save everything to a file,
but when I use Workspace.importXML(),  I get a ConstraintViolationException about
  "/jcr:root/jcr:system: mandatory child node (http://www.jcp.org/jcr/1.0) versionStorage does not exist"

Thanks

Betty

Re: question about exporting and importing via JCR api

by Jukka Zitting :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

On Fri, Aug 1, 2008 at 12:43 AM, Betty Chang <bchang@...> wrote:
> Am I supposed to be able to export and import my complete repository using JCR calls?
> I used Session.exportSystemView() to save everything to a file,
> but when I use Workspace.importXML(),  I get a ConstraintViolationException about
>  "/jcr:root/jcr:system: mandatory child node (http://www.jcp.org/jcr/1.0) versionStorage does not exist"

You can't import the jcr:system subtree, so you'll need to ignore it
when exporting content from your workspace. The best practice is to
put all your content within an application root node like /my:content.

BR,

Jukka Zitting

RE: question about exporting and importing via JCR api

by Connor, Brett (LNG-TWY) :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

So how do you import the version history?
 

-----Original Message-----
From: Jukka Zitting [mailto:jukka.zitting@...]
Sent: 04 August 2008 09:06
To: users@...
Subject: Re: question about exporting and importing via JCR api

Hi,

On Fri, Aug 1, 2008 at 12:43 AM, Betty Chang <bchang@...>
wrote:
> Am I supposed to be able to export and import my complete repository
using JCR calls?
> I used Session.exportSystemView() to save everything to a file, but
> when I use Workspace.importXML(),  I get a
> ConstraintViolationException about
>  "/jcr:root/jcr:system: mandatory child node
(http://www.jcp.org/jcr/1.0) versionStorage does not exist"

You can't import the jcr:system subtree, so you'll need to ignore it
when exporting content from your workspace. The best practice is to put
all your content within an application root node like /my:content.

BR,

Jukka Zitting

REED ELSEVIER (UK) LIMITED - Registered office - 1-3 STRAND, LONDON WC2N 5JR
Registered in England - Company No. 02746621


Re: question about exporting and importing via JCR api

by Jukka Zitting :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

On Mon, Aug 4, 2008 at 10:14 AM, Connor, Brett (LNG-TWY)
<Brett.Connor@...> wrote:
> So how do you import the version history?

You don't. :-(

Jackrabbit doesn't support (and JCR doesn't specify) importing version
histories. You can backup or restore the entire set of version
histories by backing up the underlying persistence storage used by
your repository, but as of now it's not possible to selectively import
individual version histories (other than by explicitly replaying the
relevant versioning operations through the JCR API).

BR,

Jukka Zitting

RE: question about exporting and importing via JCR api

by Connor, Brett (LNG-TWY) :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Huh.
Is there a way to kludge it, something like if I edit the XML for a
version history that I want and then import that to the correct
destination inside the version system / version history?
If I go down the replay route I can't get the timestamps as they
originally were, true?
Is there another way to move documents with their version history from
an older Jackrabbit / PM combination to a newer one?
 

-----Original Message-----
From: Jukka Zitting [mailto:jukka.zitting@...]
Sent: 04 August 2008 10:43
To: users@...
Subject: Re: question about exporting and importing via JCR api

Hi,

On Mon, Aug 4, 2008 at 10:14 AM, Connor, Brett (LNG-TWY)
<Brett.Connor@...> wrote:
> So how do you import the version history?

You don't. :-(

Jackrabbit doesn't support (and JCR doesn't specify) importing version
histories. You can backup or restore the entire set of version histories
by backing up the underlying persistence storage used by your
repository, but as of now it's not possible to selectively import
individual version histories (other than by explicitly replaying the
relevant versioning operations through the JCR API).

BR,

Jukka Zitting

REED ELSEVIER (UK) LIMITED - Registered office - 1-3 STRAND, LONDON WC2N 5JR
Registered in England - Company No. 02746621


Node merging

by rkpamarthi :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Hi All,

Currently we are storing the content like below.

Repository/content/en_GB/newstopics/..
Repository/content/de_DE/newstopics/..

Now we need to share the content to multiple countries.
So, as per my understanding we need to migrate the content to new structure like

Repository/content/newstopics/..

This newstopics contains all the country items.

Is there any easy way to achieve this without new structure migration?

How to move the content from one node to another node?

Please find the attached for more clarity on hierarchy.

Best Regards,
RK


content.bmp (628K) Download Attachment
LightInTheBox - Buy quality products at wholesale price!