jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Neale" <michael.ne...@gmail.com>
Subject exportDocumentView and importXML ?
Date Tue, 28 Nov 2006 10:04:47 GMT
I am using the JCR exportDocumentView and importXML and having troubles even
with the basics (I am sure I am missing something).

To export (from the root):
session.exportDocumentView( "/", out, false, false );

To import, I tried:
session.getWorkspace().importXML( "/", in,

In which case I get:

Exception Caused by: javax.jcr.InvalidSerializedDataException: failed to
parse XML stream: Invalid name: : Invalid name:
    at org.apache.jackrabbit.core.WorkspaceImpl.importXML(WorkspaceImpl.java
    at org.drools.repository.RulesRepository.importXML(RulesRepository.java
    ... 19 more
Caused by: org.apache.jackrabbit.name.IllegalNameException: empty name
    at org.apache.jackrabbit.core.xml.DocViewImportHandler.parseNames(

If I use the SESSION version of the importXML (which reads to me like it is
equivalent, but does more in memory work):
session.importXML( "/", in, ImportUUIDBehavior.IMPORT_UUID_COLLISION_THROW);

In which case I get:

Caused by: javax.jcr.nodetype.ConstraintViolationException:
/jcr:root/jcr:system/jcr:versionStorage: cannot add a child to a protected
    at org.apache.jackrabbit.core.NodeImpl.internalAddChildNode(
    at org.apache.jackrabbit.core.NodeImpl.addNode(NodeImpl.java:1548)

Any tips ? I must be completely mis understanding it.

I am interested in import/export for migrating content to an empty
repository (also interested in what importXML does when the node types in
the new empty repository are changed from what it was exported as).

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message